Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.thoughtworks.xstream.tools.benchmark.metrics
Class DeserializationSpeedMetric

    java.lang.Object
      com.thoughtworks.xstream.tools.benchmark.metrics.DeserializationSpeedMetric

All Implemented Interfaces:
  Metric

    public class DeserializationSpeedMetric

extends Object
implements Metric

Determines how long it takes to deserialize an object (in ms).

Author:
  Joe Walnes, Jörg Schaible
See Also:
  `Harness`, `Metric`

Constructor Summary
`DeserializationSpeedMetric(int iterations)` Deprecated. since 1.3, use `DeserializationSpeedMetric(int, boolean)`
`DeserializationSpeedMetric(int iterations, boolean validate)` Measure deserialization speed.

Method Summary
`boolean` | `biggerIsBetter()` Whether a big result is better for this metric.
`double` | `run(Product product, Object object)` Deprecated. since 1.3
`double` | `run(Product product, Target target)` Run the test and produce a metric.
`String` | `toString()`
`String` | `unit()` The unit the metric is recorded in (for reporting purposes).

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

Constructor Detail

### DeserializationSpeedMetric

    public DeserializationSpeedMetric(int iterations)

  Deprecated. since 1.3, use `DeserializationSpeedMetric(int, boolean)`

  Measure deserialization speed.

  Parameters:
    `iterations` -

### DeserializationSpeedMetric

    public DeserializationSpeedMetric(int iterations,
                                      boolean validate)

  Measure deserialization speed.

  Parameters:
    `iterations` -
    `validate` - flag to compare result of last iteration with original data
  Since:
    1.3

Method Detail

### run

    public double run(Product product,
                      Target target)
               throws Exception

  Description copied from interface: `Metric`
  Run the test and produce a metric.

  Specified by:
    `run` in interface `Metric`
  Parameters:
    `product` - Product to use in test.
    `target` - A target to use against the product.
  Returns:
    The resulting metric (e.g. 12.22).
  Throws:
    `Exception` - If this metric could not be obtained. This will be reported back to the `Reporter`.

### run

    public double run(Product product,
                      Object object)
               throws Exception

  Deprecated. since 1.3

  Description copied from interface: `Metric`
  Run the test and produce a metric.

  Specified by:
    `run` in interface `Metric`
  Parameters:
    `product` - Product to use in test.
    `object` - A object to use against the product.
  Returns:
    The resulting metric (e.g. 12.22).
  Throws:
    `Exception` - If this metric could not be obtained. This will be reported back to the `Reporter`.

### unit

    public String unit()

  Description copied from interface: `Metric`
  The unit the metric is recorded in (for reporting purposes). e.g. "ms" or "bytes".

  Specified by:
    `unit` in interface `Metric`

### biggerIsBetter

    public boolean biggerIsBetter()

  Description copied from interface: `Metric`
  Whether a big result is better for this metric.

  Specified by:
    `biggerIsBetter` in interface `Metric`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 XStream. All Rights Reserved.