Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrading MiniProfiler to dogfood it. Also cleans up and adds options around profiling and logging...these were just oddly placed before.
- Loading branch information
1 parent
2d6a4b4
commit 9b048a5
Showing
13 changed files
with
64 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
using System; | ||
using StackExchange.Opserver.Data; | ||
using StackExchange.Opserver.Data; | ||
using StackExchange.Profiling; | ||
using StackExchange.Profiling.Storage; | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace StackExchange.Opserver.Helpers | ||
{ | ||
public class MiniProfilerCacheStorage : HttpRuntimeCacheStorage, IStorage | ||
public class MiniProfilerCacheStorage : MemoryCacheStorage, IAsyncStorage | ||
{ | ||
public MiniProfilerCacheStorage(TimeSpan cacheDuration) : base(cacheDuration) | ||
{ | ||
} | ||
public MiniProfilerCacheStorage(TimeSpan cacheDuration) : base(cacheDuration) {} | ||
|
||
MiniProfiler IStorage.Load(Guid id) => Load(id) ?? PollingEngine.GetCache(id)?.Profiler; | ||
MiniProfiler IAsyncStorage.Load(Guid id) => Load(id) ?? PollingEngine.GetCache(id)?.Profiler; | ||
Task<MiniProfiler> IAsyncStorage.LoadAsync(Guid id) => LoadAsync(id) ?? Task.FromResult(PollingEngine.GetCache(id)?.Profiler); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.