def handle_cputime_metric(common_props, sample):
 cputime_samples = []
 wallclock_key = u'-- WALL --'
 for data in sample['value'].itervalues():
  wall_time = data[wallclock_key]
  for (process, value) in data.iteritems():
   if (process != wallclock_key):
    cputime_sample = dict(common_props)
    cputime_sample['process'] = process
    cputime_sample['value'] = value
    cputime_sample['wallclock'] = wall_time
    cputime_samples.append(cputime_sample)
 return cputime_samples

def handle_cputime_metric ( common_props , sample ) : cputime_samples = [ ] wallclock_key = u'-- WALL --' for data in sample [ 'value' ] . itervalues ( ) : wall_time = data [ wallclock_key ] for ( process , value ) in data . iteritems ( ) : if ( process != wallclock_key ) : cputime_sample = dict ( common_props ) cputime_sample [ 'process' ] = process cputime_sample [ 'value' ] = value cputime_sample [ 'wallclock' ] = wall_time cputime_samples . append ( cputime_sample ) return cputime_samples
create a sample object for a cputime metric sample .