## org.apache.lucene.benchmark.stats
Class TimeData

    java.lang.Object
      org.apache.lucene.benchmark.stats.TimeData

    public class TimeData

extends java.lang.Object

This class holds a data point measuring speed of processing.

Field Summary
`long` `count` Number of records processed.
`long` `elapsed` Elapsed time in milliseconds.
`long` `freeMem` Free memory at the end of measurement interval.
`java.lang.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(java.lang.String name)`

Method Summary
`protected java.lang.Object` `clone()`
`static java.lang.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.
`java.lang.String` `toString()`
`java.lang.String` `toString(boolean withMem)` Return a tab-separated string containing this data.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### name

    public java.lang.String name

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

### 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.

### totalMem

    public long totalMem

  Total memory at the end of measurement interval.

Constructor Detail

### TimeData

    public TimeData()

### TimeData

    public TimeData(java.lang.String name)

Method Detail

### start

    public void start()

  Start counting elapsed time.

### stop

    public void stop()

  Stop counting elapsed time.

### recordMemUsage

    public void recordMemUsage()

  Record memory usage.

### reset

    public void reset()

  Reset counters.

### clone

    protected java.lang.Object clone()

  Overrides:
    `clone` in class `java.lang.Object`

### getRate

    public double getRate()

  Get rate of processing, defined as number of processed records per second.

### getLabels

    public static java.lang.String getLabels()

  Get a short legend for toString() output.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### toString

    public java.lang.String toString(boolean withMem)

  Return a tab-separated string containing this data.

  Parameters:
    `withMem` - if true, append also memory information
  Returns:
    The String

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