sun::support::StageTimings

sun::support::StageTimings

class · Source (opens in a new tab)

class sun::support::StageTimings

Elapsed times collected for compiler stages.

Public Functions

add

public · function · static · Source (opens in a new tab)

static void sun::support::StageTimings::add(std::string name, double milliseconds)

Adds elapsed time to the accumulated duration of a named stage.

enabled

public · function · static · Source (opens in a new tab)

static bool sun::support::StageTimings::enabled()

Reports whether compiler-stage timing was requested.

report

public · function · static · Source (opens in a new tab)

static void sun::support::StageTimings::report()

One line per stage, then a total.

Stages that ran more than once (the entry file is parsed twice, once to find its manifest) are summed.

Private Functions

entries

private · function · static · Source (opens in a new tab)

static std::vector< std::pair< std::string, double > > & sun::support::StageTimings::entries()

Deliberately never destroyed: the report runs from a static destructor, and a destroyed vector would be read there.