Commit graph

173 commits

Author SHA1 Message Date
Daco Harkes
a45276ab91 Reland "[vm/ffi] Roll package:ffi to Allocator and Opaque"
This can only be landed when `Allocator`, `Opaque`, and `AllocatorAlloc`
have rolled into Flutter/engine, that into Flutter/flutter, and into g3.

Deletes all the copies of `_CallocAllocator` and uses the one from
`package:ffi` instead.

Bug: https://github.com/dart-lang/sdk/issues/44622
Bug: https://github.com/dart-lang/sdk/issues/43974
Bug: https://github.com/dart-lang/sdk/issues/44621
Bug: https://github.com/dart-lang/sdk/issues/38721

Change-Id: I486034b379b5a63cad4aefd503ccd0f2ce5dd45e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180188
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-02-10 10:19:28 +00:00
Daco Harkes
3cfcc5a8e5 Revert "[vm/ffi] Roll package:ffi to Allocator and Opaque"
Revert submission 177862

Reason for revert: breaks g3 without https://github.com/flutter/engine/pull/23808
Reverted Changes:
I50b3b4c31:[vm/ffi] Roll `package:ffi` to `Allocator` and `Op...
I3f5b08c08:[vm/ffi] Change `Pointer<T extends Struct>.ref` to...
I6141c193b:[vm/ffi] Disallow empty structs

Change-Id: I128e7b096faea650e0ba0850a411eed3e97c00e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180185
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-01-20 21:37:11 +00:00
Daco Harkes
7d648e3ae7 [vm/ffi] Roll package:ffi to Allocator and Opaque
This can only be landed when `Allocator` and `Opaque` have rolled into
Flutter/engine, that into Flutter/flutter, and that into g3.
flutter/flutter/commit/a706cd211240f27be3b61f06d70f958c7a4156fe

Deletes all the copies of `_CallocAllocator` and uses the one from
`package:ffi` instead.

Issue: https://github.com/dart-lang/sdk/issues/44622
Issue: https://github.com/dart-lang/sdk/issues/43974
Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721

Change-Id: I50b3b4c31a2b839b35e3e057bd54f463b90bc55e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179540
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-01-20 18:08:25 +00:00
Daco Harkes
ac805dff54 [vm/ffi] Migrate to empty Structs to Opaque
This CL migrates empty `Struct`s to `Opaque` native types.
It stops using `.ref` on `Pointer`s to these types.
And stops using `.ref` on `Pointer<Utf8>` which will be migrated in
`package:ffi`.

Issue: https://github.com/dart-lang/sdk/issues/44622
Issue: https://github.com/dart-lang/sdk/issues/43974

Change-Id: I3aa256af7d4ceaa8ee37b1b2ada71f870f43617b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179181
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-01-15 10:52:53 +00:00
Daco Harkes
c36028b002 [vm/ffi] Migrate benchmarks/Ffi* to CallocAllocator
This CL does not yet roll `package:ffi` to use `Allocator`, because that
breaks the checked in Dart in Flutter in g3. Instead, this copies
`_CallocAllocator` from `package:ffi` into the benchmarks. (We need a
copy per benchmark such that file-copying before running benchmarks
works properly.) The copies can be deleted when we can update
`package:ffi` in the DEPS file to contain `_CallocAllocator`.

New API landed in: https://dart-review.googlesource.com/c/sdk/+/177705

Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721

Change-Id: I546de7ec65ceb6f05644a5f269b83f64656892e5
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178995
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-01-14 12:35:58 +00:00
Stephen Adams
d5335340f4 [benchmark] BigIntParsePrint: fix lints
Change-Id: Id0b131e9127b4b57bf88d376cb17d3b3676dfa6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177740
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-01-11 17:42:06 +00:00
Stephen Adams
a5406428a5 Redo "[benchmark] Update BigIntParsePrint""
- Generate strings on one place rather than work hard to generate them
  the same with different number types.

- Update dart2 version


Change-Id: I69e6bde8b870598e062b5009578e5f8c7b2a6add
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176585
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-23 22:59:36 +00:00
Stephen Adams
11d51f4250 Revert "[benchmark] Update BigIntParsePrint"
This reverts commit 7ebbc89e78.

The benchmark became broken because it checks for round-trip fidelity
and using a shared list of strings there is rounding on the int.*.64
case.

I'll fix it and recommit.

TBR: whesse@google.com
Change-Id: I9ba25716992e59929726745b9414eb8dc17a55fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176580
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-17 18:19:24 +00:00
Stephen Adams
7ebbc89e78 [benchmark] Update BigIntParsePrint
- Generate strings on one place rather than work hard to generate them
  the same with different number types.

- Update dart2 version

Change-Id: I449d08a5ead13504ec604b11bd63b729590d6ffe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175861
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-17 06:32:33 +00:00
Stephen Adams
4bee6db9cf [benchmark] add int.parse benchmark
Change-Id: Ibded63c1d3fc60497bde8d19ee33e5e36edd0445
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175600
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-12-11 01:56:48 +00:00
Stephen Adams
68a57c59d7 [benchmarks] Omnibus benchmark
A benchmark that is a collection of other benchmarks.

This benchmark has two purposes:

 - As a medium sized compilation benchmark
 - As a tool for running benchmarks as part of a larger program

This benchmark is not intended to be run for the purpose of generating
benchmark timing results on Golem.

It should be extended over time to include most public benchmarks that
are meaningful on all Dart platforms.

Change-Id: I17f034cfd68d01ff5b4842b89b216fcea0d5bd3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170060
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-11-28 20:36:06 +00:00
Martin Kustermann
c3ddc5c374 [vm/concurrency] Add EventLoopLatencyJson350KB bechmark
The existing EventLoopLatencyJson benchmark exercises the *worst case scenario*:
A background isolate is stressing the GC where the working memory set
does not fit into new space. This causes scavenges to copy the entire
newspace either into the to-space or promote it to old space.

The benchmark in this CL is similar to EventLoopLatencyJson, but it's working
memory set is significantly lower than new space, therefore not
exercising this worst case scenario (this represents the most common
scenario, which we would expect for compute() function in flutter)

(Due to difficulty sharing code between benchmarks, this CL adds
similar code as EventLoopLatencyJson)

Issue https://github.com/dart-lang/sdk/issues/36097

Change-Id: I385a620ba8900082f8ca5fb9080fc23d95112e83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169100
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-10-28 16:28:38 +00:00
Martin Kustermann
c7085f211f [vm] Change EventLoopLatency benchmark to use RunTimeRaw latency
Change-Id: If1ec76839f5334d8a1e04a298b19a4211502fdeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168830
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-10-23 18:31:01 +00:00
Jonas Termansen
80621fed03 [benchmark] Add language version comments to benchmarks.
Change-Id: I44047a9d7907d166a6360397d0047ce9b835e5c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166854
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2020-10-13 01:43:22 +00:00
Martin Kustermann
c4027afb95 [vm/concurrency] Remove unnecessary async marker in benchmark
Change-Id: Ida65d264d83147a85b4ac0c1b8ef3f157f4d3247
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162541
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-09-14 10:58:09 +00:00
Martin Kustermann
2935fecccb [vm/concurrency] Add EventLoopLatencyJson benchmarks
Issue https://github.com/dart-lang/sdk/issues/36097

Change-Id: Ic364e7dccc15bc14832ce61e45ba6c0e241dbbc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162509
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-09-11 16:46:22 +00:00
Tess Strickland
b02925a13f [benchmarks] Adding benchmarks for dynamic closure calls.
Bug: https://github.com/dart-lang/sdk/issues/40813
Change-Id: Ifdb7dfef4fc581c14cb570a534a64d73f5be9449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160726
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-08-28 14:49:18 +00:00
Martin Kustermann
9be24ce946 [benchmark] Import MD5/SHA1/SHA256/SkeletalAnimation/SkeletalAnimationSIMD benchmarks from benchmarks-internal
Change-Id: I8b7a740091a438babfdd05dd81423b5593d3d7e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156020
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-08-24 14:37:28 +00:00
Benjamin Prosnitz
d79ef922a5 Utf8 Encode Benchmarks
This CL adds Utf8 encode benchmarks to complement the existing Utf8
decode benchmarks. These benchmarks measure the time to process a
given input rune.

The motivation for adding this was after noticing in external
benchmarks that Dart utf8 encoding can sometimes be much slower
than the utf8 encoding in other languages. After adding benchmarks,
I plan to send CLs for some small tweaks that may improve performance.

Change-Id: I8751d7df22937e9a85b85794e3488c664c359bbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158820
Auto-Submit: Benjamin Prosnitz <bprosnitz@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-08-19 10:05:10 +00:00
Jonas Termansen
b6a466c61e [benchmark] Fix lint in IsolateSpawn hello world.
Change-Id: I76495ccc6afecb141e7648b202ab46da0027b582
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157260
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-08-06 11:15:20 +00:00
Aske Simon Christensen
bbcdc8dcff [benchmarks] Migrate Utf8Decode benchmark.
Change-Id: Idc5288c3df2e12e2a9d29c3102549531d46e4ff4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153081
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-07-01 16:53:11 +00:00
Alexander Markov
9ae1448ef0 [benchmarks] Add more test cases to ListCopy benchmarks.
This is the follow-up for the discussion on
https://dart-review.googlesource.com/c/sdk/+/152700

Change-Id: Ifeeafcdc312c4f7df7e0be1cc806b972b8c18078
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152709
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2020-07-01 16:01:40 +00:00
Aske Simon Christensen
d56c85f6f9 [benchmarks] Migrate RuntimeType benchmark.
Change-Id: I41e97ac2eb703ba3898bfa70ce8a60946d75ee70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153082
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-07-01 15:40:01 +00:00
Daco Harkes
585fa217a1 [benchmarks/ffi] Migrate benchmarks to NNBD
Change-Id: I36568f4f4d59c0a337aab82b6ca15d40495cb269
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152850
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2020-06-30 14:44:27 +00:00
Daco Harkes
f0851772e9 [benchmarks/ffi] Fix lints
Change-Id: I37fe24f122ed9da269be658b9f98b957ddfcb7fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152848
Reviewed-by: Clement Skau <cskau@google.com>
2020-06-30 14:44:27 +00:00
Alexander Markov
8ef90b8641 [benchmarks] Remove expensive Iterable.cast from NNBD version of ListCopy benchmark
Dart 2 version of this benchmark doesn't have this call.
Dart 3 (NNBD) is more strict and allows implicit casts only if casting
from dynamic, so it highlights places where types are incompatible.

However, Iterable.cast<int>() has a high overhead and it doesn't look
like a right way to suppress static type check in this case, as it
creates a new Iterable which would additionally cast each element.
Simple 'input as dynamic' cast is enough in this case and reflects
what was happening in Dart 2 case when types are incompatible.

Fixes https://github.com/dart-lang/sdk/issues/42506

Change-Id: I8d83796a53b53e6f567f533f3d5369cd29f6ad97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152700
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-06-26 22:51:08 +00:00
Regis Crelier
63cf56d925 Roll benchmarks-internal to 02695da98bcf006b95630d3c386f4169d7ec4ecf
Ignore invariant_booleans lint rule when analyzing benchmarks.

Change-Id: I6071d3c1407e9c67689204e4ceb50cc1c0c8e109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152598
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-06-26 01:56:03 +00:00
William Hesse
095deb888f Migrate ListCopy benchmark to null safety, clean up lints
Change-Id: Id7b8b64727e08ad1a5ab0bec7ad692ec64fa3848
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152329
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-25 15:28:54 +00:00
Jonas Termansen
912ae8230f [benchmark] Migrate Example benchmark to be null safe.
Analyzer lints are fixed while here.

TBR=whesse@google.com

Change-Id: I4e43d9b356608c5cb885f008fb232ea2390b9dd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151840
Reviewed-by: William Hesse <whesse@google.com>
2020-06-23 08:41:19 +00:00
Martin Kustermann
177511aa17 [benchmarks] Disable literal_only_boolean_expressions/unnecessary_await_in_return analyzer hints
The literal_only_boolean_expressions analyzer hint flags this code:

   while (true) {
     ...
     if (cond) break;
     ...
   }

=> This is very common code.

The unnecessary_await_in_return analyzer hint flags this code:

    Future foo() async {
      ...
      return await foo();
    }

=> Addressing this hint by removing the `await` changes semantics,
performance characteristics and async stack traces.

Change-Id: I3c126123bfba7386b01033084e954267af21ba13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152001
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-23 06:02:07 +00:00
Martin Kustermann
0a6a4a24ba [benchmarks] Migrate Calls benchmark to NNBD
Mostly just satisfying new analyzer lints.

Change-Id: Ib3d0f5d216659fcbab6c6f5a3db6383dc965f73d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151523
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2020-06-23 05:41:57 +00:00
William Hesse
78617979b2 Migrate Isolate benchmarks to null safety
Change-Id: I420a60c58d9f727cf8d9cca99c211331ce8e3b57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151844
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-22 23:45:55 +00:00
Stephen Adams
5316f32a64 [benchmark] BigIntParsePrint: Hoist value in all loops
Hoist 'one' in all versions of benchmark for uniformity.

Change-Id: Id2aaa9b18903ff33e3057c01e13ff332fc8979ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151180
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-20 06:01:39 +00:00
Martin Kustermann
a1416976c0 [benchmarks] Disable omit_local_variable_types analyzer hint
This hint flags code such as
   int time = watch.elapsedMillisecond;
and encourages using `var` everywhere:
   var time = watch.elapsedMillisecond;

Though if the type is not obvious to a developer, we should be allowed
to write it.

Furthermore it copies the rules from
`package:pedantic/analysis_options-1.9.0.yaml` to avoid being
automatically opted-in to new rules when a new package:pedantic
gets rolled into the SDK.

Change-Id: I45c72584885c608a56745685e9068ba83dfbed47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151526
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-19 13:43:23 +00:00
Daco Harkes
d87046342f [benchmarks/ffi] Add FfiCall benchmark with Handles
On x64 desktop in JIT the trampolines with Handles are a bit slower
than trampolines passing integers or Pointers.

FfiCall.Uint64x01(RunTime): 200.8482627033541 us.
FfiCall.PointerUint8x01(RunTime): 261.3910088865656 us.
FfiCall.Handlex01(RunTime): 355.4978670458585 us.
FfiCall.Handlex02(RunTime): 384.86376755820663 us.
FfiCall.Handlex04(RunTime): 492.896007885658 us.
FfiCall.Handlex10(RunTime): 846.1214043993232 us.
FfiCall.Handlex20(RunTime): 1193.412291169451 us.

Issue: https://github.com/dart-lang/sdk/issues/36858
Issue: https://github.com/dart-lang/sdk/issues/41319

New issue for optimizing multiple handles:
https://github.com/dart-lang/sdk/issues/42341

Also cleans up dart2/native which was erroneously left over from the
benchmark duplication for NNBD.

Change-Id: I81223fefc47129d00984492efb9502d5449f0d4a
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145593
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-15 13:27:16 +00:00
Alexander Markov
889d6a9565 [benchmarks/nnbd] Migrate TypedDataDuplicate benchmark to NNBD
Also:

* Clean up lints in both unmigrated and migrated versions of benchmarks.

* Cache lists in local variables in Uint8ListCopyViaLoopBenchmark and
  Float64ListCopyViaLoopBenchmark to make the same number of field
  accesses as in other benchmarks, in order to make comparison between
  different ways of copying typed data more fair.

Change-Id: I1e7e726ebf1f3cf6c199fce515c2a56d94576ba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150280
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-06-05 22:22:40 +00:00
Stephen Adams
249cb9c974 [benchmark] BigIntParsePrint lint fixes
Change-Id: Ia68ec34588bfb7b83c6a40e21e0fd5b8a5c0a874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149891
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-05 01:41:23 +00:00
Jonas Termansen
0f505e0e08 [benchmark] Fix oversights from the benchmark fork.
The shared libraries for the FfiBoringssl benchmark had been moved up a
level but unfortunately the same change wasn't made for the FfiCall
benchmark.

The IsolateJson benchmark had a typo in the path and broke.

Change-Id: Iec2fec1d5508022d9cfbfb040d80c74b078a0640
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150024
Reviewed-by: William Hesse <whesse@google.com>
2020-06-04 11:00:20 +00:00
Jonas Termansen
8ac3b6ecfa [benchmark] Fix dart2 files importing dart files.
Change-Id: Iaac8b219b76ff615f45c4d6e1fedc8d8b58ca90c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149845
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-03 14:04:16 +00:00
Jonas Termansen
331eb0ac22 [benchmark] Synchronize Calls benchmark changes to dart2 implementation.
https://dart-review.googlesource.com/c/sdk/+/149493 changed the dart
implementation of the benchmark but did not update the dart2
implementation following the benchmark null safety fork.

Change-Id: Ic38a9c4e341cd9c5990121bbf54c117a52eedf44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149843
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-03 11:03:48 +00:00
Jonas Termansen
0dcccbbe8f [benchmark] Format all benchmarks.
Change-Id: I6f47eb18e685d55513cc452358c1f96a48a7d658
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149840
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-03 10:35:04 +00:00
Alexander Markov
f9eb40cc79 [vm/nnbd] Migate runtime/tests/vm/dart/* tests to NNBD
This change actually migrates vm/dart/* tests to NNBD by fixing
compile-time errors and adjusting tests where needed.

vm/dart/null_float32x4_simd_ops_test and vm/dart/null_float64x2_simd_ops_test
are deleted as they are superseded by static type checks.

vm/dart/regress_40462_test.dart is a huge source code auto-generated
by fuzzer and migrating and maintaining this source doesn't have much
value, so it is deleted.

There are still failures in strong mode due to dependencies on
the packages which are not migrated yet (https://github.com/dart-lang/sdk/issues/42146).

Migrated vm/dart/null_checks_with_dwarf_stack_traces_test fails both in
weak and strong mode due to https://github.com/dart-lang/sdk/issues/42149.

Issue: https://github.com/dart-lang/sdk/issues/41314
Change-Id: I5561f1c8705ec16def0c4e0efa495d15f4ea7259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149493
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-06-02 22:49:09 +00:00
Jonas Termansen
6f66f82625 [benchmark] Fork benchmarks for null safety and pin internal ones.
This change forks the benchmarks for the null safety feature where there
now is a null safe version at benchmarks/Foo/dart and a legacy Dart 2
version at benchmarks/Foo/dart2. This change allows benchmarks to be
migrated per go/dart-nnbd-benchmark-migration.

Additionally this change pins the internal benchmarks which have been
moved into their own repository and is now versioned along with the Dart
SDK.

The dart2 implementation will be benchmarked instead of the null safe
dart implementation as of this change. The null safe dart implementation
will be used when null safe benchmarking is turned on.

Change-Id: If039fd7100c960169f4161c1d98167aca0af2ded
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148440
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-02 12:53:24 +00:00
Jonas Termansen
7aa8656d1d [benchmark] Share BoringSSL between FfiBoringssl implementations.
The Dart benchmarks will soon be forked for non-nullability and there
will be two implementations of the FfiBoringssl benchmark. This change
moves the native BoringSSL build a level up so it can be shared between
the two implementations, avoiding doubling the needed filesystem space.

Change-Id: I8bcc113e19715865f28bc1950cf07ba6cc7ea61f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148760
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-05-20 16:08:50 +00:00
Alexander Markov
9bba7323a0 [benchmarks/nnbd] Fix NNBD compile-time errors in benchmarks/Calls
Fixes compile-time errors in vm/dart/async_igoto_threshold_flag_test
which uses Calls benchmark.

Change-Id: I1e3d075bb7f40516c5319e4eb4ebf7dc5b2c7ccb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146700
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-05-05 21:07:33 +00:00
Aske Simon Christensen
16b4cbc0df [benchmark] Adjust UTF-8 decode benchmark to reflect more typical use.
The majority of UTF-8 decoding in Dart programs is done via the
utf8.decode() call. Therefore, our benchmark should do the same to
better reflect realistic use.

Change-Id: I080edf689a8acd329bb2ee4d54a3de842f387a0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145594
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-05-01 15:21:13 +00:00
Stephen Adams
b328cadaac [benchmark] Benchmark for some .runtimeType patterns from Flutter
Change-Id: I3799d6c8d7d35b9d293ecf0fb79c61cb10837356
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144813
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-04-27 22:22:36 +00:00
Alexander Aprelev
17654b70d7 [vm/isolates] Introduce sendAndExit.
sendAndExit allows for fast data passing from worker isolate back to
parent.

```
                                              | linux x64  | spawnIsolate | sendAndExit |
                                              |us per iter | over sync    | over send   |
                                              +------------+--------------+-------------+
IsolateJson.Decode50KBx1(RunTime):               43,175.000   339.83%
IsolateJson.SendAndExit_Decode50KBx1(RunTime):   22,070.000   124.83%        -48.88%
IsolateJson.SyncDecode50KBx1(RunTime):            9,816.284

IsolateJson.Decode50KBx4(RunTime):               77,630.000   104.56%
IsolateJson.SendAndExit_Decode50KBx4(RunTime):   46,307.000   22.02%         -40.35%
IsolateJson.SyncDecode50KBx4(RunTime):           37,949.528

IsolateJson.Decode100KBx1(RunTime):              71,035.000   270.42%
IsolateJson.SendAndExit_Decode100KBx1(RunTime):  43,056.000   124.52%        -39.39%
IsolateJson.SyncDecode100KBx1(RunTime):          19,176.733

IsolateJson.Decode100KBx4(RunTime):             120,915.000   54.66%
IsolateJson.SendAndExit_Decode100KBx4(RunTime):  67,101.000  -14.17%         -44.51%
IsolateJson.SyncDecode100KBx4(RunTime):          78,179.731

IsolateJson.Decode250KBx1(RunTime):             173,574.000  202.52%
IsolateJson.SendAndExit_Decode250KBx1(RunTime): 103,334.000   80.10%         -40.47%
IsolateJson.SyncDecode250KBx1(RunTime):          57,375.314

IsolateJson.Decode250KBx4(RunTime):             292,118.000   20.30%
IsolateJson.SendAndExit_Decode250KBx4(RunTime): 168,444.000  -30.63%         -42.34%
IsolateJson.SyncDecode250KBx4(RunTime):         242,831.000

IsolateJson.Decode1MBx1(RunTime):               631,578.000  166.34%
IsolateJson.SendAndExit_Decode1MBx1(RunTime):   371,127.000   56.50%         -41.24%
IsolateJson.SyncDecode1MBx1(RunTime):           237,135.778

IsolateJson.Decode1MBx4(RunTime):             1,322,789.000   36.16%
IsolateJson.SendAndExit_Decode1MBx4(RunTime):   657,179.000  -32.35%         -50.32%
IsolateJson.SyncDecode1MBx4(RunTime):           971,473.333

```

Bug: https://github.com/dart-lang/sdk/issues/37835
Bug: https://github.com/dart-lang/sdk/issues/36097
Change-Id: I386641e1431ed9f2e34fac36f562607a666ee4a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142823
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-04-22 17:34:09 +00:00
Aske Simon Christensen
b59217721b [benchmark] Benchmark for UTF-8 decoding with typical data.
This is in preparation for upcoming optimizations to the UTF-8 decoding.

The data files are extracts from Wikipedia with markup stripped. They
cover 6 representative cases of typical input data:
- English text, only ASCII
- Danish text, mostly ASCII, only Latin-1
- Slovak text, mostly ASCII, not only Latin-1
- Russian text, max 2 bytes per character
- Nepali text, max 3 bytes per character
- Chinese text, full character range

Each of the languages are benchmarked with small (average 10 bytes),
medium (10 000 bytes) and large (10 000 000 bytes) inputs.

Only allowMalformed: false is benchmarked.

Change-Id: I72e6959c49388f2aebf33da0c582b7729be6297c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140870
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-03-27 13:02:07 +00:00
Stephen Adams
93c2900477 [benchmark] Make BigIntPrintParse be NNBD-agnostic
Change-Id: I6e93972bf904cbf09316517798a43116ee7fa61a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141027
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-03-26 17:55:33 +00:00
Stephen Adams
7c977188dd [benckmark] Apply code review suggestion to TBR-ed ListCopy benchmark fix
Change-Id: I5a990bb21d4cc62e6ec6ff7428e126d3044b515a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140721
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-03-24 00:22:45 +00:00
Stephen Adams
13e56c6a3a null-safety fixes for ListCopy benchmark setup
Change-Id: I0de8ba7cb1a04aba35a6b722b0fcdd8946ce9737
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140241
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-03-20 20:36:13 +00:00
Alexander Markov
a20c9de3e8 [benchmarks] Add typed data copy benchmark
This change adds TypedDataDuplicate benchmark which measures
performance of making a copy of typed data lists.

Issue: https://github.com/dart-lang/sdk/issues/40039
Change-Id: Iadabbe3ca42dab2d2567e36fb1acd83fc2bfeb0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132162
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-01-24 22:04:35 +00:00
Stephen Adams
a106ad0042 List copy benchmark
Change-Id: I25822ce9f2159ae801dc8c0953c1f9638b15d7f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131261
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-01-14 06:16:35 +00:00
Kallen Tu
1db1a837f8 Added SoundSplayTreeSieve benchmark for variantly sound interfaces.
Dart2JS
sdk/bin/dart2js_developer sieve.dart --enable-experiment=variance --experiment-new-rti --omit-implicit-checks --out=soundsplay.js --lax-runtime-type-to-string
CollectionSieves-SplayTreeSet-removeLoop(RunTime): 4307.52688172043 us.
CollectionSieves-SoundSplayTreeSet-removeLoop(RunTime): 4344.902386117137 us.

sdk/bin/dart2js_developer sieve.dart --enable-experiment=variance --experiment-new-rti --out=soundsplay.js
CollectionSieves-SplayTreeSet-removeLoop(RunTime): 73714.28571428572 us.
CollectionSieves-SoundSplayTreeSet-removeLoop(RunTime): 73714.28571428572 us.

DDK
pkg/dev_compiler/tool/ddb -d -r chrome --enable-experiment=variance -k sieve.dart
CollectionSieves-SplayTreeSet-removeLoop(RunTime): 29097.17391304348
CollectionSieves-SoundSplayTreeSet-removeLoop(RunTime): 22948.409090909092 us.

Change-Id: Ie78febebe57295d7d5fd10e07d95da118f285cce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129303
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-12-20 23:54:15 +00:00
Martin Kustermann
f922ed0962 [vm/concurrency] Update IsolateSpawnMemory benchmark
Ensure to count heap sizes of all isolate groups, since
AOT works with --enable-isolate-groups, JIT without.

Make the benchmark work in phases to make numbers more stable.

Add a max-process-rss metric to see peak memory during duration
of the entire benchmark.

Change-Id: I481b2cb8b666885b5c2b9c53fff1177accd01830
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126724
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-12-03 12:07:55 +00:00
Alexander Aprelev
9c4c49d9ee [vm/benchmarks] Reduce number of isolate spawn runs from 5 to 3.
This is to reduce load on Android benchmarking hardware.

Change-Id: Ib51b3fbbe2bf66cb0ba17375062a747f37284299
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124600
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-11-08 17:04:07 +00:00
Alexander Aprelev
208f3709b9 [vm/benchmark] Add IsolateSpawnMemory.Dart2JSDeltaRss benchmarks.
These new benchmarks better measure rss delta associated with spawning new dart2js isolate.

Also this moves IsolateSpawn heap measurement benchmarks into this group as well because
they are effectively new benchmarks.

Change-Id: Idf31f83b24713932d5ddfa096e23f36ae8195cd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123685
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-04 23:53:05 +00:00
Alexander Aprelev
79dc0cbc47 [vm/benchmarks] Add benchmark that decodes json on a separate isolate.
To see advantage of running decoding on separate isolate this benchmark decodes 10 json strings.
Sync implementation has to do it sequentially, async version does in parallel.

Change-Id: Ia4e25f532d0a92aea9b16b99e374b898899a11cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123100
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-04 21:50:15 +00:00
Alexander Aprelev
0ea69b7342 [vm/benchmarks] Use service api to get heap usage for IsolateSpawn benchmark.
Change-Id: I9573b5596d9f15c3be465031d04e304a6d6a50f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123500
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-04 19:55:27 +00:00
Samir Jindel
c885bdde1d [vm] DBC is obsolete. Remove dead code.
Change-Id: Ica33af158cca53c8e951e4b2582de83660e8a60d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121851
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-27 18:18:29 +00:00
Daco Harkes
d82ca1a9c7 [vm/ffi] Remove Struct type argument
This has coupled changes in package:ffi and package:tflite_native which are pinned in DEPS.

This CL includes the required analyzer changes from https://dart-review.googlesource.com/c/sdk/+/121647.

Issue: https://github.com/dart-lang/sdk/issues/38611

Change-Id: I712a886fd28ce0a2954fc42c90e1dfa495057732
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try,dart-sdk-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121422
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-15 18:35:57 +00:00
Alexander Aprelev
5f198ae1c8 [vm/benchmarks] Add IsolateSpawn spawn latency and memory benchmarks.
The benchmark spawns an isolate that compiles hello world app with dart2js, measures time it takes for spawned isolate to get up and running, measures delta rss when isolate is spawned.

This also adds analysis_options.yaml that helps with keeping the code lint-free.

Change-Id: I5f1ffa9706766cd00bf1ea3fdad76957952de8a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119538
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-10-11 19:52:12 +00:00
Samir Jindel
4ee5ef9f10 [vm/ffi] Use Pointer<Null> as the type of nullptr.
Also clean up test/benchmark/sample code using nullptr and fix pubspec.yaml in the SQLite sample.

Fixes https://github.com/dart-lang/sdk/issues/37362

Change-Id: I6fa0522374af28020ef8f096ac22b23712aedb5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121122
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-11 14:39:47 +00:00
Samir Jindel
63d3012e68 [vm/ffi] Deprecate Pointer.allocate/free.
Fixes https://dart-review.googlesource.com/c/sdk/+/118442.

Also updates untested sample code in samples/ffi.

Change-Id: Id40a7b8fbb35c5d989269646ebb22864cebcfcac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118441
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-10 13:17:43 +00:00
Daco Harkes
ee0b1df4a6 [vm/ffi] Migrate tests/samples/benchmarks to extension methods
I used the regex replaces documented on the `load` and `store` deprecated methods.
I manually replaced some `.val` to `.ref` when a regex could not detect whether something was a primitive value or a struct.

Issue: https://github.com/dart-lang/sdk/issues/37773

Change-Id: I3534b6dd00d9ac45fa1a11fe75c80fb3cccc07dc
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-mac-debug-simdbc64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118993
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-10-08 16:49:41 +00:00
Stephen Adams
27cd15585b Add BigInt/Int64 parse/toString benchmark
Change-Id: I378c92dc1b17fe023e604feb6c3a7020e1329e45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118500
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-10-04 00:45:03 +00:00
Alexander Aprelev
16be3a095d [vm/benchmark] Add *Bytes suffix to Isolate SendReceive benchmark
Change-Id: If097c8e8b8b7327610993327aacfeae25960f2f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115640
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-09-05 15:25:33 +00:00
Alexander Aprelev
b6b4a3d2ca [vm/benchmark] Cleanup Isolates benchmark
Change-Id: Id8e3d45ceac331cdf44292642c0ab3a15fc32987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115442
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-04 21:54:57 +00:00
Alexander Aprelev
12c94c04d3 [vm/isolates] Introduce isolate [transferable] benchmark.
This is to replace vm/transferabe_test 'benchmark' and introduce home for further isolate communication benchmarks.

Addresses https://github.com/dart-lang/sdk/issues/37520.

Change-Id: Ie425c4a855744fa0228271893dbd236b993d3ce2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114449
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-08-30 23:26:39 +00:00
Martin Kustermann
1fcaa26004 [vm/benchmarks] Add sync/sync*/async/async* call benchmarks
Change-Id: Ic29dd0fbcc524cdcd83c5c60eedfcf9db55001e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113186
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-08-22 12:21:19 +00:00
Daco Harkes
fbf13f561f [benchmarks/ffi] Add micro and macro benchmarks for dart:ffi
Adds micro benchmarks to measure low level (1) C memory reads and writes from Dart and (2) calls from Dart into C. This CL also adds a macro benchmark to measure overall performance using BoringSSL to digest data. The shared libraries are precompiled for Linux and live in cipd packages. The benchmarks run on all hardware architectures (with the exception of Linux'es hardfp on Arm32: https://github.com/dart-lang/sdk/issues/36309).

Issue: https://github.com/dart-lang/sdk/issues/36247

Change-Id: I8dfb30cc66a26a2942bb09194c5eb0da0b6ca1b5
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108724
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2019-07-19 14:59:57 +00:00
Jonas Termansen
24d57fb745 [benchmark] Add top level benchmarks directory.
Benchmarks are checked in as benchmarks/<Benchmark>/dart/<Benchmark>.dart.
This scheme is compatible with our existing benchmarking infrastructure
and will aid migrating the benchmarks with minimal breakage.

This change adds an Example benchmark to show how it is done.

The benchmarks directory is now added to the Dart benchmarking builds.

Change-Id: I25971ba3b219194fa9cfea6b938372d877477e28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108414
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-07-10 14:51:14 +00:00