]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Client.cc: rename client_logger -> client_counters
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Wed, 20 Jul 2011 23:23:35 +0000 (16:23 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Wed, 20 Jul 2011 23:23:35 +0000 (16:23 -0700)
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/client/Client.cc
src/client/Client.h
src/client/SyntheticClient.cc

index 6806a9d36fd688c7eec89f5aa520a596056f0ff9..85fd0583b91ad3953e610131fc35756661fad5f2 100644 (file)
@@ -73,7 +73,7 @@ using namespace std;
 
 // static logger
 Mutex client_logger_lock("client_logger_lock");
-PerfCounters  *client_logger = 0;
+PerfCounters  *client_counters = 0;
 
 
 
@@ -310,14 +310,14 @@ void Client::init()
   gethostname(hostname, 79);
   snprintf(s, sizeof(s), "clients.%s.%d", hostname, getpid());
   PerfCountersBuilder plb(cct, s, l_c_first, l_c_last);
-  if (client_logger == 0) {
+  if (client_counters == 0) {
     plb.add_fl_avg(l_c_reply, "reply");
     plb.add_fl_avg(l_c_lat, "lat");
     plb.add_fl_avg(l_c_wrlat, "wrlat");
     plb.add_fl_avg(l_c_owrlat, "owrlat");
     plb.add_fl_avg(l_c_ordlat, "ordlat");
     
-    client_logger = plb.create_perf_counters();
+    client_counters = plb.create_perf_counters();
   }
   client_logger_lock.Unlock();
 }
@@ -1100,12 +1100,12 @@ int Client::make_request(MetaRequest *request,
   request->dispatch_cond = 0;
   
   // -- log times --
-  if (client_logger) {
+  if (client_counters) {
     utime_t lat = ceph_clock_now(cct);
     lat -= request->sent_stamp;
     ldout(cct, 20) << "lat " << lat << dendl;
-    client_logger->fset(l_c_lat,(double)lat);
-    client_logger->fset(l_c_reply,(double)lat);
+    client_counters->fset(l_c_lat,(double)lat);
+    client_counters->fset(l_c_reply,(double)lat);
   }
 
   request->put();
@@ -5202,8 +5202,8 @@ int Client::_write(Fh *f, int64_t offset, uint64_t size, const char *buf)
   // time
   utime_t lat = ceph_clock_now(cct);
   lat -= start;
-  if (client_logger)
-    client_logger->fset(l_c_wrlat,(double)lat);
+  if (client_counters)
+    client_counters->fset(l_c_wrlat,(double)lat);
     
   // assume success for now.  FIXME.
   uint64_t totalwritten = size;
index 77412c21512c1a3732ef66d277078442dc11ecc5..18a8c26f15fb5fd20a4f19fc4a4b96a7938daa50 100644 (file)
@@ -77,7 +77,7 @@ class Filer;
 class Objecter;
 class ObjectCacher;
 
-extern class PerfCounters  *client_logger;
+extern class PerfCounters  *client_counters;
 
 
 // ============================================
index d03db38f099967b50f00499f422d01c81ee00400..9184b4f42c59fe68ad88ae9553d6f7145d08f403 100644 (file)
@@ -802,12 +802,12 @@ int SyntheticClient::run()
             lat -= start;
             
             dout(0) << " trace " << tfile << " loop " << (i+1) << "/" << iarg1 << " done in " << (double)lat << " seconds" << dendl;
-            if (client_logger 
+            if (client_counters 
                 && i > 0
                 && i < iarg1-1
                 ) {
-              //client_logger->finc("trsum", (double)lat);
-              //client_logger->inc("trnum");
+              //client_counters->finc("trsum", (double)lat);
+              //client_counters->inc("trnum");
             }
           }
          dout(1) << "done " << dendl;
@@ -2348,11 +2348,11 @@ int SyntheticClient::object_rw(int nobj, int osize, int wrpc,
 
     utime_t lat = ceph_clock_now(g_ceph_context);
     lat -= start;
-    if (client_logger) {
+    if (client_counters) {
       if (write) 
-       client_logger->fset(l_c_owrlat, lat);
+       client_counters->fset(l_c_owrlat, lat);
       else 
-       client_logger->fset(l_c_ordlat, lat);
+       client_counters->fset(l_c_ordlat, lat);
     }
   }