From 306bc554c67c23ddd52e5ece0e3971214b2da4e7 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Tue, 4 Aug 2009 22:06:02 -0700 Subject: More work on benchmarks (performance tests). --- benchmarks/parsetostruct.proto2_compiled.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'benchmarks/parsetostruct.proto2_compiled.cc') diff --git a/benchmarks/parsetostruct.proto2_compiled.cc b/benchmarks/parsetostruct.proto2_compiled.cc index 339e184..4091ed0 100644 --- a/benchmarks/parsetostruct.proto2_compiled.cc +++ b/benchmarks/parsetostruct.proto2_compiled.cc @@ -7,7 +7,7 @@ #include static std::string str; -MESSAGE_CIDENT msg; +MESSAGE_CIDENT msg[NUM_MESSAGES]; static bool initialize() { @@ -27,9 +27,9 @@ static void cleanup() { } -static size_t run() +static size_t run(int i) { - if(!msg.ParseFromString(str)) { + if(!msg[i%NUM_MESSAGES].ParseFromString(str)) { fprintf(stderr, "Error parsing with proto2.\n"); return 0; } -- cgit v1.2.3