Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion::analytics Namespace Reference

Classes

class  Benchmark
 The Benchmark class provides types and utilities to make it easier to create performance benchmarks. More...
 
class  SampleMapping
 Helper class for transforming samples between the time domain and the (unitless) normalized domain used for discrepancy calculation. More...
 
struct  IntervalDiscrepancy
 Result of a discrepancy computation, including the value measured and the bounds of the interval where that value was measured. More...
 
class  GpuPerformanceTester
 GPUPerformanceTester measures basic GPU rendering characteristics. More...
 

Functions

size_t MergeBenchmarks (const Benchmark &from, Benchmark *to)
 Public functions. More...
 
void OutputBenchmarkAsCsv (const Benchmark &benchmark, std::ostream &out)
 Outputs benchmark results as CSV (comma-separated values), suitable for use in performance dashboards. More...
 
void OutputConstantAsJson (const Benchmark::Constant &c, const std::string &indent, std::ostream &out)
 Outputs a Constant as JSON. See below for the output format. More...
 
void OutputAccumulatedVariableAsJson (const Benchmark::AccumulatedVariable &v, const std::string &indent, std::ostream &out)
 Outputs an AccumulatedVariable as JSON. See below for the output format. More...
 
void OutputBenchmarkAsJson (const Benchmark &benchmark, const std::string &indent, std::ostream &out)
 Outputs benchmark results as JSON, suitable for serialization and use in performance dashboards. More...
 
void OutputBenchmarkPretty (const std::string &id_string, bool print_descriptions, const Benchmark &benchmark, std::ostream &out)
 Outputs benchmark results in pretty format. More...
 
template<class InputIterator >
std::vector< double > NormalizeSamples (InputIterator first, InputIterator last, const SampleMapping &sample_mapping)
 Sorts a sequence of numbers and normalizes it to the range [0, 1] using the given sample_mapping. More...
 
template<class ContainerType >
std::vector< double > NormalizeSamples (const ContainerType &samples, const SampleMapping &sample_mapping)
 Normalize all samples in a container. More...
 
template<class InputIterator >
IntervalDiscrepancy Discrepancy (InputIterator first, InputIterator last)
 Computes the discrepancy of a sequence of numbers in the range [0,1]. More...
 
template<class ContainerType >
IntervalDiscrepancy Discrepancy (const ContainerType &samples)
 Compute analytic discrepancy of entire container. More...
 
template<class RandomIt >
IntervalDiscrepancy AbsoluteTimestampDiscrepancy (RandomIt first, RandomIt last)
 A discrepancy-based metric for measuring the irregularity of timestamps. More...
 
template<class ContainerType >
IntervalDiscrepancy AbsoluteTimestampDiscrepancy (const ContainerType &timestamps)
 Compute absolute discrepancy of entire container analytically. More...
 
GpuPerformanceTester::Enables operator| (GpuPerformanceTester::Enables left, GpuPerformanceTester::Enables right)
 

Function Documentation

template<class RandomIt >
IntervalDiscrepancy ion::analytics::AbsoluteTimestampDiscrepancy ( RandomIt  first,
RandomIt  last 
)

A discrepancy-based metric for measuring the irregularity of timestamps.

TimestampsDiscrepancy quantifies the largest area of irregularity observed in a series of timestamps.

Absolute discrepancy is scaled to have the same unit as the input sequence (raw discrepancy is unitless in the range [0,1]). This means that the value doesn't change if additional 'good' frames are added to the sequence, which is useful when benchmark runs of different durations are compared. E.g. the absolute discrepancies of {0, 2, 3, 4} and {0, 2, 3, 4, 5} are identical.

Definition at line 266 of file discrepancy.h.

References ion::analytics::IntervalDiscrepancy::begin, ion::analytics::IntervalDiscrepancy::discrepancy, Discrepancy(), ion::analytics::SampleMapping::DurationFromLength(), ion::analytics::IntervalDiscrepancy::end, NormalizeSamples(), and ion::analytics::SampleMapping::TimeFromNormalized().

Referenced by AbsoluteTimestampDiscrepancy().

template<class ContainerType >
IntervalDiscrepancy ion::analytics::AbsoluteTimestampDiscrepancy ( const ContainerType &  timestamps)

Compute absolute discrepancy of entire container analytically.

Definition at line 292 of file discrepancy.h.

References AbsoluteTimestampDiscrepancy().

template<class InputIterator >
IntervalDiscrepancy ion::analytics::Discrepancy ( InputIterator  first,
InputIterator  last 
)

Computes the discrepancy of a sequence of numbers in the range [0,1].

The numbers must be sorted. We define the discrepancy of an empty sequence to be zero. This implementation only considers sampling densities lower than the average for the discrepancy. The original mathematical definition also considers higher densities.

http://en.wikipedia.org/wiki/Equidistributed_sequence http://en.wikipedia.org/wiki/Low-discrepancy_sequence http://mathworld.wolfram.com/Discrepancy.html

Definition at line 162 of file discrepancy.h.

References ion::analytics::IntervalDiscrepancy::discrepancy, and length.

Referenced by AbsoluteTimestampDiscrepancy(), and Discrepancy().

template<class ContainerType >
IntervalDiscrepancy ion::analytics::Discrepancy ( const ContainerType &  samples)

Compute analytic discrepancy of entire container.

Definition at line 249 of file discrepancy.h.

References Discrepancy().

ION_API size_t ion::analytics::MergeBenchmarks ( const Benchmark &  from,
Benchmark *  to 
)

Public functions.

Merges one Benchmark instance into another.

If any constant or variable is present in both instances, this logs an error message and leaves the constant or variable untouched in the "to" instance. This returns the number of such conflicts.

Definition at line 209 of file benchmarkutils.cc.

References ion::analytics::Benchmark::GetAccumulatedVariables(), ion::analytics::Benchmark::GetConstants(), and ion::analytics::Benchmark::GetSampledVariables().

template<class InputIterator >
std::vector<double> ion::analytics::NormalizeSamples ( InputIterator  first,
InputIterator  last,
const SampleMapping &  sample_mapping 
)

Sorts a sequence of numbers and normalizes it to the range [0, 1] using the given sample_mapping.

Definition at line 108 of file discrepancy.h.

References ion::analytics::SampleMapping::NormalizedFromTime().

Referenced by AbsoluteTimestampDiscrepancy(), and NormalizeSamples().

template<class ContainerType >
std::vector<double> ion::analytics::NormalizeSamples ( const ContainerType &  samples,
const SampleMapping &  sample_mapping 
)

Normalize all samples in a container.

Definition at line 120 of file discrepancy.h.

References NormalizeSamples().

GpuPerformanceTester::Enables ion::analytics::operator| ( GpuPerformanceTester::Enables  left,
GpuPerformanceTester::Enables  right 
)
inline

Definition at line 299 of file gpuperformance.h.

ION_API void ion::analytics::OutputBenchmarkAsCsv ( const Benchmark &  benchmark,
std::ostream &  out 
)

Outputs benchmark results as CSV (comma-separated values), suitable for use in performance dashboards.

Note that SampledVariables are converted to AccumulatedVariables for CSV output.

Definition at line 233 of file benchmarkutils.cc.

References ion::analytics::Benchmark::AccumulateSampledVariable(), ion::analytics::Benchmark::GetAccumulatedVariables(), ion::analytics::Benchmark::GetConstants(), and ion::analytics::Benchmark::GetSampledVariables().

ION_API void ion::analytics::OutputBenchmarkAsJson ( const Benchmark &  benchmark,
const std::string &  indent,
std::ostream &  out 
)

Outputs benchmark results as JSON, suitable for serialization and use in performance dashboards.

Note that SampledVariables are converted to AccumulatedVariables for JSON output. Pass the proper indentation depending on the hierarchy of objects you wish to insert the JSON into. The JSON output to the stream is an object of lists, for example: { "constants": [ { "id": "Const1", "description": "CDesc1", "group": "Group1", "value": 1, "units": "Units1" }, ], "sampled_variables": [ { "id": "SVar2", "description": "SVDesc2", "group": "Group2", "mean": 200, "units": "Units2", "minimum": 100, "maximum": 300, "standard_deviation": 20000, "variation": 10000 } ], "accumulated_variables": [ { "id": "AVar3", "description": "AVDesc3", "group": "Group3", "mean": 2000, "units": "Units3" } ] }

Definition at line 305 of file benchmarkutils.cc.

References ion::analytics::Benchmark::AccumulateSampledVariable(), ion::analytics::Benchmark::GetAccumulatedVariables(), ion::analytics::Benchmark::GetConstants(), ion::analytics::Benchmark::GetSampledVariables(), OutputAccumulatedVariableAsJson(), and OutputConstantAsJson().

ION_API void ion::analytics::OutputBenchmarkPretty ( const std::string &  header_string,
bool  print_descriptions,
const Benchmark &  benchmark,
std::ostream &  out 
)

Outputs benchmark results in pretty format.

Outputs benchmark results in a pretty format.

Note that SampledVariables are converted to AccumulatedVariables for pretty output.

Definition at line 362 of file benchmarkutils.cc.

References ion::analytics::Benchmark::AccumulateSampledVariable(), ion::analytics::Benchmark::GetAccumulatedVariables(), ion::analytics::Benchmark::GetConstants(), and ion::analytics::Benchmark::GetSampledVariables().

Referenced by ion::profile::CallTraceManager::~CallTraceManager().

ION_API void ion::analytics::OutputConstantAsJson ( const Benchmark::Constant &  c,
const std::string &  indent,
std::ostream &  out 
)