@@ -31,7 +31,6 @@ DECLARE_int32(request_max_retry);
31
31
DECLARE_int32 (request_timeout_ms);
32
32
DECLARE_uint32 (latest_ttl_max);
33
33
DECLARE_uint32 (absolute_ttl_max);
34
- DECLARE_bool (enable_show_tp);
35
34
36
35
namespace openmldb {
37
36
namespace client {
@@ -767,18 +766,6 @@ bool TabletClient::GetTableFollower(uint32_t tid, uint32_t pid, uint64_t& offset
767
766
return true ;
768
767
}
769
768
770
- void TabletClient::ShowTp () {
771
- if (!FLAGS_enable_show_tp) {
772
- return ;
773
- }
774
- std::sort (percentile_.begin (), percentile_.end ());
775
- uint32_t size = percentile_.size ();
776
- std::cout << " Percentile:99=" << percentile_[(uint32_t )(size * 0.99 )]
777
- << " ,95=" << percentile_[(uint32_t )(size * 0.95 )] << " ,90=" << percentile_[(uint32_t )(size * 0.90 )]
778
- << " ,50=" << percentile_[(uint32_t )(size * 0.5 )] << std::endl;
779
- percentile_.clear ();
780
- }
781
-
782
769
bool TabletClient::Get (uint32_t tid, uint32_t pid, const std::string& pk, uint64_t time, std::string& value,
783
770
uint64_t & ts, std::string& msg) {
784
771
::openmldb::api::GetRequest request;
@@ -787,13 +774,8 @@ bool TabletClient::Get(uint32_t tid, uint32_t pid, const std::string& pk, uint64
787
774
request.set_pid (pid);
788
775
request.set_key (pk);
789
776
request.set_ts (time );
790
- uint64_t consumed = ::baidu::common::timer::get_micros ();
791
777
bool ok =
792
778
client_.SendRequest (&::openmldb::api::TabletServer_Stub::Get, &request, &response, FLAGS_request_timeout_ms, 1 );
793
- if (FLAGS_enable_show_tp) {
794
- consumed = ::baidu::common::timer::get_micros () - consumed;
795
- percentile_.push_back (consumed);
796
- }
797
779
if (response.has_msg ()) {
798
780
msg = response.msg ();
799
781
}
0 commit comments