def add_metric(self, metric_name, aggregate=None):

        clean_metric = metric_name.lower().strip()

        if clean_metric.lower() not in METRICS:
            raise Exception("Metric named: " + metric_name +
                            " is not a valid benchmark metric.")
        self.metrics.add(clean_metric)

        if not aggregate:
            self.raw_metrics.add(clean_metric)
        elif aggregate.lower().strip() in AGGREGATES:
            # Add aggregate to this metric
            clean_aggregate = aggregate.lower().strip()
            current_aggregates = self.aggregated_metrics.get(
                clean_metric, list())
            current_aggregates.append(clean_aggregate)
            self.aggregated_metrics[clean_metric] = current_aggregates
        else:
            raise Exception("Aggregate function " + aggregate +
                            " is not a legal aggregate function name")

        return self
Initialise a new ConduitMockData.
dataset/ETHPy150Open svanoort/pyresttest/pyresttest/benchmarks.py/Benchmark.add_metric--crossover with--dataset/ETHPy150Open bloomberg/phabricator-tools/py/abd/abdt_conduitmock.py/ConduitMockData.__init__