| 254 | } |
| 255 | |
| 256 | void 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 | |
| 269 | TEST(RawKeyOperatorTest, EncodeTeraKeyPerformace) { |
| 270 | const RawKeyOperator* keyop_bin = BinaryRawKeyOperator(); |
no test coverage detected