mirror of https://github.com/milvus-io/milvus.git
[skip ci] change type of tps and qps from int64_t to double (#4705)
fix bug: QPS will be zero when TPS is less than 1 in sdk/examples/sdk_qps Signed-off-by: WangJian <wangjian4500@gmail.com>pull/4713/head
parent
c8dec9f02f
commit
3cd1b37278
|
@ -336,9 +336,8 @@ ClientTest::Search() {
|
|||
std::chrono::system_clock::time_point end = std::chrono::system_clock::now();
|
||||
int64_t span = (std::chrono::duration_cast<std::chrono::milliseconds>(end - start)).count();
|
||||
double sec = (double)span / 1000.0;
|
||||
double tps_s = parameters_.query_count_ / sec;
|
||||
int64_t tps = (int64_t)tps_s;
|
||||
int64_t qps = tps * parameters_.nq_;
|
||||
double tps = parameters_.query_count_ / sec;
|
||||
double qps = tps * parameters_.nq_;
|
||||
std::cout << "TPS = " << tps << " \tQPS = " << qps << std::endl;
|
||||
|
||||
// print search detail statistics
|
||||
|
|
Loading…
Reference in New Issue