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

long
count
Number of records processed.
long
elapsed
Elapsed time in milliseconds.
long
freeMem
Free memory at the end of measurement interval.
String
name
Name of the data point - usually one of a data series with the same name
long
totalMem
Total memory at the end of measurement interval.

Constructor Summary

TimeData()
TimeData(String name)

Method Summary

protected Object
clone()
static String
getLabels()
Get a short legend for toString() output.
double
getRate()
Get rate of processing, defined as number of processed records per second.
void
recordMemUsage()
Record memory usage.
void
reset()
Reset counters.
void
start()
Start counting elapsed time.
void
stop()
Stop counting elapsed time.
String
toString()
String
toString(boolean withMem)
Return a tab-seprated string containing this data.

Field Details

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 Details

TimeData

public TimeData()

TimeData

public TimeData(String name)

Method Details

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.