Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2076)

Unified Diff: benchmark/lib/benchmark.dart

Issue 1330723003: Implement a better dashboard for running benchmarks (Closed) Base URL: git@github.com:dart-lang/dart-protoc-plugin.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: benchmark/lib/benchmark.dart
diff --git a/benchmark/lib/benchmark.dart b/benchmark/lib/benchmark.dart
index 4657a0cda81a0b0726bfcc191b0d515234a03e86..9968f1916d379d371ed9c97a260b0b6cb2075d32 100644
--- a/benchmark/lib/benchmark.dart
+++ b/benchmark/lib/benchmark.dart
@@ -26,7 +26,8 @@ abstract class Benchmark {
String get summary => id.name;
pb.Request makeRequest(
- [Duration duration = const Duration(seconds: 1), int samples = 3]) =>
+ [Duration duration = const Duration(milliseconds: 50),
+ int samples = 20]) =>
new pb.Request()
..id = id
..params = makeParams()
@@ -41,7 +42,7 @@ abstract class Benchmark {
/// requested. If you create more than one iterator, each
/// iterator runs benchmarks independently and will return
/// different samples.
- Iterable<pb.Sample> measure(pb.Request r) sync* {
+ Iterable<pb.Sample> measure(pb.Request r, int samples) sync* {
if (r.id != id) {
throw new ArgumentError("invalid benchmark id: ${r.id}");
}
@@ -50,7 +51,6 @@ abstract class Benchmark {
}
int sampleMillis = r.duration;
- int samples = r.samples;
setup();
for (int i = 0; i < samples; i++) {

Powered by Google App Engine
This is Rietveld 408576698