com.yahoo.ycsb.measurements.exporter
Class JSONMeasurementsExporter
java.lang.Object
com.yahoo.ycsb.measurements.exporter.JSONMeasurementsExporter
- All Implemented Interfaces:
- MeasurementsExporter, java.io.Closeable
public class JSONMeasurementsExporter
- extends java.lang.Object
- implements MeasurementsExporter
Export measurements into a machine readable JSON file.
Method Summary |
void |
close()
|
void |
write(java.lang.String metric,
java.lang.String measurement,
double d)
Write a measurement to the exported format. |
void |
write(java.lang.String metric,
java.lang.String measurement,
int i)
Write a measurement to the exported format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONMeasurementsExporter
public JSONMeasurementsExporter(java.io.OutputStream os)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(java.lang.String metric,
java.lang.String measurement,
int i)
throws java.io.IOException
- Description copied from interface:
MeasurementsExporter
- Write a measurement to the exported format.
- Specified by:
write
in interface MeasurementsExporter
- Parameters:
metric
- Metric name, for example "READ LATENCY".measurement
- Measurement name, for example "Average latency".i
- Measurement to write.
- Throws:
java.io.IOException
- if writing failed
write
public void write(java.lang.String metric,
java.lang.String measurement,
double d)
throws java.io.IOException
- Description copied from interface:
MeasurementsExporter
- Write a measurement to the exported format.
- Specified by:
write
in interface MeasurementsExporter
- Parameters:
metric
- Metric name, for example "READ LATENCY".measurement
- Measurement name, for example "Average latency".d
- Measurement to write.
- Throws:
java.io.IOException
- if writing failed
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Throws:
java.io.IOException