def compute_change(labels, before, after):
 result = {}
 for (label, before, after) in zip(labels, before, after):
  matched_keys = (set(before) & set(after))
  value = {key: (after[key] - before[key]) for key in matched_keys}
  result[label] = value
 return result

def compute_change ( labels , before , after ) : result = { } for ( label , before , after ) in zip ( labels , before , after ) : matched_keys = ( set ( before ) & set ( after ) ) value = { key : ( after [ key ] - before [ key ] ) for key in matched_keys } result [ label ] = value return result
compute the difference between cpu times from consecutive measurements .