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
1affbd87
Commit
1affbd87
authored
Sep 12, 2016
by
Feng Xiao
Committed by
GitHub
Sep 12, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2021 from zlim/bench-fix
benchmarks: update readme.txt
parents
4f032cd9
f5c7a489
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
readme.txt
benchmarks/readme.txt
+9
-13
No files found.
benchmarks/readme.txt
View file @
1affbd87
...
@@ -22,29 +22,25 @@ Running a benchmark (Java)
...
@@ -22,29 +22,25 @@ Running a benchmark (Java)
$ javac -d tmp -cp protobuf.jar ProtoBench.java
$ javac -d tmp -cp protobuf.jar ProtoBench.java
3) Generate code for the relevant benchmark protocol buffer, e.g.
3) Generate code for the relevant benchmark protocol buffer, e.g.
$ protoc --java_out=tmp google_size.proto
google_speed.proto
$ protoc --java_out=tmp google_size.proto
4) Build the generated code, e.g.
4) Build the generated code, e.g.
$ cd tmp
$ javac -d tmp -cp protobuf.jar tmp/benchmarks/*.java
$ javac -d . -cp ../protobuf.jar benchmarks/*.java
5) Run the test. Arguments are given in pairs - the first argument
5) Run the test. Arguments are given in pairs - the first argument
is the descriptor type; the second is the filename. For example:
is the descriptor type; the second is the filename. For example:
$ java -cp .;../protobuf.jar com.google.protocolbuffers.ProtoBench
$ java -cp tmp:protobuf.jar com.google.protocolbuffers.ProtoBench \
benchmarks.GoogleSize$SizeMessage1 ../google_message1.dat
'benchmarks.GoogleSize$SizeMessage1' google_message1.dat \
benchmarks.GoogleSpeed$SpeedMessage1 ../google_message1.dat
'benchmarks.GoogleSize$SizeMessage2' google_message2.dat
benchmarks.GoogleSize$SizeMessage2 ../google_message2.dat
benchmarks.GoogleSpeed$SpeedMessage2 ../google_message2.dat
6) Wait! Each test runs for around 30 seconds, and there are
6
tests
6) Wait! Each test runs for around 30 seconds, and there are
8
tests
per class/data combination. The above command would therefore take
per class/data combination. The above command would therefore take
about
12
minutes to run.
about
8
minutes to run.
Benchmarks available
Benchmarks available
--------------------
--------------------
From Google:
From Google:
google_size.proto and google_speed.proto, messages
google_size.proto,
google_message1.dat and google_message2.dat. The proto files are
messages google_message1.dat and google_message2.dat.
equivalent, but optimized differently.
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