'wallclock_for_process returns the mean of the values from
samples which have the \'wallclock\' metric type and match the
specified operation.'

def test_wallclock_for_operation_calculates_result(self):

    operation = 'test-operation'
    results = [{'metric': {'type': 'wallclock'}, 'operation': {'type': operation}, 'value': 11}, {'metric': {'type': 'wallclock'}, 'operation': {'type': operation}, 'value': 14}]
    wallclock_result = wallclock_for_operation(results, operation)
    self.assertEqual(wallclock_result, 12.5)
