package cz.moneta.test.harness.performance;

import cz.moneta.test.harness.context.StoreAccessor;
import cz.moneta.test.harness.support.util.Level;

import java.lang.reflect.Method;

public interface PerformanceAware {

    default void publishReport(StoreAccessor harness) {
        harness.log(Level.WARN, "Performance report could not be published as the method was not run through the PerformanceWrapper");
    }

    default String getPerformanceReportKey(Object proxy, Method method, Object[] args) {
        return method.getName();
    }
}
