Permalink
Browse files

Merge branch 'master' of github.com:okws/sfslite

  • Loading branch information...
2 parents a358611 + b7b60bb commit 061b1ebb2265158dffc89c4701b1f47cc9166c56 @till-varoquaux till-varoquaux committed Jul 25, 2012
Showing with 16 additions and 6 deletions.
  1. +14 −6 arpc/rpc_stats.C
  2. +2 −0 arpc/rpc_stats.h
View
@@ -87,9 +87,9 @@ namespace rpc_stats {
m_last_print = sfs_get_tsnow();
}
- void rpc_stat_collector_t::end_call(svccb *call_obj, const timespec &strt)
- {
- if (!m_active || call_obj == NULL) {
+ void rpc_stat_collector_t::end_call(uint32_t prog, uint32_t vers,
+ uint32_t proc, const timespec& strt) {
+ if (!m_active) {
return;
}
@@ -102,9 +102,9 @@ namespace rpc_stats {
// update rpc stats
rpc_proc_t proc_info;
- proc_info.prog = call_obj->prog();
- proc_info.vers = call_obj->vers();
- proc_info.proc = call_obj->proc();
+ proc_info.prog = prog;
+ proc_info.vers = vers;
+ proc_info.proc = proc;
rpc_stats_t *stat_entry = m_stats[proc_info];
if (stat_entry == NULL) {
rpc_stats_t new_entry;
@@ -128,6 +128,14 @@ namespace rpc_stats {
print_info();
}
}
+
+ void rpc_stat_collector_t::end_call(svccb *call_obj, const timespec &strt)
+ {
+ if (!m_active || call_obj == NULL) {
+ return;
+ }
+ end_call(call_obj->prog(), call_obj->vers(), call_obj->proc(), strt);
+ }
}
rpc_stats::rpc_stat_collector_t& get_rpc_stats ()
View
@@ -104,6 +104,8 @@ namespace rpc_stats {
/** Call this at the end of an RPC handler */
void end_call(svccb *call_obj, const timespec &strt);
+ void end_call(uint32_t prog, uint32_t vers, uint32_t proc,
+ const timespec &strt);
protected:
bool m_active;

0 comments on commit 061b1eb

Please sign in to comment.