blob: 7a4e97726e5f0fadaf8fd60d8f0b026a4a92f1d1 [file] [log] [blame]
// 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:protobuf_benchmarks/benchmark_base.dart';
import 'package:protobuf_benchmarks/generated/f0.pb.dart' as f0;
import 'package:protobuf_benchmarks/readfile.dart';
class Benchmark extends BenchmarkBase {
final f0.A0 _input;
Benchmark(super.name, List<int> input) : _input = f0.A0.fromBuffer(input);
@override
void run() {
_input.writeToJson();
}
}
void main() {
final List<int> encoded = readfile('datasets/query_benchmark.pb');
Benchmark('query_encode_json', encoded).report();
}