org.apache.lucene.benchmark.stats

Class TimeData

public class TimeData extends Object

This class holds a data point measuring speed of processing.

Author: Andrzej Bialecki <ab@getopt.org>

Field Summary
longcount
Number of records processed.
longelapsed
Elapsed time in milliseconds.
longfreeMem
Free memory at the end of measurement interval.
Stringname
Name of the data point - usually one of a data series with the same name
longtotalMem
Total memory at the end of measurement interval.
Constructor Summary
TimeData()
TimeData(String name)
Method Summary
protected Objectclone()
static StringgetLabels()
Get a short legend for toString() output.
doublegetRate()
Get rate of processing, defined as number of processed records per second.
voidrecordMemUsage()
Record memory usage.
voidreset()
Reset counters.
voidstart()
Start counting elapsed time.
voidstop()
Stop counting elapsed time.
StringtoString()
StringtoString(boolean withMem)
Return a tab-seprated string containing this data.

Field Detail

count

public long count
Number of records processed.

elapsed

public long elapsed
Elapsed time in milliseconds.

freeMem

public long freeMem
Free memory at the end of measurement interval.

name

public String name
Name of the data point - usually one of a data series with the same name

totalMem

public long totalMem
Total memory at the end of measurement interval.

Constructor Detail

TimeData

public TimeData()

TimeData

public TimeData(String name)

Method Detail

clone

protected Object clone()

getLabels

public static String getLabels()
Get a short legend for toString() output.

getRate

public double getRate()
Get rate of processing, defined as number of processed records per second.

recordMemUsage

public void recordMemUsage()
Record memory usage.

reset

public void reset()
Reset counters.

start

public void start()
Start counting elapsed time.

stop

public void stop()
Stop counting elapsed time.

toString

public String toString()

toString

public String toString(boolean withMem)
Return a tab-seprated string containing this data.

Parameters: withMem if true, append also memory information

Returns: The String

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.