Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
5a95666f
Commit
5a95666f
authored
Aug 08, 2018
by
Yilun Chong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix filename and newline
parent
a7071291
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
15 deletions
+15
-15
Makefile.am
benchmarks/Makefile.am
+5
-5
benchmark_suite.js
benchmarks/js/benchmark_suite.js
+1
-1
js_benchmark.js
benchmarks/js/js_benchmark.js
+3
-3
generate_pbjs_files.js
benchmarks/protobuf.js/generate_pbjs_files.js
+2
-2
protobufjs_benchmark.js
benchmarks/protobuf.js/protobufjs_benchmark.js
+4
-4
No files found.
benchmarks/Makefile.am
View file @
5a95666f
...
...
@@ -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/
BenchmarkS
uite.js tmp/protobuf.js
cp
js/
benchmark_s
uite.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
GeneratedBundleC
ode.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_c
ode.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"
GeneratedBundleC
ode.js'
>>
pbjs-benchmark
@
echo
'
node ProtobufJsB
enchmark.js $$@'
>>
pbjs-benchmark
@
echo
'sed -i "s/protobufjs/.\/protobuf.js/g"
generated_bundle_c
ode.js'
>>
pbjs-benchmark
@
echo
'
env NODE_PATH=".:./node_modules:$$NODE_PATH" node protobufjs_b
enchmark.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 JsB
enchmark.js $$@'
>>
js-benchmark
@
echo
'env NODE_PATH="$$TOP_JS_SRCDIR:.
:./node_modules:$$NODE_PATH" node --max-old-space-size=4096 js_b
enchmark.js $$@'
>>
js-benchmark
@
chmod
+x js-benchmark
js
:
js-benchmark
...
...
benchmarks/js/
BenchmarkS
uite.js
→
benchmarks/js/
benchmark_s
uite.js
View file @
5a95666f
var
benchmark
=
require
(
"
./node_modules/
benchmark"
);
var
benchmark
=
require
(
"benchmark"
);
function
newBenchmark
(
messageName
,
filename
,
language
)
{
var
benches
=
[];
...
...
benchmarks/js/
JsB
enchmark.js
→
benchmarks/js/
js_b
enchmark.js
View file @
5a95666f
...
...
@@ -6,7 +6,7 @@ require('./datasets/google_message4/benchmark_message4_pb.js');
require
(
'./benchmarks_pb.js'
);
var
fs
=
require
(
'fs'
);
var
benchmarkSuite
=
require
(
"./
BenchmarkS
uite.js"
);
var
benchmarkSuite
=
require
(
"./
benchmark_s
uite.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
(
"#####################################################"
);
benchmarks/protobuf.js/
GeneratePbjsF
iles.js
→
benchmarks/protobuf.js/
generate_pbjs_f
iles.js
View file @
5a95666f
...
...
@@ -21,4 +21,5 @@ pbjs.main(argv, function(err, output){
if
(
err
)
{
console
.
log
(
err
);
}
});
\ No newline at end of file
});
benchmarks/protobuf.js/
ProtobufJsB
enchmark.js
→
benchmarks/protobuf.js/
protobufjs_b
enchmark.js
View file @
5a95666f
var
root
=
require
(
"./
GeneratedBundleC
ode.js"
);
var
root
=
require
(
"./
generated_bundle_c
ode.js"
);
var
fs
=
require
(
'fs'
);
var
benchmark
=
require
(
"./node_modules/benchmark"
);
var
benchmarkSuite
=
require
(
"./
BenchmarkS
uite.js"
);
var
benchmarkSuite
=
require
(
"./
benchmark_s
uite.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
(
"#####################################################"
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment