23 #include "util/thrift-util.h"
24 #include "gen-cpp/Types_types.h"
26 #include <boost/shared_ptr.hpp>
27 #include <boost/thread/mutex.hpp>
28 #include <boost/thread.hpp>
29 #include <thrift/protocol/TBinaryProtocol.h>
31 #include <thrift/TApplicationException.h>
32 #include <thrift/transport/TBufferTransports.h>
33 #include <boost/uuid/uuid.hpp>
34 #include <boost/uuid/uuid_generators.hpp>
36 using namespace impala;
38 using namespace boost;
39 using namespace boost::uuids;
47 for (
int i = 0; i < n * 10; ++i) {
54 for (
int i = 0; i < n * 10; ++i) {
55 boost::uuids::random_generator uuid_generator;
56 uuid query_uuid = uuid_generator();
61 cout <<
"Size: " << size;
62 vector<boost::thread*> threads;
63 for (
int i = 0; i < 2; ++i) {
67 for (
int i = 0; i< threads.size(); ++i) {
74 vector<boost::thread*> threads;
75 for (
int i = 0; i < 2; ++i) {
79 for (
int i = 0; i< threads.size(); ++i) {
86 int main(
int argc,
char **argv) {
int AddBenchmark(const std::string &name, BenchmarkFunction fn, void *args, int baseline_idx=0)
void TestSharedThreaded(int size, void *d)
void TestOwnThreaded(int size, void *d)
std::string Measure()
Runs all the benchmarks and returns the result in a formatted string.
static boost::uuids::random_generator uuid_generator_
void TestOwnGenerator(int n)
int main(int argc, char **argv)
void TestSharedGenerator(int n)
static void Init()
Initialize CpuInfo.