PageRenderTime 30ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/thirdparty/breakpad/third_party/protobuf/protobuf/benchmarks/readme.txt

http://github.com/tomahawk-player/tomahawk
Plain Text | 50 lines | 37 code | 13 blank | 0 comment | 0 complexity | e994988f4a7e8d74c2c88f68e404c305 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, GPL-3.0, GPL-2.0
  1. Contents
  2. --------
  3. This folder contains three kinds of file:
  4. - Code, such as ProtoBench.java, to build the benchmarking framework.
  5. - Protocol buffer definitions (.proto files)
  6. - Sample data files
  7. If we end up with a lot of different benchmarks it may be worth
  8. separating these out info different directories, but while there are
  9. so few they might as well all be together.
  10. Running a benchmark (Java)
  11. --------------------------
  12. 1) Build protoc and the Java protocol buffer library. The examples
  13. below assume a jar file (protobuf.jar) has been built and copied
  14. into this directory.
  15. 2) Build ProtoBench:
  16. $ javac -d tmp -cp protobuf.jar ProtoBench.java
  17. 3) Generate code for the relevant benchmark protocol buffer, e.g.
  18. $ protoc --java_out=tmp google_size.proto google_speed.proto
  19. 4) Build the generated code, e.g.
  20. $ cd tmp
  21. $ javac -d . -cp ../protobuf.jar benchmarks/*.java
  22. 5) Run the test. Arguments are given in pairs - the first argument
  23. is the descriptor type; the second is the filename. For example:
  24. $ java -cp .;../protobuf.jar com.google.protocolbuffers.ProtoBench
  25. benchmarks.GoogleSize$SizeMessage1 ../google_message1.dat
  26. benchmarks.GoogleSpeed$SpeedMessage1 ../google_message1.dat
  27. benchmarks.GoogleSize$SizeMessage2 ../google_message2.dat
  28. benchmarks.GoogleSpeed$SpeedMessage2 ../google_message2.dat
  29. 6) Wait! Each test runs for around 30 seconds, and there are 6 tests
  30. per class/data combination. The above command would therefore take
  31. about 12 minutes to run.
  32. Benchmarks available
  33. --------------------
  34. From Google:
  35. google_size.proto and google_speed.proto, messages
  36. google_message1.dat and google_message2.dat. The proto files are
  37. equivalent, but optimized differently.