public void ForLoop(BenchmarkContext context) { for (var i = EsimatedOperationsPerSecond; i != 0; i--) { _counter.Increment(); } }
public void SetUp(BenchmarkContext context) { _counter = context.GetCounter(CounterName); if (ConfigurationManager.AppSettings["TestKey"] != "42") throw new InvalidOperationException("TestKey from AppSettings could not be loaded!"); }
public void BenchmarkTestMethod(BenchmarkContext context) { _counter.Increment(); { var bytes = new byte[1 << 13]; bytes = null; } }
public BenchmarkRun(IReadOnlyList<MeasureBucket> measures, IReadOnlyList<Counter> counters) { Contract.Requires(measures != null); Contract.Requires(counters != null); Measures = measures; MeasureCount = measures.Count; Counters = counters.ToDictionary(key => key.Name, v => v); Context = new BenchmarkContext(Counters); }
public void InvokePerfSetup(BenchmarkContext context) { _testClassInstance = Activator.CreateInstance(_metadata.BenchmarkClass); _cleanupAction = Compile(_metadata.Cleanup); _setupAction = Compile(_metadata.Setup); _runAction = Compile(_metadata.Run); _setupAction(context); }
public void BenchmarkTestMethod(BenchmarkContext context) { _counter.Increment(); { var bytes = new byte[1 << 13]; bytes = null; } Thread.Sleep(IterationSpeedMs); }
public void SaveSummary(BenchmarkRunSummary summary) { using (var db = new BenchmarkContext(_connectionString)) { db.Database.EnsureCreated(); db.RunSummaries.Add(summary); db.SaveChanges(); } }
public void Control(BenchmarkContext context) { var runCount = EsimatedOperationsPerSecond; while (true) { _counter.Increment(); if (runCount-- == 0) break; } }
public void InvokePerfSetup(long runCount, BenchmarkContext context) { _actualRunAction = benchmarkContext => { for (var i = runCount; i != 0;) { _runAction(context); --i; } }; InvokePerfSetup(context); }
public void ForLoopNested(BenchmarkContext context) { for (var j = OuterOperations; j != 0; j--) { for (var i = InnerOperation; i != 0;) { _counter.Increment(); --i; } } }
public void InvokePerfCleanup(BenchmarkContext context) { // cleanup method _cleanupAction(context); // instance cleanup var disposable = _testClassInstance as IDisposable; disposable?.Dispose(); _testClassInstance = null; _setupAction = null; _cleanupAction = null; _runAction = null; }
public void InvokePerfSetup(long runCount, BenchmarkContext context) { InvokePerfSetup(context); var previousRunAction = _runAction; _runAction = ctx => { for (long i = runCount; i != 0;) { previousRunAction(ctx); --i; } }; }
public void Cleanup(BenchmarkContext context) { context.Trace.Info(CleanupTrace); }
public void Setup(BenchmarkContext benchContext) { addCounter = benchContext.GetCounter(AddCounterName); // key = 0; }
public void ParseLocalThroughput(BenchmarkContext context) { Address.Parse("akka.tcp://sys@localhost:9091"); _parseThroughput.Increment(); }
public void Cleanup(BenchmarkContext context) { ReflectionBenchmarkInvokerSpecs.CleanupContextSet = context != null; }
public void Setup(BenchmarkContext context) { Task.Run(RealWorkMethod).Wait(); ReflectionBenchmarkInvokerSpecs.SetupContextSet = context != null; }
public WorkItemsController(BenchmarkContext benchmarkContext) { _benchmarkContext = benchmarkContext; }
public void Cleanup(BenchmarkContext context) { //does nothing }
public void Setup(BenchmarkContext context) { addCounter = context.GetCounter(SumCounterName); }
public void DispatchThroughput(BenchmarkContext context) { _dispatcher.Dispatch(_targetActorRef, _systemAddress, _message); }
public void StressTestStandardOutWriter(BenchmarkContext context) { StandardOutWriter.WriteLine(InputStr, ConsoleColor.Black, ConsoleColor.DarkGreen); _consoleWriteThroughputCounter.Increment(); }
public void SetUp(BenchmarkContext context) { // disable SO so we don't fill up the build log with garbage Console.SetOut(new StreamWriter(Stream.Null)); _consoleWriteThroughputCounter = context.GetCounter(ConsoleWriteThroughputCounterName); }
public void Setup(BenchmarkContext context) { _system = ActorSystem.Create($"ActorMemoryFootprintSpec{Counter.GetAndIncrement()}"); _createActorThroughput = context.GetCounter(CreateThroughputCounter); }
public void BenchmarkTestMethod(BenchmarkContext context) { _counter.Increment(); }
public void Tcp_Duplex_Throughput(BenchmarkContext context) { client.Tell(message); resetEvent.Wait(this.Timeout); }
public void Cleanup(BenchmarkContext context) { Task.Run(NoWorkMethod).Wait(); ReflectionBenchmarkInvokerSpecs.CleanupContextSet = context != null; }
public override void Setup(BenchmarkContext context) { base.Setup(context); FilePairsLoaded = context.GetCounter(nameof(FilePairsLoaded)); }
public void Run(BenchmarkContext context) { _counter.Increment(); }
public void SetUp(BenchmarkContext context) { _executor = CreateExecutor(); _executorThroughput = context.GetCounter(EventExecutorThroughputCounterName); }
public void Setup(BenchmarkContext context) { _parseThroughput = context.GetCounter(ParseThroughputCounterName); }
#pragma warning disable xUnit1013 // Public method should be marked as test public void Cleanup(BenchmarkContext context) #pragma warning restore xUnit1013 // Public method should be marked as test { _dictionary.Clear(); }
public void BenchmarkSetupMethod(BenchmarkContext context) { _counter = context.GetCounter(CounterName.CounterName); }
#pragma warning disable xUnit1013 // Public method should be marked as test public void Setup(BenchmarkContext context) #pragma warning restore xUnit1013 // Public method should be marked as test { _addCounter = context.GetCounter(AddCounterName); _key = 0; }
public void InvokeRun(BenchmarkContext context) { _runAction(context); }
public void SetUp(BenchmarkContext context) { _fiber = CreateFiber(); _fiberThroughput = context.GetCounter(FiberThroughputCounterName); }
public void Setup(BenchmarkContext context) { context.Trace.Debug(SetupTrace); }
public void Cleanup(BenchmarkContext context) { }
public void Run1(BenchmarkContext context) { context.Trace.Debug(RunTrace); }
public TestController(BenchmarkContext benchmarkContext) { _benchmarkContext = benchmarkContext; }
public void Teardown(BenchmarkContext context) { _system.Terminate().Wait(TimeSpan.FromSeconds(2.0d)); _system = null; }
public void BenchMarkMethod_GetAllTasks(BenchmarkContext context) { ProjectDbService _dbSvc = new ProjectDbService(); IEnumerable <DAL.Task> allTasksList = _dbSvc.GetAllTasks().ToList(); }
public void ParseRemoteThroughput(BenchmarkContext context) { Address.Parse("akka://sys"); _parseThroughput.Increment(); }
public void BenchMarkMethod_GetTaskById(BenchmarkContext context) { ProjectDbService _dbSvc = new ProjectDbService(); DAL.Task tskObj = _dbSvc.GetTaskById(2315); }
public void Run(BenchmarkContext context) { RunContextSet = SetupContextSet && !CleanupContextSet; }
public void BenchMarkMethod_GetAllParentTasks(BenchmarkContext context) { ProjectDbService _dbSvc = new ProjectDbService(); IEnumerable <ParentTask> lstParentTasks = _dbSvc.GetAllParentTasks(); }
public void Run(BenchmarkContext context) { ReflectionBenchmarkInvokerSpecs.RunContextSet = context != null; }
public void BenchMarkMethod_GetAllUsers(BenchmarkContext context) { ProjectDbService _dbSvc = new ProjectDbService(); IEnumerable <Usr> lstUsrs = _dbSvc.GetAllUsers(); }
public void Setup(BenchmarkContext context) { }
public override void Setup(BenchmarkContext context) { base.Setup(context); _writeCounter = context.GetCounter(WriteCounterName); }
public void Cleanup(BenchmarkContext context) { }
public void InvokePerfCleanup(BenchmarkContext context) { _cleanupAction(context); }
public void Setup(BenchmarkContext context) { _counter = context.GetCounter("TestCounter"); }
public override void Setup(BenchmarkContext context) { base.Setup(context); InitStreamWith((sbyte)-120); }
public void Cleanup(BenchmarkContext context) { context.Trace.Info(CleanupTrace); }
public void Setup(BenchmarkContext context) { _counter1 = context.GetCounter("Counter1"); _counter2 = context.GetCounter("Counter2"); }
public void SetUp(BenchmarkContext context) { _counter = context.GetCounter(CounterName); }
public void SetUp(BenchmarkContext ctx) => _counter = ctx.GetCounter("Counter");
public void Setup(BenchmarkContext context) { sim = BenchmarkUtils.CreateCellBasedSim(context.Trace, 24, 50, 50, 12000, 72000, 0.005f); }
#pragma warning disable xUnit1013 // Public method should be marked as test public void Setup(BenchmarkContext context) #pragma warning restore xUnit1013 // Public method should be marked as test { _counter = context.GetCounter("Iterations"); }