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
using System; | |
namespace debugger_minimal_repro | |
{ | |
enum TestEnum | |
{ | |
Default, | |
NonDefault | |
} |
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
db.getCollection('CollectionItem').find({"cid" : 118, "itemId" : { | |
"$in" : [ | |
ObjectId("5c8a54661437270efcd030e7"), | |
ObjectId("5c8a54da1437260f941af45b"), | |
ObjectId("5c8a56641437250d98768a5d"), | |
ObjectId("5c8a56da1437260f941b453a") | |
] | |
}, | |
"isCurrent" : true}).sort({_id:-1}).explain("allPlansExecution") | |
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
indexes: | |
[ | |
{ | |
"v" : 2, | |
"key" : { | |
"cid" : 1.0, | |
"funcId" : 1.0 | |
}, | |
"name" : "FunctionalId", | |
"ns" : "db_prd.CollectionItem" |
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
internal sealed class ExpressionBasedControllerActivator : IHttpControllerActivator | |
{ | |
private readonly Dictionary<Type, Func<ILifetimeScope, IHttpController>> _activatorCache; | |
public ExpressionBasedControllerActivator() | |
{ | |
_activatorCache = new Dictionary<Type, Func<ILifetimeScope, IHttpController>>(); | |
Warmup(); | |
} |
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
[MemoryDiagnoser] | |
[SimpleJob(RunStrategy.Monitoring, launchCount: 1, warmupCount: 1, targetCount: 2, invocationCount: 10001)] | |
public class CompileBenchmark | |
{ | |
private static LambdaExpression ResolutionExpression; | |
[GlobalSetup] | |
public void GlobalSetup() | |
{ | |
var owinBuilder = new AppBuilder(); |
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
- $exception {The runtime refused to evaluate the expression at this time.} System.StackOverflowException | |
[Lightweight Function] | |
DryIoc.dll!DryIoc.Scope.TryGetOrAdd(ImTools.ImMap<object> items, int id = 564, DryIoc.CreateScopedValue createValue, int disposalOrder = 0) Line 8213 C# | |
DryIoc.dll!DryIoc.Scope.GetOrAdd(int id, DryIoc.CreateScopedValue createValue, int disposalOrder) Line 8198 C# | |
[Lightweight Function] | |
DryIoc.dll!DryIoc.Container.DryIoc.IResolver.Resolve(System.Type serviceType, object serviceKey, DryIoc.IfUnresolved ifUnresolved, System.Type requiredServiceType, DryIoc.Request preResolveParent, object[] args) Line 325 C# | |
DryIoc.dll!DryIoc.Container.ResolveAndCacheDefaultFactoryDelegate(System.Type serviceType, DryIoc.IfUnresolved ifUnresolved) Line 238 C# | |
DryIoc.dll!DryIoc.Container.DryIoc.IResolver.Resolve(System.Type serviceType, DryIoc.IfUnresolved ifUnresolved) Line 209 C# | |
> MyApp.Web.Api.dll!MyApp.Web.Api.Caching.DryIoCControllerActivato |
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
public IFetchedJob Dequeue(string[] queues, CancellationToken cancellationToken) | |
{ | |
var fetchJobSqlTemplate = @" | |
UPDATE jobqueue AS jobqueue | |
SET fetchedat = NOW() AT TIME ZONE 'UTC' | |
WHERE jobqueue.id = ( | |
SELECT id | |
FROM jobqueue | |
WHERE queue IN @queues | |
AND (fetchedat IS NULL OR fetchedat < NOW() AT TIME ZONE 'UTC' - @timeout) |
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
public void RunThrottling() | |
{ | |
// ACQUIRING | |
acquiring: | |
var lockEntity = _lockStorage.UpdateLastAcquiringAndGetPrevious(Key); | |
// ACQUIRED | |
if (lockEntity == null) | |
{ | |
// WAITING |
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
public class ItemMapper | |
{ | |
public CollectionItem Map(ItemBase item) => MapDynamic(item); | |
private CollectionItem MapDynamic(dynamic item) => MapInternal(item); | |
private CollectionItem MapInternal(ItemBase item) => | |
throw new NotSupportedException($"Item type {item.GetType().Name} is not supported"); | |
private CollectionItem MapInternal(ConcreteItem item) |
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
using System; | |
using System.Linq; | |
using System.Text; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
namespace ToHexStringPerf | |
{ | |
public class Tests | |
{ |