package com.atlassian.stash.internal.server;

/**
 * Controls application profiling
 *
 * @since 1.2.2
 */
public interface ProfilingService {

    /**
     * Turns off profiling for all requests.
     */
    void disable();

    /**
     * Turns on profiling for all requests.
     */
    void enable();

    /**
     * Turns on profiling for all requests that take long than {@code profilingThreshold} milliseconds.
     *
     * @param profilingThreshold the threshold in milliseconds
     */
    void enable(int profilingThreshold);

    /**
     * @return whether profiling is currently enabled
     */
    boolean isEnabled();
}
