summaryrefslogtreecommitdiff
path: root/benchmark/benchmark.cc
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-07-20 10:52:37 -0700
committerJoshua Haberman <joshua@reverberate.org>2009-07-20 10:52:37 -0700
commit1e388b0af3d7c2384cd350a349ba756914620466 (patch)
treed2b515f706dc15ba18b74c0cfd2da5a7052be468 /benchmark/benchmark.cc
parent293cbe5135d64a1c85bb5125d9d4a1f6f39886f8 (diff)
Significant, experimental changes (setjmp/longjmp, group handling).
Diffstat (limited to 'benchmark/benchmark.cc')
-rw-r--r--benchmark/benchmark.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/benchmark/benchmark.cc b/benchmark/benchmark.cc
index 10713a8..95709bc 100644
--- a/benchmark/benchmark.cc
+++ b/benchmark/benchmark.cc
@@ -73,19 +73,19 @@ int main ()
upb_msgdata_free(data, m, true);
upb_context_free(&c);
- benchmarks::SpeedMessage2 msg;
- std::string stlstr(str.ptr, str.byte_len);
- upb_strfree(str);
- total = 0;
- before = clock();
- for(int i = 0; i < 2000; i++) {
- if(!msg.ParseFromString(stlstr)) {
- fprintf(stderr, "Error parsing with proto2.\n");
- return 1;
- }
- total += str.byte_len;
- }
- elapsed = ((double)clock() - before) / CLOCKS_PER_SEC;
- fprintf(stderr, "proto2 parsed %sB, ", eng(total, 3, false));
- fprintf(stderr, "%sB/s\n", eng(total/elapsed, 3, false));
+ //benchmarks::SpeedMessage2 msg;
+ //std::string stlstr(str.ptr, str.byte_len);
+ //upb_strfree(str);
+ //total = 0;
+ //before = clock();
+ //for(int i = 0; i < 2000; i++) {
+ // if(!msg.ParseFromString(stlstr)) {
+ // fprintf(stderr, "Error parsing with proto2.\n");
+ // return 1;
+ // }
+ // total += str.byte_len;
+ //}
+ //elapsed = ((double)clock() - before) / CLOCKS_PER_SEC;
+ //fprintf(stderr, "proto2 parsed %sB, ", eng(total, 3, false));
+ //fprintf(stderr, "%sB/s\n", eng(total/elapsed, 3, false));
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback