tree: 3c83c156f1212283002d85988e8d0dc6d00f79f9 [path history] [tgz]
  1. datasets/
  2. .gitignore
  3. benchmark_js.dart
  4. benchmark_vm.dart
  5. benchmarks.proto
  6. common.dart
  7. compile-js.sh
  8. compile-protos.sh
  9. d8.dart
  10. README.md
protobuf/benchmarks/README.md

Protobuf Benchmarks

This directory contains protobuf benchmarks adapted from original protobuf library.

These benchmarks cover parsing and serializing protobufs both to binary and JSON formats.

Prerequisites

Before running benchmarks you first need to compile all involved protos, which requires installing protoc and dart-protoc-plugin.

$ cd benchmarks
$ ./compile-protos.sh
# This would produce benchmarks/temp folder with output of protoc.

Running benchmarks on the VM

$ dart benchmarks/benchmark_vm.dart

Running benchmarks via JavaScript (D8)

$ benchmarks/compile-js.sh
$ d8 $DART_SDK/lib/_internal/js_runtime/lib/preambles/d8.js benchmarks/temp/benchmark.js