diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-08-04 19:46:42 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-08-04 19:46:42 -0700 |
commit | 84cd1538ee20b934c6892f38578a08106a934fe8 (patch) | |
tree | ecfc5baa4d47a276bf1509243778ae7940e08e83 /benchmark/parsetostruct_proto2_compiled.cc | |
parent | 2aaea5390a841e2682a318746e90aebbe8a955b9 (diff) |
Integrated benchmarks into main Makefile.
Diffstat (limited to 'benchmark/parsetostruct_proto2_compiled.cc')
-rw-r--r-- | benchmark/parsetostruct_proto2_compiled.cc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/benchmark/parsetostruct_proto2_compiled.cc b/benchmark/parsetostruct_proto2_compiled.cc deleted file mode 100644 index 339e184..0000000 --- a/benchmark/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; - -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() -{ - if(!msg.ParseFromString(str)) { - fprintf(stderr, "Error parsing with proto2.\n"); - return 0; - } - return str.size(); -} |