|
Data.Metrics | Portability | portable
| Stability | experimental
| Maintainer | Tiago Alves and Joost Visser
|
|
|
|
|
|
Description |
This module contains data types for representing individual metrics and
groups of metrics. Printing support for these is supplied as well.
|
|
Synopsis |
|
|
|
|
Defined data structures |
|
data Metric |
Individual metric. | Constructors | Metric | | description :: String | Full description of the metric. | name :: String | Small name of the metric. | value :: String | Value of the calculated metric. |
|
|
|
|
data GroupMetric |
Named group of metrics. | Constructors | |
|
|
Operations on metrics |
|
summaryMetrics :: [GroupMetric] -> [Metric] |
Compute summary metrics of group metrics. For each group metric,
we compute minimum, average, and maximum. |
|
average :: Integral a => [a] -> Ratio a |
Utility function to compute average of a list of integral numbers. |
|
Functions to aid pretty-printing the metrics |
|
printGroupMetricList :: [GroupMetric] -> [String] |
Creates a list of strings representing a list of GroupMetrics.
Returns the name of the group metric, an empty string, each of the
metrics and a final blank string. |
|
printGroupMetricRow :: [GroupMetric] -> [String] |
Creates a list of strings representing a list of GroupMetrics.
Returns only the values of the metrics (put them in a row). |
|
printGroupMetricHeaderRow :: [GroupMetric] -> [String] |
Creates a list with the small name of the metrics (put them in a row). |
|
printMetricsList :: [Metric] -> [String] |
Creates a string representation of a list of individual metrics. Each
string will contain the metric's description, the small name (between
brackets and its value. The results will be aligned. |
|
printMetricsRow :: [Metric] -> [String] |
Creates a list with the metrics values (put them in a row). |
|
printMetricHeadersRow :: [Metric] -> [String] |
Creates a list with the metrics small names (put them in a row). |
|
Produced by Haddock version 0.6 |