]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/msgr: print out informative messages to stdout 34136/head
authorKefu Chai <kchai@redhat.com>
Tue, 24 Mar 2020 05:43:20 +0000 (13:43 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 24 Mar 2020 05:45:24 +0000 (13:45 +0800)
they should not goto stderr

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/msgr/perf_msgr_client.cc

index 669b743b4a23fea262c05f6eaf9f44776cdf2ede..cb342755678dcd7037837c8d0446262b4a798a9f 100644 (file)
@@ -166,13 +166,13 @@ void MessengerClient::ClientDispatcher::ms_fast_dispatch(Message *m) {
 
 
 void usage(const string &name) {
-  cerr << "Usage: " << name << " [server ip:port] [numjobs] [concurrency] [ios] [thinktime us] [msg length]" << std::endl;
-  cerr << "       [server ip:port]: connect to the ip:port pair" << std::endl;
-  cerr << "       [numjobs]: how much client threads spawned and do benchmark" << std::endl;
-  cerr << "       [concurrency]: the max inflight messages(like iodepth in fio)" << std::endl;
-  cerr << "       [ios]: how much messages sent for each client" << std::endl;
-  cerr << "       [thinktime]: sleep time when do fast dispatching(match client logic)" << std::endl;
-  cerr << "       [msg length]: message data bytes" << std::endl;
+  cout << "Usage: " << name << " [server ip:port] [numjobs] [concurrency] [ios] [thinktime us] [msg length]" << std::endl;
+  cout << "       [server ip:port]: connect to the ip:port pair" << std::endl;
+  cout << "       [numjobs]: how much client threads spawned and do benchmark" << std::endl;
+  cout << "       [concurrency]: the max inflight messages(like iodepth in fio)" << std::endl;
+  cout << "       [ios]: how much messages sent for each client" << std::endl;
+  cout << "       [thinktime]: sleep time when do fast dispatching(match client logic)" << std::endl;
+  cout << "       [msg length]: message data bytes" << std::endl;
 }
 
 int main(int argc, char **argv)
@@ -199,13 +199,13 @@ int main(int argc, char **argv)
 
   std::string public_msgr_type = g_ceph_context->_conf->ms_public_type.empty() ? g_ceph_context->_conf.get_val<std::string>("ms_type") : g_ceph_context->_conf->ms_public_type;
 
-  cerr << " using ms-public-type " << public_msgr_type << std::endl;
-  cerr << "       server ip:port " << args[0] << std::endl;
-  cerr << "       numjobs " << numjobs << std::endl;
-  cerr << "       concurrency " << concurrent << std::endl;
-  cerr << "       ios " << ios << std::endl;
-  cerr << "       thinktime(us) " << think_time << std::endl;
-  cerr << "       message data bytes " << len << std::endl;
+  cout << " using ms-public-type " << public_msgr_type << std::endl;
+  cout << "       server ip:port " << args[0] << std::endl;
+  cout << "       numjobs " << numjobs << std::endl;
+  cout << "       concurrency " << concurrent << std::endl;
+  cout << "       ios " << ios << std::endl;
+  cout << "       thinktime(us) " << think_time << std::endl;
+  cout << "       message data bytes " << len << std::endl;
 
   MessengerClient client(public_msgr_type, args[0], think_time);
 
@@ -214,8 +214,7 @@ int main(int argc, char **argv)
   uint64_t start = Cycles::rdtsc();
   client.start();
   uint64_t stop = Cycles::rdtsc();
-  cerr << " Total op " << (ios * numjobs) << " run time "
-       << Cycles::to_microseconds(stop - start) << "us." << std::endl;
+  cout << " Total op " << (ios * numjobs) << " run time " << Cycles::to_microseconds(stop - start) << "us." << std::endl;
 
   return 0;
 }