#include "sim/root.hh"
Root *Root::_root = NULL;
-Root::Stats Root::Stats::instance;
-Root::Stats &rootStats = Root::Stats::instance;
+Root::RootStats Root::RootStats::instance;
+Root::RootStats &rootStats = Root::RootStats::instance;
-Root::Stats::Stats()
+Root::RootStats::RootStats()
: Stats::Group(nullptr),
simSeconds(this, "sim_seconds", "Number of seconds simulated"),
simTicks(this, "sim_ticks", "Number of ticks simulated"),
}
void
-Root::Stats::resetStats()
+Root::RootStats::resetStats()
{
statTime.setTimer();
startTick = curTick();
// stat formulas. The most convenient way to implement that is by
// having a single global stat group for global stats. Merge that
// group into the root object here.
- mergeStatGroup(&Root::Stats::instance);
+ mergeStatGroup(&Root::RootStats::instance);
}
void
}
public: // Global statistics
- struct Stats : public ::Stats::Group
+ struct RootStats : public Stats::Group
{
void resetStats() override;
- ::Stats::Formula simSeconds;
- ::Stats::Value simTicks;
- ::Stats::Value finalTick;
- ::Stats::Value simFreq;
- ::Stats::Value hostSeconds;
+ Stats::Formula simSeconds;
+ Stats::Value simTicks;
+ Stats::Value finalTick;
+ Stats::Value simFreq;
+ Stats::Value hostSeconds;
- ::Stats::Formula hostTickRate;
- ::Stats::Value hostMemory;
+ Stats::Formula hostTickRate;
+ Stats::Value hostMemory;
- static Stats instance;
+ static RootStats instance;
private:
- Stats();
+ RootStats();
- Stats(const Stats &) = delete;
- Stats &operator=(const Stats &) = delete;
+ RootStats(const RootStats &) = delete;
+ RootStats &operator=(const RootStats &) = delete;
Time statTime;
Tick startTick;
* Global simulator statistics that are not associated with a
* specific SimObject.
*/
-extern Root::Stats &rootStats;
+extern Root::RootStats &rootStats;
#endif // __SIM_ROOT_HH__