def compute_avg_time_and_num_ops_after_aggregation(operationMetrics):
  for operationName in operationMetrics.keys():
    if operationMetrics[operationName][OPERATION_NUM_OPS] > 0:
      # now, region operation metric will be collect every 10 seconds,
      # the orignal ops is the sum of ops during 10 seconds
      operationMetrics[operationName][OPERATION_AVG_TIME] = \
        (operationMetrics[operationName][OPERATION_TOTAL_TIME]
          / operationMetrics[operationName][OPERATION_NUM_OPS])
      operationMetrics[operationName][OPERATION_NUM_OPS] = \
        10 / operationMetrics[operationName][OPERATION_NUM_OPS]
    else:
      operationMetrics[operationName][OPERATION_AVG_TIME] = 0
dataset/ETHPy150Open XiaoMi/minos/owl/collector/management/commands/metrics_aggregator.py/compute_avg_time_and_num_ops_after_aggregation/swapped operands of `/`