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

com.adobe.forms.foundation.fdinternal.utils.PerformanceLogger Maven / Gradle / Ivy

package com.adobe.forms.foundation.fdinternal.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.String;
import java.lang.System;

/**
 * @pad.exclude Exclude from Published API.
 */
public class PerformanceLogger {
    private static Logger logger = LoggerFactory.getLogger(PerformanceLogger.class);

    private String loggerName;
    private long start;

    public PerformanceLogger(String name){
        if(logger.isTraceEnabled()) {
            this.loggerName = name;
            this.start = System.currentTimeMillis();
            logger.trace("<{}>",this.loggerName);
        }
    }

    public void logPerformance(){
        if(logger.isTraceEnabled()){
            long end = System.currentTimeMillis();
            logger.trace("" , (end-start));
            logger.trace("" ,this.loggerName);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy