diff --git a/.travis.yml b/.travis.yml index ef575e0780892..05894d76203f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,24 +37,29 @@ jobs: dart: dev - stage: format_analyzer_tests name: "SDK: dev - DIR: protoc_plugin - TASKS: [make protos, dartanalyzer --fatal-infos --fatal-warnings .]" - script: ./tool/travis.sh command dartanalyzer_0 + script: ./tool/travis.sh command_0 dartanalyzer_0 env: PKG="protoc_plugin" dart: dev - stage: format_analyzer_tests name: "SDK: stable - DIR: protoc_plugin - TASKS: [make protos, dartfmt -n --set-exit-if-changed ., dartanalyzer --fatal-warnings .]" - script: ./tool/travis.sh command dartfmt dartanalyzer_1 + script: ./tool/travis.sh command_0 dartfmt dartanalyzer_1 env: PKG="protoc_plugin" dart: stable - stage: format_analyzer_tests name: "SDK: stable - DIR: protoc_plugin - TASKS: [make protos, pub run test]" - script: ./tool/travis.sh command test + script: ./tool/travis.sh command_0 test env: PKG="protoc_plugin" dart: stable - stage: format_analyzer_tests name: "SDK: dev - DIR: protoc_plugin - TASKS: [make protos, pub run test]" - script: ./tool/travis.sh command test + script: ./tool/travis.sh command_0 test env: PKG="protoc_plugin" dart: dev + - stage: format_analyzer_tests + name: "SDK: stable - DIR: query_benchmark - TASKS: [./compile_protos.sh, dartfmt -n --set-exit-if-changed ., dartanalyzer --fatal-warnings .]" + script: ./tool/travis.sh command_1 dartfmt dartanalyzer_1 + env: PKG="query_benchmark" + dart: stable stages: - format_analyzer_tests diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000000000..76538c76b4047 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,3 @@ +analyzer: + exclude: + - benchmarks/query_benchmark/** diff --git a/query_benchmark/bin/decode.dart b/query_benchmark/bin/decode.dart new file mode 100644 index 0000000000000..83de4b6eac098 --- /dev/null +++ b/query_benchmark/bin/decode.dart @@ -0,0 +1,19 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:query_benchmark/generated/f0.pb.dart' as f0; +import 'package:query_benchmark/benchmark.dart'; +import 'package:query_benchmark/readfile.dart'; + +main() { + String path = const String.fromEnvironment('testfile') ?? 'testdata/500.pb'; + + List encoded = readfile(path); + print( + formatReport( + title: 'protobuf_decode', + duration: measure(() => f0.A0.fromBuffer(encoded)), + ), + ); +} diff --git a/query_benchmark/bin/decode_json.dart b/query_benchmark/bin/decode_json.dart new file mode 100644 index 0000000000000..64d365db4bc94 --- /dev/null +++ b/query_benchmark/bin/decode_json.dart @@ -0,0 +1,21 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:query_benchmark/generated/f0.pb.dart' as f0; +import 'package:query_benchmark/benchmark.dart'; +import 'package:query_benchmark/readfile.dart'; + +main() { + String path = const String.fromEnvironment('testfile') ?? 'testdata/500.pb'; + + List encoded = readfile(path); + f0.A0 a = f0.A0.fromBuffer(encoded); + String json = a.writeToJson(); + print( + formatReport( + title: 'protobuf_decode_json', + duration: measure(() => f0.A0.fromJson(json)), + ), + ); +} diff --git a/query_benchmark/bin/encode.dart b/query_benchmark/bin/encode.dart new file mode 100644 index 0000000000000..2fb2d537b8d0b --- /dev/null +++ b/query_benchmark/bin/encode.dart @@ -0,0 +1,19 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:query_benchmark/generated/f0.pb.dart' as f0; +import 'package:query_benchmark/benchmark.dart'; +import 'package:query_benchmark/readfile.dart'; + +main() { + String path = const String.fromEnvironment('testfile') ?? 'testdata/500.pb'; + List encoded = readfile(path); + f0.A0 a = f0.A0.fromBuffer(encoded); + print( + formatReport( + title: 'protobuf_encode', + duration: measure(() => a.writeToBuffer()), + ), + ); +} diff --git a/query_benchmark/bin/encode_json.dart b/query_benchmark/bin/encode_json.dart new file mode 100644 index 0000000000000..faa95ff9e196a --- /dev/null +++ b/query_benchmark/bin/encode_json.dart @@ -0,0 +1,20 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:query_benchmark/generated/f0.pb.dart' as f0; +import 'package:query_benchmark/benchmark.dart'; +import 'package:query_benchmark/readfile.dart'; + +main() { + String path = const String.fromEnvironment('testfile') ?? 'testdata/500.pb'; + + List encoded = readfile(path); + f0.A0 a = f0.A0.fromBuffer(encoded); + print( + formatReport( + title: 'protobuf_encode_json', + duration: measure(() => a.writeToJson()), + ), + ); +} diff --git a/query_benchmark/bin/set_nested_value.dart b/query_benchmark/bin/set_nested_value.dart new file mode 100644 index 0000000000000..94698a025d217 --- /dev/null +++ b/query_benchmark/bin/set_nested_value.dart @@ -0,0 +1,27 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:query_benchmark/generated/f0.pb.dart' as f0; +import 'package:query_benchmark/generated/f2.pb.dart' as f2; +import 'package:query_benchmark/generated/f19.pb.dart' as f19; +import 'package:query_benchmark/benchmark.dart'; +import 'package:query_benchmark/readfile.dart'; + +main() { + String path = const String.fromEnvironment('testfile') ?? 'testdata/500.pb'; + + List encoded = readfile(path); + f0.A0 a = f0.A0.fromBuffer(encoded)..freeze(); + print( + formatReport( + title: 'protobuf_decode', + duration: measure(() => a.copyWith((f0.A0 a0Builder) { + a0Builder.a4.last = a0Builder.a4.last.copyWith((f2.A1 a1builder) { + a1builder.a378.copyWith( + (f19.A220 a220builder) => a220builder.a234 = 'new_value'); + }); + })), + ), + ); +} diff --git a/query_benchmark/compile_protos.sh b/query_benchmark/compile_protos.sh new file mode 100755 index 0000000000000..4423e5e0a6c45 --- /dev/null +++ b/query_benchmark/compile_protos.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +rm -rf lib/generated +mkdir lib/generated +protoc --dart_out=lib/generated --plugin=protoc-gen-dart=run_protoc_plugin.sh -Iprotos protos/*.proto +dartfmt -w lib/generated diff --git a/query_benchmark/lib/benchmark.dart b/query_benchmark/lib/benchmark.dart new file mode 100644 index 0000000000000..1c355534660fb --- /dev/null +++ b/query_benchmark/lib/benchmark.dart @@ -0,0 +1,22 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Returns the average time to execute [f] over [iterations] repetitions. +/// +/// Will first run [f] [warmupIterations] times to warm up the runtime. +Duration measure(void Function() f, + {int warmupIterations = 100, int iterations = 1000}) { + for (int i = 0; i < warmupIterations; i++) { + f(); + } + var s = Stopwatch()..start(); + for (int i = 0; i < iterations; i++) { + f(); + } + return s.elapsed ~/ iterations; +} + +String formatReport({String title, Duration duration}) { + return "RunTimeRaw($title): ${duration.inMicroseconds} us"; +} diff --git a/query_benchmark/lib/readfile.dart b/query_benchmark/lib/readfile.dart new file mode 100644 index 0000000000000..b4614ea79c9f8 --- /dev/null +++ b/query_benchmark/lib/readfile.dart @@ -0,0 +1,5 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +export 'readfile_vm.dart' if (dart.library.js) 'readfile_d8.dart' show readfile; diff --git a/query_benchmark/lib/readfile_d8.dart b/query_benchmark/lib/readfile_d8.dart new file mode 100644 index 0000000000000..240dd92ec8e84 --- /dev/null +++ b/query_benchmark/lib/readfile_d8.dart @@ -0,0 +1,21 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:js' as js; + +import 'dart:typed_data'; + +/// Reads the file at the given [path] and return its contents in a List. +Uint8List readfile(String path) { + // d8 specific implementation. + js.JsObject jsArrayBuffer = js.context.callMethod('readbuffer', [path]); + int length = jsArrayBuffer['byteLength']; + js.JsObject jsInt8View = + new js.JsObject(js.context['Int8Array'], [jsArrayBuffer]); + Uint8List result = new Uint8List(length); + for (int i = 0; i < length; i++) { + result[i] = jsInt8View[i]; + } + return result; +} diff --git a/query_benchmark/lib/readfile_vm.dart b/query_benchmark/lib/readfile_vm.dart new file mode 100644 index 0000000000000..ddaa535d112b6 --- /dev/null +++ b/query_benchmark/lib/readfile_vm.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:io'; + +List readfile(String path) { + return new File(path).readAsBytesSync(); +} diff --git a/query_benchmark/mono_pkg.yaml b/query_benchmark/mono_pkg.yaml new file mode 100644 index 0000000000000..1ed6903890f5e --- /dev/null +++ b/query_benchmark/mono_pkg.yaml @@ -0,0 +1,11 @@ +# See https://github.com/dart-lang/mono_repo for details +dart: + - stable + +stages: + - format_analyzer_tests: + - group: + - command: ./compile_protos.sh + - dartfmt + - dartanalyzer: --fatal-warnings . + dart: [stable] diff --git a/query_benchmark/protos/f0.proto b/query_benchmark/protos/f0.proto new file mode 100644 index 0000000000000..cd22517cf5cf2 --- /dev/null +++ b/query_benchmark/protos/f0.proto @@ -0,0 +1,22 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1.a2.a3; +import "f2.proto"; +import "f3.proto"; +message A0 { + repeated .a0.a1.a2.a3.A1 a4 = 1; + optional string a5 = 3; + enum A2 { + A3 = 0; + A4 = 1; + A5 = 2; + A6 = 3; + A7 = 4; + A8 = 5; + } + optional A2 a6 = 2; + optional a7.A9 a8 = 4; +} diff --git a/query_benchmark/protos/f1.proto b/query_benchmark/protos/f1.proto new file mode 100644 index 0000000000000..3817d972f61cd --- /dev/null +++ b/query_benchmark/protos/f1.proto @@ -0,0 +1,43 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1.a274; +import "f5.proto"; +message A313 { + optional int32 a90 = 1; + optional int32 a275 = 2; +} +message A314 { + repeated A313 a276 = 1; +} +message A315 { + optional string a277 = 1; + optional a10.A113.A59 a99 = 2; + optional int64 a278 = 3; + repeated string a279 = 4; +} +message A316 { + optional string a280 = 1; + optional int64 a281 = 2; + repeated A315 a282 = 3; +} +message A317 { + repeated A316 a283 = 1; +} +extend a10.A56 { + repeated A313 a276 = 134096400; + optional A314 a284 = 141473177; +} +message A318 { + message A319 { + optional int32 a285 = 1; + optional string a54 = 2; + } + repeated A319 a286 = 1; +} +extend a10.A57 { + optional int32 a287 = 134096400; + optional A318 a288 = 185706300; +} diff --git a/query_benchmark/protos/f10.proto b/query_benchmark/protos/f10.proto new file mode 100644 index 0000000000000..e4cdadf02e35b --- /dev/null +++ b/query_benchmark/protos/f10.proto @@ -0,0 +1,21 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a10.a68; +message A102 { + optional string a52 = 1; + optional uint64 a69 = 2; + optional uint64 a70 = 3; + optional uint64 a71 = 4; +} +message A103 { + optional string a52 = 1; + optional uint64 a72 = 2; + repeated A102 a73 = 3; +} +message A104 { + repeated A103 message = 1; + optional string a74 = 2; +} diff --git a/query_benchmark/protos/f11.proto b/query_benchmark/protos/f11.proto new file mode 100644 index 0000000000000..61958befede7e --- /dev/null +++ b/query_benchmark/protos/f11.proto @@ -0,0 +1,17 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1; +import "f12.proto"; +message A105 { + optional string a75 = 1; +}; +message A106 { + optional A105 a76 = 1; + optional string a77 = 3; +}; +message A107 { + optional string a78 = 1; +} diff --git a/query_benchmark/protos/f12.proto b/query_benchmark/protos/f12.proto new file mode 100644 index 0000000000000..3ba0463bdf991 --- /dev/null +++ b/query_benchmark/protos/f12.proto @@ -0,0 +1,129 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +import "f25.proto"; +import "f5.proto"; +package a260; +enum A322 { + A323 = 0; + A324 = 999; + A325 = 1000; + A326 = 1001; + A327 = 1002; + A328 = 1003; + A329 = 1004; + A330 = 1005; + A331 = 1006; + A332 = 1007; + A333 = 1008; + A334 = 1100; + A335 = 1102; + A336 = 1103; + A337 = 1104; + A338 = 1105; + A339 = 1106; + A340 = 1107; + A341 = 1108; + A342 = 1109; + A343 = 1200; + A344 = 1201; + A345 = 1203; + A346 = 1204; + A347 = 1202; + A348 = 1211; + A349 = 1212; + A350 = 1220; + A351 = 1221; + A352 = 1222; + A353 = 1223; + A354 = 1240; + A355 = 1300; + A356 = 1301; + A357 = 1400; + A358 = 1401; + A359 = 1500; + A360 = 1501; + A361 = 1600; + A362 = 1601; + A363 = 1700; + A364 = 1701; + A365 = 1702; + A366 = 1800; + A367 = 1801; + A368 = 1802; + A369 = 1803; + A370 = 1900; + A371 = 1901; + A372 = 2000; + A373 = 2100; + A374 = 2101; + A375 = 2300; + A376 = 2400; + A377 = 2500; + A378 = 2600; + A379 = 2601; + A380 = 2602; + A381 = 2603; + A382 = 9900; + A383 = 9901; + A384 = 9902; + A385 = 9903; + A386 = 9904; + A387 = 9905; +}; +message A388 { + optional bool a293 = 1 [default = false]; + optional bool a294 = 2 [default = false]; + optional bool a295 = 3 [default = false]; + optional bool a296 = 4 [default = false]; + optional bool a297 = 5 [default = false]; + optional bool a298 = 6 [default = false]; + optional bool a15 = 7 [default = false]; + optional int32 a299 = 8; + optional bool a300 = 9 [default = false]; + optional bool a301 = 10 [default = false]; + optional bool a302 = 11 [default = false]; + optional bool a303 = 13 [default = false]; + optional bool a304 = 12 [default = false]; +}; +message A389 { + optional bool a300 = 1 [default = false]; + optional bool a305 = 2 [default = false]; +}; +enum A390 { + A391 = 0; + A392 = 1; + A393 = 2; + A394 = 3; + A395 = 4; + A396 = 5; + A397 = 6; + A398 = 7; +}; +extend a10.A56 { + optional A322 a306 = 40075780; + optional A388 a307 = 40270992; + optional A389 a308 = 69646961; + optional A399 a309 = 40093572; + optional A390 a310 = 40221563; + repeated A308 a311 = 40223876; +}; +extend a10.A57 { + optional A322 a312 = 41149386; + optional A388 a313 = 41551199; + optional A389 a314 = 69646961; + optional A58 a21 = 41744383; + repeated A308 a315 = 41909987; +}; +message A399 { + repeated A322 a306 = 1; +}; +message A58 { + repeated A322 a306 = 1; +}; +extend a10.A60 { + optional bool a316 = 43601160; + optional string a317 = 71304954; +}; diff --git a/query_benchmark/protos/f13.proto b/query_benchmark/protos/f13.proto new file mode 100644 index 0000000000000..c67e333752bbc --- /dev/null +++ b/query_benchmark/protos/f13.proto @@ -0,0 +1,10 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto3"; +package a205.a206; +message A190 { + int64 a258 = 1; + int32 a259 = 2; +} diff --git a/query_benchmark/protos/f14.proto b/query_benchmark/protos/f14.proto new file mode 100644 index 0000000000000..9c87e38ee5031 --- /dev/null +++ b/query_benchmark/protos/f14.proto @@ -0,0 +1,32 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a10.a68.a211; +message A192 { + message A193 { + optional string a52 = 1; + optional int32 a97 = 2; + optional string a212 = 3; + optional string a213 = 4; + optional bool a214 = 5 [default = true]; + optional bool a215 = 6; + optional uint32 a216 = 7 [default = 2]; + } + repeated A193 a86 = 2; + message A194 { + optional string a52 = 1; + optional string a213 = 2; + optional bool a214 = 3 [default = true]; + optional uint32 a216 = 4 [default = 2]; + } + repeated A194 a217 = 3; + message A195 { + optional string a52 = 1; + optional string a213 = 2; + optional bool a214 = 3 [default = true]; + optional uint32 a216 = 4 [default = 2]; + } + repeated A195 a218 = 4; +} diff --git a/query_benchmark/protos/f15.proto b/query_benchmark/protos/f15.proto new file mode 100644 index 0000000000000..623faaeab628f --- /dev/null +++ b/query_benchmark/protos/f15.proto @@ -0,0 +1,28 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto3"; +package a46.a47.a1.a48.a49.a4; +import "f12.proto"; +message A196 { + string a219 = 1; + A197 a220 = 2; +} +message A197 { + enum A198 { + A199 = 0; + A200 = 1; + A201 = 2; + A202 = 3; + A203 = 4; + A204 = 5; + A205 = 6; + A206 = 7; + A207 = 8; + A208 = 9; + A209 = 10; + } + A198 a221 = 1; + string a222 = 2; +} diff --git a/query_benchmark/protos/f16.proto b/query_benchmark/protos/f16.proto new file mode 100644 index 0000000000000..8e60c6a3f82c3 --- /dev/null +++ b/query_benchmark/protos/f16.proto @@ -0,0 +1,31 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1; +import "f17.proto"; +import "f18.proto"; +import "f12.proto"; +message A210 { + enum A211 { + A212 = 0; + A213 = 1; + A214 = 2; + } + optional string a223 = 1; + optional string a224 = 3; + message A215 { + repeated A216 a225 = 1; + } + optional A215 a226 = 2; + optional A211 a227 = 4; + optional bool a228 = 5; +} +message A217 { + optional A218 a229 = 1; + message A219 { + repeated A216 a230 = 1; + } + optional A219 a231 = 2; +} diff --git a/query_benchmark/protos/f17.proto b/query_benchmark/protos/f17.proto new file mode 100644 index 0000000000000..65516fee4ed03 --- /dev/null +++ b/query_benchmark/protos/f17.proto @@ -0,0 +1,16 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1; +import "f4.proto"; +import "f12.proto"; +message A320 { + optional string a375 = 1; + optional bytes a376 = 2; +} +message A216 { + optional string a377 = 1; + optional A320 a105 = 2; +} diff --git a/query_benchmark/protos/f18.proto b/query_benchmark/protos/f18.proto new file mode 100644 index 0000000000000..d0fa45fd4a7da --- /dev/null +++ b/query_benchmark/protos/f18.proto @@ -0,0 +1,32 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1; +import "f12.proto"; +message A218 { + enum A400 { + A401 = 0; + A402 = 1; + A235 = 2; + A403 = 3; + A404 = 4; + A405 = 5; + A406 = 6; + A407 = 7; + A408 = 16; + A409 = 8; + A410 = 9; + A411 = 10; + A412 = 11; + A413 = 12; + A414 = 13; + A415 = 14; + A416 = 15; + A417 = 17; + A418 = 20; + } + optional A400 a318 = 1 [default = A401]; + optional string a319 = 2; +} diff --git a/query_benchmark/protos/f19.proto b/query_benchmark/protos/f19.proto new file mode 100644 index 0000000000000..c2aafb31d1c2b --- /dev/null +++ b/query_benchmark/protos/f19.proto @@ -0,0 +1,29 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1.a232; +import "f1.proto"; +message A220 { + optional A221 a233 = 7; + optional string a234 = 1; + optional bytes a235 = 5; + optional string a236 = 8; + optional string a237 = 6; + optional string a238 = 2; + optional int32 a239 = 3; + optional int32 a240 = 4; + extensions 192367380; +} +enum A221 { + A222 = 0; + A223 = 1; +} +enum A224 { + A225 = 0; + A226 = 1; + A227 = 2; + A228 = 3; + A229 = 4; +}; diff --git a/query_benchmark/protos/f2.proto b/query_benchmark/protos/f2.proto new file mode 100644 index 0000000000000..8ee436f7ec591 --- /dev/null +++ b/query_benchmark/protos/f2.proto @@ -0,0 +1,65 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1.a2.a3; +import "f1.proto"; +import "f19.proto"; +import "f20.proto"; +import "f15.proto"; +import "f9.proto"; +message A1 { + optional .a0.a1.a232.A220 a378 = 1; + optional .a0.a1.a232.A220 a379 = 2; + optional .a46.a47.a1.a48.a49.a4.A196 a380 = 5; + message A465 { + optional string a381 = 1; + optional string a234 = 2; + optional string a382 = 3; + optional string a383 = 4; + optional string a384 = 10; + optional string a385 = 5; + optional string a386 = 6; + optional string a387 = 7; + optional int64 a388 = 8; + optional string a194 = 9; + } + optional A465 a389 = 3; + message A466 { + optional float a390 = 1; + optional float a391 = 2; + optional float a392 = 3; + optional float a393 = 4; + } + optional A466 a394 = 4; + optional string a395 = 6; + optional A467 a274 = 7; + repeated A468 a396 = 8; + optional bool a397 = 9; + message A469 { + optional .a0.a1.a232.A230 a397 = 1; + optional .a0.a1.a232.A230 a398 = 2; + optional .a0.a1.a232.A230 a399 = 3; + } + optional A469 a400 = 10; +} +message A467 { + message A470 { + optional .a46.a47.a1.a48.a49.a4.A99 a401 = 9; + optional .a46.a47.a1.a48.a49.a4.A100 a402 = 10; + optional .a46.a47.a1.a48.a49.a4.A101 a403 = 11; + } + optional A470 a404 = 1; +} +message A468 { + optional string a395 = 1; + optional A471 a405 = 2; + optional string a406 = 3; +} +message A471 { + optional float a390 = 1; + optional float a392 = 2; + optional float a391 = 3; + optional float a393 = 4; +} diff --git a/query_benchmark/protos/f20.proto b/query_benchmark/protos/f20.proto new file mode 100644 index 0000000000000..48eb17cb1475b --- /dev/null +++ b/query_benchmark/protos/f20.proto @@ -0,0 +1,16 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1.a232; +import "f1.proto"; +import "f21.proto"; +import "f22.proto"; +message A230 { + optional string a222 = 1; + optional string a224 = 2; + optional a0.a1.A231 a241 = 5; + optional A232 a242 = 3; + reserved 4; +} diff --git a/query_benchmark/protos/f21.proto b/query_benchmark/protos/f21.proto new file mode 100644 index 0000000000000..4cfdf8fd040d3 --- /dev/null +++ b/query_benchmark/protos/f21.proto @@ -0,0 +1,13 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1; +import "f17.proto"; +import "f12.proto"; +message A232 { + optional string a289 = 1; + optional string a290 = 3; + map a291 = 2; +} diff --git a/query_benchmark/protos/f22.proto b/query_benchmark/protos/f22.proto new file mode 100644 index 0000000000000..4ec044a48b911 --- /dev/null +++ b/query_benchmark/protos/f22.proto @@ -0,0 +1,96 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1; +import "f8.proto"; +import "f1.proto"; +import "f21.proto"; +import "f16.proto"; +import "f7.proto"; +import "f27.proto"; +import "f28.proto"; +import "f23.proto"; +import "f11.proto"; +import "f24.proto"; +import "f4.proto"; +import "f12.proto"; +message A419 { + repeated A420 a320 = 1; + optional A321 a291 = 2; +}; +message A421 { + optional bytes a321 = 1; + optional bool a322 = 6 [default = false]; + optional bytes a323 = 2; + repeated A420 a324 = 3; + optional A321 a325 = 4; + optional A231 a241 = 5; + map a326 = 7; + optional A422 a327 = 8; + optional string a224 = 9; +}; +message A420 { + optional int32 a328 = 1; + optional int32 a329 = 2; + oneof a99 { + A423 a330 = 3; + A424 a331 = 4; + } +} +message A423 { + optional a0.a1.a232.A239 a332 = 6; + optional string a224 = 7; + optional A231 a241 = 8; + oneof a99 { + a0.a1.A106 a333 = 1; + a0.a1.A293 a334 = 4; + A217 a335 = 3; + A232 a242 = 5; + } + reserved 2; +} +message A424 { + optional a0.a1.a232.A239 a336 = 3; + optional a0.a1.a232.A241 a337 = 7; + optional a0.a1.A107 a338 = 1; + optional A210 a2 = 2; + optional A425 a339 = 5; + optional bytes a340 = 4; + optional bool a341 = 6 [default = false]; + optional A231 a241 = 16; +} +message A425 { + enum A426 { + A235 = 0; + A427 = 1; + A428 = 2; + A429 = 3; + } + optional A426 a342 = 1; +} +message A231 { + optional bool a322 = 1 [default = false]; + optional bool a341 = 2 [default = false]; + optional bool a343 = 3 [default = false]; + optional int32 a344 = 4; + optional bool a345 = 6; + optional A430 a346 = 5; + optional bytes a347 = 7; + optional A66 a348 = 8; +}; +message A430 { + repeated a0.a1.a349.A431 a350 = 5; + repeated A420 a320 = 6; +} +message A432 { + optional string a351 = 1; + optional string a278 = 2; + optional bytes a352 = 3; + optional A66 a348 = 4; +} +message A422 { + repeated A432 a353 = 1; + repeated string a354 = 2; +} diff --git a/query_benchmark/protos/f23.proto b/query_benchmark/protos/f23.proto new file mode 100644 index 0000000000000..1a9dfe6df6f27 --- /dev/null +++ b/query_benchmark/protos/f23.proto @@ -0,0 +1,95 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1.a232; +import "f1.proto"; +import "f4.proto"; +import "f12.proto"; +message A233 { + enum A234 { + A235 = 0; + A236 = 1; + A237 = 2; + A238 = 3; + } + optional A234 a243 = 1; + optional string a244 = 2; + optional string a245 = 3; +} +message A239 { + optional string a246 = 3; + optional string a247 = 2; + optional string a248 = 8; + optional string a249 = 1; + optional string a250 = 4; + optional string a251 = 5; + optional A240 a252 = 6; + optional string a253 = 7; + optional string a254 = 9; + optional string a255 = 10; + optional string a256 = 11; +} +message A240 { + reserved 3, 4; + optional string a245 = 1; + optional string a257 = 2; +} +message A241 { + enum A59 { + A235 = 0; + A242 = 14; + A243 = 4; + A244 = 47; + A245 = 33; + A246 = 5; + A247 = 45; + A248 = 2; + A249 = 28; + A250 = 13; + A251 = 29; + A252 = 27; + A253 = 42; + A254 = 18; + A255 = 31; + A256 = 25; + A257 = 3; + A258 = 7; + A259 = 8; + A260 = 24; + A261 = 9; + A262 = 6; + A263 = 19; + A264 = 15; + A265 = 10; + A266 = 11; + A267 = 35; + A268 = 20; + A269 = 1; + A270 = 41; + A271 = 12; + A272 = 26; + A273 = 17; + A274 = 34; + A275 = 23; + A276 = 40; + A277 = 46; + A278 = 51; + A279 = 16; + A280 = 30; + A281 = 38; + A282 = 21; + A283 = 22; + A284 = 49; + A285 = 32; + A286 = 36; + A287 = 37; + A288 = 39; + A289 = 48; + A290 = 50; + A291 = 43; + A292 = 44; + } + optional A59 a99 = 1; +} diff --git a/query_benchmark/protos/f24.proto b/query_benchmark/protos/f24.proto new file mode 100644 index 0000000000000..5b8a7edfeee2b --- /dev/null +++ b/query_benchmark/protos/f24.proto @@ -0,0 +1,10 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1; +import "f12.proto"; +message A293 { + optional string a5 = 1; +} diff --git a/query_benchmark/protos/f25.proto b/query_benchmark/protos/f25.proto new file mode 100644 index 0000000000000..c64f666a33a1b --- /dev/null +++ b/query_benchmark/protos/f25.proto @@ -0,0 +1,25 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a260; +enum A294 { + A295 = 0; + A296 = 1; + A297 = 10; + A298 = 20; + A299 = 21; + A300 = 30; + A301 = 40; + A302 = 50; + A303 = 58; + A304 = 60; + A305 = 70; + A306 = 80; + A307 = 1000; +}; +message A308 { + optional A294 a261 = 1; + optional string a262 = 2; +}; diff --git a/query_benchmark/protos/f26.proto b/query_benchmark/protos/f26.proto new file mode 100644 index 0000000000000..0085b34815e82 --- /dev/null +++ b/query_benchmark/protos/f26.proto @@ -0,0 +1,30 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a10.a68; +import "f10.proto"; +import "f5.proto"; +message A309 { + optional int32 a263 = 1; + optional int32 a264 = 2; + optional int32 a265 = 3; + optional string a266 = 4; +} +message A310 { + repeated string a267 = 1; + optional string a268 = 2; + repeated A109 a269 = 15; + optional A309 a270 = 3; + optional A104 a271 = 16; +} +message A311 { + optional string a272 = 1; + message A312 { + optional string a52 = 1; + optional string a273 = 2; + optional string a235 = 15; + } + repeated A312 a79 = 15; +} diff --git a/query_benchmark/protos/f27.proto b/query_benchmark/protos/f27.proto new file mode 100644 index 0000000000000..2cd62c8b49387 --- /dev/null +++ b/query_benchmark/protos/f27.proto @@ -0,0 +1,11 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1; +import "f17.proto"; +import "f12.proto"; +message A321 { + repeated A216 a292 = 1; +} diff --git a/query_benchmark/protos/f28.proto b/query_benchmark/protos/f28.proto new file mode 100644 index 0000000000000..78e1e446d1298 --- /dev/null +++ b/query_benchmark/protos/f28.proto @@ -0,0 +1,79 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1.a349; +message A433 { + oneof a105 { + string a192 = 1; + int32 a355 = 2; + bool a356 = 3; + double a191 = 4; + } +}; +message A434 { + optional string a357 = 1; + optional A435 a358 = 2; +} +message A435 { + oneof a359 { + bool a360 = 1; + A436 a361 = 2; + A437 a362 = 3; + } + message A436 { + optional bool a361 = 1; + } + message A437 { + optional A433 a105 = 1; + } +} +enum A438 { + A439 = 0; + A440 = 1; + A441 = 2; + A442 = 3; + A443 = 4; + A444 = 5; + A445 = 6; + A446 = 7; + A447 = 8; + A448 = 9; + A449 = 10; + A450 = 13; + A451 = 14; + A452 = 15; + A453 = 16; + A454 = 17; +}; +message A455 { + optional A438 a363 = 1; + repeated A456 a364 = 2; +}; +message A456 { + oneof a365 { + A455 a366 = 1; + A434 a367 = 2; + A433 a368 = 3; + } +}; +message A457 { + optional string a98 = 1; +}; +message A431 { + enum A458 { + A459 = 0; + A460 = 1; + A461 = 2; + A462 = 3; + A463 = 4; + A464 = 5; + } + optional A458 a369 = 1; + optional A456 a370 = 2; + optional int32 a371 = 3; + optional int32 a372 = 4; + optional A434 a373 = 5; + optional A457 a374 = 16; +}; diff --git a/query_benchmark/protos/f3.proto b/query_benchmark/protos/f3.proto new file mode 100644 index 0000000000000..e65388134473b --- /dev/null +++ b/query_benchmark/protos/f3.proto @@ -0,0 +1,20 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +import "f13.proto"; +import "f6.proto"; +package a7; +message A9 { + optional bytes a203 = 1; + optional A189 a204 = 2; +} +message A189 { + optional a205.a206.A190 a207 = 1; + message A191 { + optional int64 a208 = 1; + } + optional A191 a209 = 2; + optional A61 a210 = 3; +} diff --git a/query_benchmark/protos/f4.proto b/query_benchmark/protos/f4.proto new file mode 100644 index 0000000000000..14076aea95827 --- /dev/null +++ b/query_benchmark/protos/f4.proto @@ -0,0 +1,81 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +import "f5.proto"; +package a9; +enum A10 { + A11 = 0; + A12 = 1; + A13 = 2; + A14 = 3; + A15 = 4; + A16 = 5; + A17 = 15; + A18 = 6; + A19 = 9; + A20 = 7; + A21 = 8; + A22 = 16; + A23 = 10; + A24 = 11; + A25 = 12; + A26 = 13; + A27 = 14; + A28 = 20; + A29 = 21; + A30 = 22; + A31 = 23; + A32 = 24; + A33 = 207; + A34 = 30; + A35 = 31; + A36 = 32; + A37 = 35; + A38 = 33; + A39 = 34; + A40 = 50; + A41 = 51; + A42 = 52; + A43 = 53; + A44 = 54; + A45 = 55; + A46 = 56; + A47 = 57; + A48 = 100; + A49 = 200; + A50 = 201; + A51 = 202; + A52 = 203; + A53 = 204; + A54 = 205; + A55 = 206; +}; +extend a10.A56 { + optional A10 a11 = 21713708; + optional bool a12 = 21623477; + optional bool a13 = 23459630; + optional bool a14 = 21596320; + optional bool a15 = 26652850; + optional int32 a16 = 53697879; + optional string a17 = 56871503; +}; +extend a10.A57 { + optional A10 a18 = 21713708; + optional bool a19 = 21623477; + optional bool a20 = 21596320; + optional A58 a21 = 21467048; + optional string a22 = 26652850; +} +message A58 { + message A59 { + required string a23 = 1; + required string a24 = 2; + }; + repeated A59 a25 = 1; +}; +extend a10.A60 { + optional bool a26 = 21596320; + optional bool a27 = 28993747; +}; diff --git a/query_benchmark/protos/f5.proto b/query_benchmark/protos/f5.proto new file mode 100644 index 0000000000000..ec7d6d957839d --- /dev/null +++ b/query_benchmark/protos/f5.proto @@ -0,0 +1,351 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a10; +message A108 { + repeated A109 a79 = 1; +} +message A109 { + optional string a52 = 1; + optional string a407 = 2; + repeated string a80 = 3; + repeated int32 a81 = 10; + repeated int32 a82 = 11; + repeated A110 a83 = 4; + repeated A111 a84 = 5; + repeated A112 a85 = 6; + repeated A113 a86 = 7; + optional A60 a87 = 8; + optional A114 a88 = 9; + optional string a408 = 12; +} +message A110 { + optional string a52 = 1; + repeated A113 a73 = 2; + repeated A113 a86 = 6; + repeated A110 a89 = 3; + repeated A111 a84 = 4; + message A115 { + optional int32 a90 = 1; + optional int32 a91 = 2; + optional A116 a87 = 3; + } + repeated A115 a92 = 5; + repeated A117 a93 = 8; + optional A57 a87 = 7; + message A118 { + optional int32 a90 = 1; + optional int32 a91 = 2; + } + repeated A118 a94 = 9; + repeated string a95 = 10; +} +message A116 { + repeated A119 a96 = 999; + extensions 1000 to max; +} +message A113 { + enum A59 { + A120 = 1; + A121 = 2; + A122 = 3; + A123 = 4; + A124 = 5; + A125 = 6; + A126 = 7; + A127 = 8; + A128 = 9; + A129 = 10; + A130 = 11; + A131 = 12; + A132 = 13; + A133 = 14; + A134 = 15; + A135 = 16; + A136 = 17; + A137 = 18; + }; + enum A138 { + A139 = 1; + A140 = 2; + A141 = 3; + }; + optional string a52 = 1; + optional int32 a97 = 3; + optional A138 a98 = 4; + optional A59 a99 = 5; + optional string a100 = 6; + optional string a101 = 2; + optional string a102 = 7; + optional int32 a103 = 9; + optional string a104 = 10; + optional A56 a87 = 8; +} +message A117 { + optional string a52 = 1; + optional A142 a87 = 2; +} +message A111 { + optional string a52 = 1; + repeated A143 a105 = 2; + optional A70 a87 = 3; + message A144 { + optional int32 a90 = 1; + optional int32 a91 = 2; + } + repeated A144 a94 = 4; + repeated string a95 = 5; +} +message A143 { + optional string a52 = 1; + optional int32 a97 = 2; + optional A76 a87 = 3; +} +message A112 { + optional string a52 = 1; + repeated A145 a106 = 2; + repeated A146 a107 = 4; + optional A147 a87 = 3; +} +message A145 { + optional string a52 = 1; + optional string a108 = 2; + optional string a109 = 3; + optional A98 a87 = 4; + optional bool a110 = 5 [default = false]; + optional bool a111 = 6 [default = false]; +} +message A146 { + optional string a52 = 1; + optional string a112 = 2; + optional string a113 = 3; + optional A148 a87 = 4; +} +message A60 { + optional int32 a114 = 2 [default = 2]; + reserved 15; + reserved 22; + optional bool a115 = 24 [default = true]; + reserved 25; + optional string a116 = 1; + optional int32 a117 = 4 [default = 2]; + optional int32 a118 = 5 [default = 2]; + optional bool a119 = 6 [default = true]; + optional bool a120 = 7 [default = true]; + reserved 13; + optional bool a121 = 21 [default = false]; + optional string a122 = 19; + optional bool a123 = 26 [default = false]; + optional string a124 = 8; + optional bool a125 = 10 [default = false]; + optional bool a126 = 27 [default = false]; + optional bool a127 = 28 [default = false]; + optional string a128 = 29; + enum A149 { + A150 = 1; + A151 = 2; + A152 = 3; + } + optional A149 a129 = 9 [default = A150]; + optional string a130 = 11; + optional string a131 = 12; + optional int32 a132 = 14 [default = 1]; + optional bool a133 = 16 [default = false]; + optional bool a134 = 17 [default = false]; + optional bool a135 = 18 [default = false]; + optional bool a136 = 42 [default = false]; + optional bool a31 = 23 [default = false]; + optional bool a137 = 31 [default = false]; + reserved 32; + reserved 33; + reserved 34; + reserved 35; + optional string a138 = 36; + optional string a139 = 37; + optional string a140 = 39; + optional string a141 = 40; + optional string a142 = 41; + optional bool a143 = 43; + optional string a144 = 44; + optional string a145 = 45; + repeated A119 a96 = 999; + extensions 1000 to max; + reserved 38; +} +message A57 { + repeated string a146 = 4; + repeated string a147 = 5; + repeated string a148 = 6; + optional bool a149 = 1 [default = false]; + optional bool a150 = 2 [default = false]; + optional bool a31 = 3 [default = false]; + optional bool a151 = 7; + reserved 8; + reserved 9; + repeated A119 a96 = 999; + extensions 1000 to max; +} +message A56 { + optional A153 a152 = 1 [default = A154]; + enum A153 { + A154 = 0; + A155 = 1; + A156 = 2; + } + optional bool a409 = 2; + optional A157 a153 = 6 [default = A158]; + enum A157 { + A158 = 0; + A159 = 1; + A160 = 2; + } + optional bool a154 = 5 [default = false]; + optional bool a31 = 3 [default = false]; + optional bool a155 = 10 [default = false]; + message A161 { + optional string a52 = 1; + optional string a105 = 2; + }; + repeated A161 a156 = 11; + optional bool a157 = 12 [default = false]; + optional bool a158 = 13 [default = true]; + repeated A119 a96 = 999; + extensions 1000 to max; + reserved 4; +} +message A142 { + repeated A119 a96 = 999; + extensions 1000 to max; +} +message A70 { + optional string a159 = 1; + reserved 4; + optional bool a160 = 2; + optional bool a31 = 3 [default = false]; + reserved 5; + repeated A119 a96 = 999; + extensions 1000 to max; +} +message A76 { + optional bool a31 = 1 [default = false]; + repeated A119 a96 = 999; + extensions 1000 to max; +} +message A147 { + optional bool a161 = 20 [default = false]; + optional double a162 = 16 [default = -1.0]; + optional bool a31 = 33 [default = false]; + repeated A119 a96 = 999; + extensions 1000 to max; +} +message A98 { + enum A162 { + A163 = 0; + A164 = 1; + } + enum A165 { + A67 = 0; + A166 = 1; + A167 = 2; + A168 = 3; + } + enum A169 { + A170 = 0; + A171 = 1; + } + enum A172 { + A173 = 0; + A174 = 1; + A175 = 2; + A176 = 3; + A177 = 4; + } + optional A162 a163 = 7 [default = A163]; + optional double a164 = 8 [default = -1.0]; + optional bool a165 = 9 [default = false]; + optional bool a166 = 10 [default = false]; + optional bool a167 = 26 [default = false]; + optional sint32 a168 = 11 [default = 256]; + optional sint32 a169 = 12 [default = 256]; + optional A165 a170 = 13 [default = A67]; + optional A169 a171 = 15 [default = A170]; + optional A169 a172 = 17 [default = A170]; + optional string a173 = 18; + optional string a174 = 19; + optional bool a110 = 20; + optional bool a111 = 21; + optional string a175 = 22; + optional string a176 = 23; + optional bool a177 = 29; + optional int64 a178 = 24 [default = -1]; + optional int64 a179 = 25 [default = -1]; + enum A178 { + A179 = 0; + A180 = 1; + } + optional A178 a180 = 28 [default = A180]; + optional A172 a181 = 27 [default = A175]; + optional bool a31 = 33 [default = false]; + enum A181 { + A182 = 0; + A183 = 1; + A184 = 2; + } + optional A181 a182 = 34 [default = A182]; + repeated A119 a96 = 999; + extensions 1000 to max; +} +message A148 { + enum A178 { + A179 = 0; + A180 = 1; + } + optional int64 a183 = 1 [default = -1]; + optional int64 a184 = 2 [default = -1]; + optional A178 a185 = 3 [default = A179]; + optional A98.A165 a170 = 4 [default = A67]; + optional string a174 = 5; + optional int32 a168 = 6 [default = 256]; + optional int32 a169 = 7 [default = 256]; + optional double a164 = 8 [default = -1.0]; + optional bool a166 = 9 [default = false]; + optional bool a167 = 10 [default = false]; + optional A98.A172 a181 = 11 [default = A175]; + optional bool a31 = 33 [default = false]; + repeated A119 a96 = 999; + extensions 1000 to max; +} +message A119 { + message A185 { + required string a186 = 1; + required bool a187 = 2; + } + repeated A185 a52 = 2; + optional string a188 = 3; + optional uint64 a189 = 4; + optional int64 a190 = 5; + optional double a191 = 6; + optional bytes a192 = 7; + optional string a193 = 8; +} +message A114 { + repeated A186 a194 = 1; + message A186 { + repeated int32 a195 = 1 [packed = true]; + repeated int32 a196 = 2 [packed = true]; + optional string a197 = 3; + optional string a198 = 4; + repeated string a199 = 6; + } +} +message A187 { + repeated A188 a200 = 1; + message A188 { + repeated int32 a195 = 1 [packed = true]; + optional string a201 = 2; + optional int32 a202 = 3; + optional int32 a91 = 4; + } +} diff --git a/query_benchmark/protos/f6.proto b/query_benchmark/protos/f6.proto new file mode 100644 index 0000000000000..4801eb5b6767e --- /dev/null +++ b/query_benchmark/protos/f6.proto @@ -0,0 +1,14 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a7; +message A61 { + enum A62 { + A63 = 0; + A64 = 1; + A65 = 2; + } + optional A62 a28 = 1; +} diff --git a/query_benchmark/protos/f7.proto b/query_benchmark/protos/f7.proto new file mode 100644 index 0000000000000..9f6e65e929032 --- /dev/null +++ b/query_benchmark/protos/f7.proto @@ -0,0 +1,11 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a0.a1; +enum A66 { + A67 = 0; + A68 = 1; + A69 = 2; +} diff --git a/query_benchmark/protos/f8.proto b/query_benchmark/protos/f8.proto new file mode 100644 index 0000000000000..7583baae48cbc --- /dev/null +++ b/query_benchmark/protos/f8.proto @@ -0,0 +1,63 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a10.a29; +import "f5.proto"; +extend a10.A57 { + optional bool a30 = 147618788; + optional bool a32 = 149418587 [default = true]; + optional string a33 = 190288050; +} +extend a10.A70 { + optional bool a34 = 149419467 [default = true]; + optional bool a35 = 163526403; + optional string a36 = 190295313; +} +enum A71 { + A72 = 0; + A73 = 1; + A74 = 2; + A75 = 3; +} +extend a10.A56 { + optional A71 a37 = 179701954 [default = A73]; +} +extend a10.A76 { + optional bool a38 = 162702653 [default = false]; + optional bool a39 = 163486533 [default = false]; + optional bool a40 = 170261731 [default = false]; + repeated string a41 = 179096040; +} +enum A77 { + A67 = 0; + A78 = 1; + A79 = 2; + A80 = 3; + A81 = 4; + A82 = 5; + A83 = 6; + A84 = 7; + A85 = 8; + A86 = 9; + A87 = 10; + A88 = 11; + A89 = 12; + A90 = 13; + A91 = 14; + A92 = 15; + A93 = 16; + A94 = 17; + A95 = 18; + A96 = 100; + A97 = 101; +} +extend a10.A60 { + optional A77 a42 = 155465253 [default = A67]; + optional bytes a43 = 157245250; + optional bool a44 = 180648220 [default = true]; +} +extend a10.A98 { + optional bool a45 = 211030419; +} diff --git a/query_benchmark/protos/f9.proto b/query_benchmark/protos/f9.proto new file mode 100644 index 0000000000000..1d894a289a065 --- /dev/null +++ b/query_benchmark/protos/f9.proto @@ -0,0 +1,36 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +syntax = "proto2"; +package a46.a47.a1.a48.a49.a4; +message A99 { + optional double a50 = 1; + optional int32 a51 = 2; + optional string a52 = 3; + repeated string a53 = 4; + optional string a54 = 5; + optional string a55 = 6; + optional string a56 = 7; +} +message A100 { + optional double a50 = 1; + optional int32 a51 = 2; + optional string a52 = 3; + optional string a57 = 4; + optional string a54 = 5; + optional bool a58 = 6; + optional float a59 = 7; + optional string a60 = 8; +} +message A101 { + optional string a52 = 1; + optional string a54 = 2; + optional string a61 = 3; + optional int64 a62 = 4; + optional int64 a63 = 5; + optional string a64 = 6; + optional int64 a65 = 7; + optional int64 a66 = 8; + optional bool a67 = 9; +} diff --git a/query_benchmark/pubspec.yaml b/query_benchmark/pubspec.yaml new file mode 100644 index 0000000000000..d6627f0c1bbee --- /dev/null +++ b/query_benchmark/pubspec.yaml @@ -0,0 +1,20 @@ +# Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +# for details. All rights reserved. Use of this source code is governed by a +# BSD-style license that can be found in the LICENSE file. + +name: query_benchmark +description: Measuring encoding and decoding of a "real-world" protobuf. + +environment: + sdk: '>=2.0.0 <3.0.0' + +dependencies: + protobuf: + +dev_dependencies: + protoc_plugin: + path: "../protoc_plugin" + +dependency_overrides: + protobuf: + path: "../protobuf" diff --git a/query_benchmark/run_protoc_plugin.sh b/query_benchmark/run_protoc_plugin.sh new file mode 100755 index 0000000000000..6ff5bec05a895 --- /dev/null +++ b/query_benchmark/run_protoc_plugin.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +pub run protoc_plugin protoc-gen-dart diff --git a/query_benchmark/testdata/500.pb b/query_benchmark/testdata/500.pb new file mode 100644 index 0000000000000..edcc1110c50ac Binary files /dev/null and b/query_benchmark/testdata/500.pb differ diff --git a/tool/travis.sh b/tool/travis.sh index 5f6d8a4101fe3..af0228accebfd 100755 --- a/tool/travis.sh +++ b/tool/travis.sh @@ -19,11 +19,16 @@ EXIT_CODE=0 while (( "$#" )); do TASK=$1 case $TASK in - command) echo - echo -e '\033[1mTASK: command\033[22m' + command_0) echo + echo -e '\033[1mTASK: command_0\033[22m' echo -e 'make protos' make protos || EXIT_CODE=$? ;; + command_1) echo + echo -e '\033[1mTASK: command_1\033[22m' + echo -e './compile_protos.sh' + ./compile_protos.sh || EXIT_CODE=$? + ;; dartanalyzer_0) echo echo -e '\033[1mTASK: dartanalyzer_0\033[22m' echo -e 'dartanalyzer --fatal-infos --fatal-warnings .'