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

com.alogic.metrics.stream.handler.Debug Maven / Gradle / Ivy

There is a newer version: 1.6.17
Show newest version
package com.alogic.metrics.stream.handler;

import java.util.Collection;
import java.util.Map;
import org.w3c.dom.Element;

import com.alogic.metrics.Dimensions;
import com.alogic.metrics.Fragment;
import com.alogic.metrics.Measures;
import com.alogic.metrics.stream.MetricsSummaryWriter;
import com.anysoft.util.Properties;

/**
 * 调试
 * @author yyduan
 *
 * @since 1.6.6.13
 *
 */
public class Debug extends MetricsSummaryWriter{
	
	@Override
	protected void write(Map data, long t) {		
		Collection values = data.values();
		
		for (Fragment f:values){
			LOG.info(f.id());
			Dimensions dims = f.getDimensions();
			if (dims != null){
				LOG.info(dims.toString());
			}
			
			Measures meas = f.getMeasures();
			if (meas != null){
				LOG.info(meas.toString());
			}
		}
	}

	@Override
	protected void onConfigure(Element e, Properties p) {

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy