graphdata - ICE 0.1 API documentation

ICE 0.1 API documentation

# graphdata

Struct managing statistics displayed by graphs.

enum GraphMode;

  Graph modes.

  Sum

    Show totals per time unit.

  Average

    Show averages over measurements (e.g. frames).

class GraphData;

  Stores graph data accumulating over time.

  class Graph;

    Graph data related to measurement of single value over time.

    const(real)[] dataPoints(real start, real end, real period, GraphMode mode);

      Accumulate values recorded over a time window to data points, one point per period specified, each data point is a sum or average of values over the period, depending on graph mode.

      Parameters:

      real start | Start of the time window.
      real end | End of the time window.
      real period | Time period to represent by single data point.
      GraphMode mode | Graph mode (average per measurement or sums over time).

      Returns:
      Array of data points in specified time window.
    const pure @property bool empty();

      Is the graph empty, i.e. are there no values stored?

      Note that the graph is empty until the first accumulated value is added, which depends on time resolution.

    const pure @property real startTime();

      Get start time of the graph, i.e. time of the first value in the graph.

      Only makes sense if the graph is not empty.

    void updateValue(real value);

      Add a value to the graph.

      Parameters:

      real value | Value to add.

  this(ulong graphCount);

    Construct graph data with specified number of graphs.

    Parameters:

    ulong graphCount | Number of graphs to store.

  final pure @property real timeResolution();

    Get time resolution of the graph.

  final const pure @property real startTime();

    Get time when this graph started to exist.

  pure @property Graph[] graphs();

    Get (non-const) access to graphs stored.

  void update();

    Update graph data memory representation.

Copyright © Ferdinand Majerech 2011. | Page generated by AutoDDoc and Ddoc.