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

Side by Side Diff: benchmark/lib/benchmarks/repeated_int32_json.dart

Issue 1829573002: Fix all strong mode warnings in protoc-plugin (Closed) Base URL: git@github.com:dart-lang/dart-protoc-plugin.git@master
Patch Set: regenerate pb.dart files Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library protoc.benchmark.repeated_int32_json; 5 library protoc.benchmark.repeated_int32_json;
6 6
7 import '../benchmark.dart'; 7 import '../benchmark.dart';
8 import '../generated/benchmark.pb.dart' show BenchmarkID, Request, Params, Sampl e; 8 import '../generated/benchmark.pb.dart'
9 show BenchmarkID, Request, Params, Sample;
9 import '../generated/int32grid.pb.dart' as pb; 10 import '../generated/int32grid.pb.dart' as pb;
10 11
11 /// A benchmark that deserializes a grid of repeated ints. 12 /// A benchmark that deserializes a grid of repeated ints.
12 class RepeatedInt32Benchmark extends Benchmark { 13 class RepeatedInt32Benchmark extends Benchmark {
13 final int width; 14 final int width;
14 final int height; 15 final int height;
15 String json; 16 String json;
16 17
17 RepeatedInt32Benchmark(this.width, this.height) : super($id); 18 RepeatedInt32Benchmark(this.width, this.height) : super($id);
18 19
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 62 }
62 63
63 @override 64 @override
64 measureSample(Sample s) => int32ReadsPerMillisecond(s); 65 measureSample(Sample s) => int32ReadsPerMillisecond(s);
65 66
66 @override 67 @override
67 get measureSampleUnits => "int32 reads/ms"; 68 get measureSampleUnits => "int32 reads/ms";
68 69
69 static const $id = BenchmarkID.READ_INT32_REPEATED_JSON; 70 static const $id = BenchmarkID.READ_INT32_REPEATED_JSON;
70 static final $type = new BenchmarkType($id, $create); 71 static final $type = new BenchmarkType($id, $create);
71 static $create(Request r) { 72 static RepeatedInt32Benchmark $create(Request r) {
72 assert(r.params.hasInt32RepeatCount()); 73 assert(r.params.hasInt32RepeatCount());
73 assert(r.params.hasMessageCount()); 74 assert(r.params.hasMessageCount());
74 return new RepeatedInt32Benchmark( 75 return new RepeatedInt32Benchmark(
75 r.params.int32RepeatCount, r.params.messageCount); 76 r.params.int32RepeatCount, r.params.messageCount);
76 } 77 }
77 } 78 }
OLDNEW
« no previous file with comments | « benchmark/lib/benchmarks/int64_json.dart ('k') | benchmark/lib/benchmarks/repeated_int64_json.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698