def get_rpcstats(self):
    rpcstats = {}
    with self._lock:
      values = [[trace.service_call_name(), trace.call_cost_microdollars(),
                 trace.billed_ops_list()] for trace in self.traces]
    for value in values:
      if value[0] in rpcstats:
        stats_for_rpc = rpcstats[value[0]]

        stats_for_rpc[0] += 1

        stats_for_rpc[1] += value[1]
      else:
        rpcstats[value[0]] = [1, value[1], {}]

      _add_billed_ops_to_map(rpcstats[value[0]][2], value[2])
    return rpcstats
Compute RPC statistics (how often each RPC endpoint is called).
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/appstats/recording.py/Recorder.get_rpcstats