File tree 5 files changed +33
-1
lines changed
5 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 3
3
/.project
4
4
/Makefile
5
5
/base
6
- /benchmarks
7
6
/buildtools
8
7
/ipch
9
8
/out
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ args:third_party/pkg/args/lib
17
17
async:third_party/pkg/async/lib
18
18
async_helper:pkg/async_helper/lib
19
19
bazel_worker:third_party/pkg/bazel_worker/lib
20
+ benchmark_harness:third_party/pkg/benchmark_harness/lib
20
21
boolean_selector:third_party/pkg/boolean_selector/lib
21
22
build_integration:pkg/build_integration/lib
22
23
charcode:third_party/pkg/charcode/lib
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ vars = {
55
55
"args_tag" : "1.4.4" ,
56
56
"async_tag" : "2.0.8" ,
57
57
"bazel_worker_tag" : "bazel_worker-v0.1.20" ,
58
+ "benchmark_harness_tag" : "81641290dea44c34138a109a37e215482f405f81" ,
58
59
"boolean_selector_tag" : "1.0.4" ,
59
60
"boringssl_gen_rev" : "bbf52f18f425e29b1185f2f6753bec02ed8c5880" ,
60
61
"boringssl_rev" : "702e2b6d3831486535e958f262a05c75a5cb312e" ,
@@ -236,6 +237,9 @@ deps = {
236
237
Var ("dart_git" ) + "async.git" + "@" + Var ("async_tag" ),
237
238
Var ("dart_root" ) + "/third_party/pkg/bazel_worker" :
238
239
Var ("dart_git" ) + "bazel_worker.git" + "@" + Var ("bazel_worker_tag" ),
240
+ Var ("dart_root" ) + "/third_party/pkg/benchmark_harness" :
241
+ Var ("dart_git" ) + "benchmark_harness.git" + "@" +
242
+ Var ("benchmark_harness_tag" ),
239
243
Var ("dart_root" ) + "/third_party/pkg/boolean_selector" :
240
244
Var ("dart_git" ) + "boolean_selector.git" +
241
245
"@" + Var ("boolean_selector_tag" ),
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2
+ // for details. All rights reserved. Use of this source code is governed by a
3
+ // BSD-style license that can be found in the LICENSE file.
4
+
5
+ import 'package:benchmark_harness/benchmark_harness.dart' ;
6
+
7
+ class Example extends BenchmarkBase {
8
+ const Example () : super ("Example" );
9
+
10
+ // The benchmark code.
11
+ void run () {}
12
+
13
+ // Not measured setup code executed prior to the benchmark runs.
14
+ void setup () {}
15
+
16
+ // Not measures teardown code executed after the benchark runs.
17
+ void teardown () {}
18
+ }
19
+
20
+ main () {
21
+ const Example ().report ();
22
+ }
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ for command; do
105
105
pkg \
106
106
runtime/bin \
107
107
runtime/lib \
108
+ benchmarks \
108
109
|| (rm -f linux-ia32_profile.tar.gz; exit 1)
109
110
strip -w \
110
111
-K ' kDartVmSnapshotData' \
@@ -188,6 +189,7 @@ for command; do
188
189
pkg \
189
190
runtime/bin \
190
191
runtime/lib \
192
+ benchmarks \
191
193
|| (rm -f linux-ia32.tar.gz; exit 1)
192
194
elif [ " $command " = linux-ia32-benchmark ]; then
193
195
rm -rf tmp
219
221
out/ReleaseIA32/run_vm_tests InitialRSS
220
222
out/ReleaseIA32/run_vm_tests GenKernelKernelLoadKernel
221
223
out/ReleaseIA32/run_vm_tests KernelServiceCompileAll
224
+ out/ReleaseIA32/dart --profile-period=10000 --packages=.packages benchmarks/Example/dart/Example.dart
222
225
cd ..
223
226
rm -rf tmp
224
227
elif [ " $command " = linux-x64-build ] ||
264
267
pkg \
265
268
runtime/bin \
266
269
runtime/lib \
270
+ benchmarks \
267
271
|| (rm -f linux-x64_profile.tar.gz; exit 1)
268
272
strip -w \
269
273
-K ' kDartVmSnapshotData' \
366
370
pkg \
367
371
runtime/bin \
368
372
runtime/lib \
373
+ benchmarks \
369
374
|| (rm -f linux-x64.tar.gz; exit 1)
370
375
elif [ " $command " = linux-x64-benchmark ] ||
371
376
[ " $command " = linux-x64-bytecode-benchmark ]; then
403
408
out/ReleaseX64/run_vm_tests InitialRSS
404
409
out/ReleaseX64/run_vm_tests GenKernelKernelLoadKernel
405
410
out/ReleaseX64/run_vm_tests KernelServiceCompileAll
411
+ out/ReleaseX64/dart --profile-period=10000 --packages=.packages benchmarks/Example/dart/Example.dart
406
412
cd ..
407
413
rm -rf tmp
408
414
else
You can’t perform that action at this time.
0 commit comments