All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fillumina.performance.consumer.NullPerformanceConsumer Maven / Gradle / Ivy

Go to download

Configurable tool to easily compare performances of different code snippets and to take performance telemetry of a running application.

The newest version!
package com.fillumina.performance.consumer;

import com.fillumina.performance.producer.LoopPerformances;
import java.io.Serializable;

/**
 * A {@link PerformanceConsumer} that does nothing. Useful to be passed
 * to methods that requires a consumer but cannot manage {@code null}.
 * 
 * @author Francesco Illuminati
 */
public final class NullPerformanceConsumer
        implements PerformanceConsumer, Serializable {
    private static final long serialVersionUID = 1L;

    public static final NullPerformanceConsumer INSTANCE =
            new NullPerformanceConsumer();

    private NullPerformanceConsumer() {}

    @Override
    public void consume(final String message,
            final LoopPerformances loopPerformances) {
        // do nothing
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy