MCPcopy Create free account
hub / github.com/baidu/tera / EncodeTeraKeyPerformanceTest

Function EncodeTeraKeyPerformanceTest

src/leveldb/util/raw_key_operator_test.cc:256–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void EncodeTeraKeyPerformanceTest(const RawKeyOperator* key_operator, const std::string& row,
257 const std::string& col, const std::string& qual, int64_t ts,
258 TeraKeyType type, const std::string& desc) {
259 std::string tera_key;
260 int64_t start = get_micros();
261 for (int i = 0; i < 10000000; ++i) {
262 key_operator->EncodeTeraKey(row, col, qual, ts, type, &tera_key);
263 }
264 int64_t end = get_micros();
265 std::cout << "[Encode TeraKey Performance (" << desc << ")] cost: " << (end - start) / 1000
266 << "ms\n";
267}
268
269TEST(RawKeyOperatorTest, EncodeTeraKeyPerformace) {
270 const RawKeyOperator* keyop_bin = BinaryRawKeyOperator();

Callers 1

TESTFunction · 0.85

Calls 2

get_microsFunction · 0.70
EncodeTeraKeyMethod · 0.45

Tested by

no test coverage detected