Revert "THRIFT-2729: C++ - .clang-format created and applied"
This reverts commit 74260aa9099c3bb209bc8e524b0e8ba603f62c41.
diff --git a/lib/cpp/test/Benchmark.cpp b/lib/cpp/test/Benchmark.cpp
index cf6b79a..3571150 100644
--- a/lib/cpp/test/Benchmark.cpp
+++ b/lib/cpp/test/Benchmark.cpp
@@ -34,8 +34,12 @@
public:
timeval vStart;
- Timer() { THRIFT_GETTIMEOFDAY(&vStart, 0); }
- void start() { THRIFT_GETTIMEOFDAY(&vStart, 0); }
+ Timer() {
+ THRIFT_GETTIMEOFDAY(&vStart, 0);
+ }
+ void start() {
+ THRIFT_GETTIMEOFDAY(&vStart, 0);
+ }
double frame() {
timeval vEnd;
@@ -44,6 +48,7 @@
double dend = vEnd.tv_sec + ((double)vEnd.tv_usec / 1000000.0);
return dend - dstart;
}
+
};
int main() {
@@ -54,15 +59,15 @@
using namespace boost;
OneOfEach ooe;
- ooe.im_true = true;
- ooe.im_false = false;
- ooe.a_bite = 0x7f;
+ ooe.im_true = true;
+ ooe.im_false = false;
+ ooe.a_bite = 0x7f;
ooe.integer16 = 27000;
- ooe.integer32 = 1 << 24;
+ ooe.integer32 = 1<<24;
ooe.integer64 = (uint64_t)6000 * 1000 * 1000;
ooe.double_precision = M_PI;
- ooe.some_characters = "JSON THIS! \"\1";
- ooe.zomg_unicode = "\xd7\n\a\t";
+ ooe.some_characters = "JSON THIS! \"\1";
+ ooe.zomg_unicode = "\xd7\n\a\t";
ooe.base64 = "\1\2\3\255";
boost::shared_ptr<TMemoryBuffer> buf(new TMemoryBuffer());
@@ -72,7 +77,7 @@
{
Timer timer;
- for (int i = 0; i < num; i++) {
+ for (int i = 0; i < num; i ++) {
buf->resetBuffer();
TBinaryProtocolT<TBufferBase> prot(buf);
ooe.write(&prot);
@@ -89,17 +94,18 @@
Timer timer;
- for (int i = 0; i < num; i++) {
+ for (int i = 0; i < num; i ++) {
OneOfEach ooe2;
boost::shared_ptr<TMemoryBuffer> buf2(new TMemoryBuffer(data, datasize));
- // buf2->resetBuffer(data, datasize);
+ //buf2->resetBuffer(data, datasize);
TBinaryProtocolT<TBufferBase> prot(buf2);
ooe2.read(&prot);
- // cout << apache::thrift::ThriftDebugString(ooe2) << endl << endl;
+ //cout << apache::thrift::ThriftDebugString(ooe2) << endl << endl;
}
cout << " Read: " << num / (1000 * timer.frame()) << " kHz" << endl;
}
+
return 0;
}