Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alexrp@xamarin.com>2017-06-20 07:22:28 +0300
committerAlex Rønne Petersen <alexrp@xamarin.com>2017-06-20 07:22:28 +0300
commit4cf3f02cac6dff52d8970aa6a758654bce5a222b (patch)
tree7415b95151eb15429f52426ae70e2e4ec473a7d7 /acceptance-tests
parentafa9a853fb9db6ee2cbfb94a4b0494d571959c97 (diff)
[acceptance-tests] Update the profiler-stress test runner for the profiler's new argument style.
This allows us to test a lot more combinations than previously.
Diffstat (limited to 'acceptance-tests')
-rw-r--r--acceptance-tests/profiler-stress/runner.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/acceptance-tests/profiler-stress/runner.cs b/acceptance-tests/profiler-stress/runner.cs
index 5ef4ab02a2e..51c9d91f5e5 100644
--- a/acceptance-tests/profiler-stress/runner.cs
+++ b/acceptance-tests/profiler-stress/runner.cs
@@ -44,6 +44,26 @@ namespace Mono.Profiling.Tests.Stress {
static class Program {
+ static readonly string[] _options = new [] {
+ "domain",
+ "assembly",
+ "module",
+ "class",
+ "jit",
+ "exception",
+ "gcalloc",
+ "gc",
+ "thread",
+ // "calls", // Way too heavy.
+ "monitor",
+ "gcmove",
+ "gcroot",
+ "context",
+ "finalization",
+ "counter",
+ "gchandle",
+ };
+
static readonly TimeSpan _timeout = TimeSpan.FromHours (6);
static string FilterInvalidXmlChars (string text) {
@@ -80,9 +100,11 @@ namespace Mono.Profiling.Tests.Stress {
var maxSamples = rand.Next (0, cpus * 2000 + 1);
var heapShotFreq = rand.Next (0, 11);
var maxFrames = rand.Next (0, 33);
- var allocMode = rand.Next (0, 2) == 1 ? "alloc" : "noalloc";
+ var options = _options.ToDictionary (x => x, _ => rand.Next (0, 2) == 1)
+ .Select (x => (x.Value ? string.Empty : "no") + x.Key)
+ .ToArray ();
- var profOptions = $"sample=cycles/{sampleFreq},sampling-{sampleMode},maxsamples={maxSamples},heapshot={heapShotFreq}gc,maxframes={maxFrames},{allocMode},output=/dev/null";
+ var profOptions = $"sample={sampleFreq},sampling-{sampleMode},maxsamples={maxSamples},heapshot={heapShotFreq}gc,maxframes={maxFrames},{string.Join (",", options)},output=/dev/null";
var info = new ProcessStartInfo {
UseShellExecute = false,