Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <vector>
#include <sstream>
#include "runtime/string-value.h"
#include "util/benchmark.h"
#include "util/cpu-info.h"
#include "util/string-parser.h"
#include "common/names.h"
Go to the source code of this file.
Classes | |
struct | TestData< Decimal > |
Macros | |
#define | VALIDATE 0 |
#define | VALIDATE_RESULT(actual, expected, str) |
#define | DIGIT(c) (c -'0') |
Functions | |
void | AddTestData (TestData *data, const string &input) |
void | AddTestData (TestData *data, int n, int32_t min=-10, int32_t max=10, bool leading_space=false, bool trailing_space=false) |
int32_t | AtoiUnsafe (char *s, int len) |
int32_t | AtoiUnrolled (char *s, int len) |
int32_t | AtoiCased (char *s, int len) |
void | TestAtoi (int batch_size, void *d) |
void | TestStrtol (int batch_size, void *d) |
void | TestImpala (int batch_size, void *d) |
void | TestImpalaUnsafe (int batch_size, void *d) |
void | TestImpalaUnrolled (int batch_size, void *d) |
void | TestImpalaCased (int batch_size, void *d) |
int | main (int argc, char **argv) |
#define DIGIT | ( | c | ) | (c -'0') |
Definition at line 84 of file atoi-benchmark.cc.
Referenced by AtoiCased(), AtoiUnrolled(), and AtoiUnsafe().
#define VALIDATE 0 |
Definition at line 43 of file atoi-benchmark.cc.
#define VALIDATE_RESULT | ( | actual, | |
expected, | |||
str | |||
) |
Definition at line 54 of file atoi-benchmark.cc.
Referenced by TestImpala(), TestImpalaCased(), TestImpalaUnrolled(), and TestImpalaUnsafe().
void AddTestData | ( | TestData * | data, |
const string & | input | ||
) |
Definition at line 64 of file atoi-benchmark.cc.
References TestData< Decimal >::data, and TestData< Decimal >::memory.
Referenced by AddTestData(), and main().
void AddTestData | ( | TestData * | data, |
int | n, | ||
int32_t | min = -10 , |
||
int32_t | max = 10 , |
||
bool | leading_space = false , |
||
bool | trailing_space = false |
||
) |
Definition at line 70 of file atoi-benchmark.cc.
References AddTestData().
|
inline |
Definition at line 135 of file atoi-benchmark.cc.
References AtoiUnsafe(), DIGIT, and LIKELY.
Referenced by TestImpalaCased().
|
inline |
Definition at line 102 of file atoi-benchmark.cc.
References AtoiUnsafe(), DIGIT, and LIKELY.
Referenced by TestImpalaUnrolled().
|
inline |
Definition at line 86 of file atoi-benchmark.cc.
References DIGIT.
Referenced by AtoiCased(), AtoiUnrolled(), and TestImpalaUnsafe().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 241 of file atoi-benchmark.cc.
References impala::Benchmark::AddBenchmark(), AddTestData(), TestData< Decimal >::data, impala::Benchmark::GetMachineInfo(), impala::CpuInfo::Init(), impala::Benchmark::Measure(), TestData< Decimal >::result, TestAtoi(), TestImpala(), TestImpalaCased(), TestImpalaUnrolled(), TestImpalaUnsafe(), and TestStrtol().
void TestAtoi | ( | int | batch_size, |
void * | d | ||
) |
Definition at line 168 of file atoi-benchmark.cc.
References TestData< Decimal >::data, and TestData< Decimal >::result.
Referenced by main().
void TestImpala | ( | int | batch_size, |
void * | d | ||
) |
Definition at line 188 of file atoi-benchmark.cc.
References TestData< Decimal >::data, impala::StringValue::len, impala::StringValue::ptr, TestData< Decimal >::result, and VALIDATE_RESULT.
Referenced by main().
void TestImpalaCased | ( | int | batch_size, |
void * | d | ||
) |
Definition at line 228 of file atoi-benchmark.cc.
References AtoiCased(), TestData< Decimal >::data, impala::StringValue::len, impala::StringValue::ptr, TestData< Decimal >::result, and VALIDATE_RESULT.
Referenced by main().
void TestImpalaUnrolled | ( | int | batch_size, |
void * | d | ||
) |
Definition at line 215 of file atoi-benchmark.cc.
References AtoiUnrolled(), TestData< Decimal >::data, impala::StringValue::len, impala::StringValue::ptr, TestData< Decimal >::result, and VALIDATE_RESULT.
Referenced by main().
void TestImpalaUnsafe | ( | int | batch_size, |
void * | d | ||
) |
Definition at line 202 of file atoi-benchmark.cc.
References AtoiUnsafe(), TestData< Decimal >::data, impala::StringValue::len, impala::StringValue::ptr, TestData< Decimal >::result, and VALIDATE_RESULT.
Referenced by main().
void TestStrtol | ( | int | batch_size, |
void * | d | ||
) |
Definition at line 178 of file atoi-benchmark.cc.
References TestData< Decimal >::data, and TestData< Decimal >::result.
Referenced by main().