def get_rate(name):
 [curr_metrics, last_metrics] = get_metrics()
 name = name[len(NAME_PREFIX):]
 try:
  delta = ((curr_metrics['data'][name] - last_metrics['data'][name]) / (curr_metrics['time'] - last_metrics['time']))
  if (delta < 0):
   delta = 0
 except StandardError:
  delta = 0
 return delta

def get_rate ( name ) : [ curr_metrics , last_metrics ] = get_metrics ( ) name = name [ len ( NAME_PREFIX ) : ] try : delta = ( ( curr_metrics [ 'data' ] [ name ] - last_metrics [ 'data' ] [ name ] ) / ( curr_metrics [ 'time' ] - last_metrics [ 'time' ] ) ) if ( delta < 0 ) : delta = 0 except StandardError : delta = 0 return delta
return change over time for the requested metric .