зеркало из https://github.com/aspnet/Stress.git
Getting stress to recompile
This commit is contained in:
Родитель
0f167af7f0
Коммит
1fde4544f6
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using Microsoft.Dnx.Runtime;
|
||||
|
||||
|
@ -26,7 +25,7 @@ namespace Microsoft.AspNet.StressFramework
|
|||
var className = args[2];
|
||||
|
||||
// Find the class
|
||||
var asm = Assembly.Load(libraryName);
|
||||
var asm = Assembly.Load(new AssemblyName(libraryName));
|
||||
if (asm == null) {
|
||||
Console.Error.WriteLine($"Failed to load assembly: {libraryName}");
|
||||
return -2;
|
||||
|
|
|
@ -66,9 +66,6 @@ namespace Microsoft.AspNet.StressFramework
|
|||
|
||||
// Capture CPU time
|
||||
|
||||
// Capture memory usage again, before stopping collectors to ensure we miss their allocations
|
||||
_endMemory = MemoryUsage.Capture();
|
||||
|
||||
// Record the elapsed time and memory usage
|
||||
_recordings.Add(Metric.Create(Iteration, new ElapsedTime(_stopwatch.Elapsed)));
|
||||
_recordings.Add(Metric.Create(Iteration, MemoryUsage.Compare(_startMemory, _endMemory)));
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace Microsoft.AspNet.StressFramework
|
|||
var stopwatch = Stopwatch.StartNew();
|
||||
for (int i = 0; i < TestCase.Iterations; i++)
|
||||
{
|
||||
var context = new StressTestIterationContext(_collectors);
|
||||
var context = new StressTestIterationContext(i, _collectors, MessageBus);
|
||||
context.BeginIteration();
|
||||
|
||||
await InvokeTestMethodAsync(instance);
|
||||
|
|
|
@ -6,7 +6,6 @@ using System.Linq;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.StressFramework;
|
||||
using Microsoft.AspNet.StressFramework.Collectors;
|
||||
using Microsoft.AspNet.WebUtilities;
|
||||
using Xunit;
|
||||
|
||||
|
@ -15,7 +14,6 @@ namespace Microsoft.AspNet.Stress.Tests
|
|||
public class SmokeTest
|
||||
{
|
||||
[StressTest]
|
||||
[ElapsedTimeUnder(Seconds = 1)]
|
||||
public void SmokeyMcSmokeTest()
|
||||
{
|
||||
Assert.True(true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче