tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tracktion::engine::ScopedBenchmark Struct Reference

Helper class for measuring a benchmark and adding it to the singleton BenchmarkList list. More...

#include "tracktion_Benchmark.h"

Public Member Functions

 ScopedBenchmark (BenchmarkDescription desc)
 Constructs and starts a Benchmark.
 
 ~ScopedBenchmark ()
 Stops the Benchmark and adds the result to the BenchmarkList.
 

Detailed Description

Helper class for measuring a benchmark and adding it to the singleton BenchmarkList list.

{
ScopedBenchmark sb (createBenchmarkDescription ("Save random tree as XML"));
doSomeLongCalculation();
}
publish (BenchmarkList::getInstance().getResults());
static BenchmarkList & getInstance()
Gets the singleton instance.
BenchmarkDescription createBenchmarkDescription(std::string category, std::string name, std::string description)
Creates a description by hashing the name and description fields.
Helper class for measuring a benchmark and adding it to the singleton BenchmarkList list.

Definition at line 160 of file tracktion_Benchmark.h.

Constructor & Destructor Documentation

◆ ScopedBenchmark()

tracktion::engine::ScopedBenchmark::ScopedBenchmark ( BenchmarkDescription  desc)

Constructs and starts a Benchmark.

Definition at line 163 of file tracktion_Benchmark.h.

◆ ~ScopedBenchmark()

tracktion::engine::ScopedBenchmark::~ScopedBenchmark ( )

Stops the Benchmark and adds the result to the BenchmarkList.

Definition at line 170 of file tracktion_Benchmark.h.


The documentation for this struct was generated from the following file: