diff options
author | Josh Haberman <jhaberman@gmail.com> | 2014-12-09 16:01:56 -0800 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2014-12-09 16:01:56 -0800 |
commit | 56913be6bb57f81dbbf7baf9cc9a0a2cd1a36493 (patch) | |
tree | f4d1c17aef4e5d01578ba3fd3926ca863e2792f2 /benchmarks/parsetostruct.proto2_compiled.cc | |
parent | 82be433d4188e0b3b992e463ad52ee148d3ad8de (diff) |
Removed obsolete benchmarks/ and examples/ directories.
Diffstat (limited to 'benchmarks/parsetostruct.proto2_compiled.cc')
-rw-r--r-- | benchmarks/parsetostruct.proto2_compiled.cc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/benchmarks/parsetostruct.proto2_compiled.cc b/benchmarks/parsetostruct.proto2_compiled.cc deleted file mode 100644 index 5b7c18e..0000000 --- a/benchmarks/parsetostruct.proto2_compiled.cc +++ /dev/null @@ -1,37 +0,0 @@ - -#include "main.c" -#include MESSAGE_HFILE -#include <string> -#include <iostream> -#include <sstream> -#include <fstream> - -static std::string str; -MESSAGE_CIDENT msg[NUM_MESSAGES]; - -static bool initialize() -{ - // Read the message data itself. */ - std::ifstream stream(MESSAGE_FILE); - if(!stream.is_open()) { - fprintf(stderr, "Error opening " MESSAGE_FILE ".\n"); - return false; - } - std::stringstream stringstream; - stringstream << stream.rdbuf(); - str = stringstream.str(); - return true; -} - -static void cleanup() -{ -} - -static size_t run(int i) -{ - if(!msg[i%NUM_MESSAGES].ParsePartialFromString(str)) { - fprintf(stderr, "Error parsing with proto2.\n"); - return 0; - } - return str.size(); -} |