diff options
author | Yilun Chong <yilunchong@google.com> | 2018-08-08 11:24:09 -0700 |
---|---|---|
committer | Yilun Chong <yilunchong@google.com> | 2018-08-08 11:24:09 -0700 |
commit | 5a95666f6e3f1cae3fdd790d992a45c0b64c3b13 (patch) | |
tree | 0b5f23413cb4bc2f60606d4a38a127d16aa38d3f /benchmarks | |
parent | a7071291c750fe2b1b8a20c155f4e3dd5a38db24 (diff) | |
download | protobuf-5a95666f6e3f1cae3fdd790d992a45c0b64c3b13.tar.gz protobuf-5a95666f6e3f1cae3fdd790d992a45c0b64c3b13.tar.bz2 protobuf-5a95666f6e3f1cae3fdd790d992a45c0b64c3b13.zip |
fix filename and newline
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/Makefile.am | 10 | ||||
-rw-r--r-- | benchmarks/js/benchmark_suite.js (renamed from benchmarks/js/BenchmarkSuite.js) | 2 | ||||
-rw-r--r-- | benchmarks/js/js_benchmark.js (renamed from benchmarks/js/JsBenchmark.js) | 5 | ||||
-rw-r--r-- | benchmarks/protobuf.js/generate_pbjs_files.js (renamed from benchmarks/protobuf.js/GeneratePbjsFiles.js) | 3 | ||||
-rw-r--r-- | benchmarks/protobuf.js/protobufjs_benchmark.js (renamed from benchmarks/protobuf.js/ProtobufJsBenchmark.js) | 7 |
5 files changed, 15 insertions, 12 deletions
diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am index 4bf20d5e..b3b7a5df 100644 --- a/benchmarks/Makefile.am +++ b/benchmarks/Makefile.am @@ -555,18 +555,18 @@ pbjs_preparation: cd protobuf.js && npm install && npm run build cd tmp/protobuf.js && npm install benchmark cp protobuf.js/* tmp/protobuf.js - cp js/BenchmarkSuite.js tmp/protobuf.js + cp js/benchmark_suite.js tmp/protobuf.js touch pbjs_preparation pbjs_middleman: pbjs_preparation - export OLDDIR=$$(pwd) && cd tmp/protobuf.js && node GeneratePbjsFiles.js --target static-module --include_path=$$OLDDIR -o GeneratedBundleCode.js $(benchmarks_protoc_inputs) $(benchmarks_protoc_inputs_benchmark_wrapper) $(benchmarks_protoc_inputs_proto2) + export OLDDIR=$$(pwd) && cd tmp/protobuf.js && node generate_pbjs_files.js --target static-module --include_path=$$OLDDIR -o generated_bundle_code.js $(benchmarks_protoc_inputs) $(benchmarks_protoc_inputs_benchmark_wrapper) $(benchmarks_protoc_inputs_proto2) touch pbjs_middleman pbjs-benchmark: pbjs_middleman @echo '#! /bin/bash' > pbjs-benchmark @echo 'cd tmp/protobuf.js' >> pbjs-benchmark - @echo 'sed -i "s/protobufjs/.\/protobuf.js/g" GeneratedBundleCode.js' >> pbjs-benchmark - @echo 'node ProtobufJsBenchmark.js $$@' >> pbjs-benchmark + @echo 'sed -i "s/protobufjs/.\/protobuf.js/g" generated_bundle_code.js' >> pbjs-benchmark + @echo 'env NODE_PATH=".:./node_modules:$$NODE_PATH" node protobufjs_benchmark.js $$@' >> pbjs-benchmark @chmod +x pbjs-benchmark pbjs: pbjs-benchmark @@ -591,7 +591,7 @@ js-benchmark: js_middleman @echo '#! /bin/bash' > js-benchmark @echo 'export TOP_JS_SRCDIR=$$(cd $(top_srcdir)/js && pwd)' >> js-benchmark @echo 'cd tmp/js' >> js-benchmark - @echo 'env NODE_PATH="$$TOP_JS_SRCDIR:." node --max-old-space-size=4096 JsBenchmark.js $$@' >> js-benchmark + @echo 'env NODE_PATH="$$TOP_JS_SRCDIR:.:./node_modules:$$NODE_PATH" node --max-old-space-size=4096 js_benchmark.js $$@' >> js-benchmark @chmod +x js-benchmark js: js-benchmark diff --git a/benchmarks/js/BenchmarkSuite.js b/benchmarks/js/benchmark_suite.js index 73ab373c..c95024b2 100644 --- a/benchmarks/js/BenchmarkSuite.js +++ b/benchmarks/js/benchmark_suite.js @@ -1,4 +1,4 @@ -var benchmark = require("./node_modules/benchmark"); +var benchmark = require("benchmark"); function newBenchmark(messageName, filename, language) { var benches = []; diff --git a/benchmarks/js/JsBenchmark.js b/benchmarks/js/js_benchmark.js index bf182449..14905e31 100644 --- a/benchmarks/js/JsBenchmark.js +++ b/benchmarks/js/js_benchmark.js @@ -6,7 +6,7 @@ require('./datasets/google_message4/benchmark_message4_pb.js'); require('./benchmarks_pb.js'); var fs = require('fs'); -var benchmarkSuite = require("./BenchmarkSuite.js"); +var benchmarkSuite = require("./benchmark_suite.js"); function getNewPrototype(name) { @@ -66,4 +66,5 @@ process.argv.forEach(function(filename, index) { + senarios.benches[1] * totalBytes / 1024 / 1024 + "MB/s" ); console.log(""); }); -console.log("#####################################################");
\ No newline at end of file +console.log("#####################################################"); + diff --git a/benchmarks/protobuf.js/GeneratePbjsFiles.js b/benchmarks/protobuf.js/generate_pbjs_files.js index d0e9c66d..11945bf9 100644 --- a/benchmarks/protobuf.js/GeneratePbjsFiles.js +++ b/benchmarks/protobuf.js/generate_pbjs_files.js @@ -21,4 +21,5 @@ pbjs.main(argv, function(err, output){ if (err) { console.log(err); } -});
\ No newline at end of file +}); + diff --git a/benchmarks/protobuf.js/ProtobufJsBenchmark.js b/benchmarks/protobuf.js/protobufjs_benchmark.js index 7a1a7d56..2629e9f4 100644 --- a/benchmarks/protobuf.js/ProtobufJsBenchmark.js +++ b/benchmarks/protobuf.js/protobufjs_benchmark.js @@ -1,7 +1,7 @@ -var root = require("./GeneratedBundleCode.js"); +var root = require("./generated_bundle_code.js"); var fs = require('fs'); var benchmark = require("./node_modules/benchmark"); -var benchmarkSuite = require("./BenchmarkSuite.js"); +var benchmarkSuite = require("./benchmark_suite.js"); function getNewPrototype(name) { @@ -62,4 +62,5 @@ process.argv.forEach(function(filename, index) { + senarios.benches[1] * totalBytes / 1024 / 1024 + "MB/s" ); console.log(""); }); -console.log("#####################################################");
\ No newline at end of file +console.log("#####################################################"); + |