MCPcopy Create free account
hub / github.com/ZDoom/Raze / ADD_STAT

Function ADD_STAT

source/common/objects/dobjgc.cpp:767–791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

765//==========================================================================
766
767ADD_STAT(gc)
768{
769 static const char *StateStrings[] = {
770 " Pause ",
771 "Propagate",
772 " Sweep ",
773 " Destroy ",
774 " Done "
775 };
776 FString out;
777 double time = GC::State != GC::GCS_Pause ? GC::GCTime.TimeMS() : 0;
778
779 GC::PrevStepStats.Format(out);
780 out << "\n";
781 GC::StepStats.Format(out);
782 out.AppendFormat("\n%.2fms [%s] Rate:%3zuK (%3zuK) Alloc:%6zuK Est:%6zuK Thresh:%6zuK",
783 time,
784 StateStrings[GC::State],
785 (GC::AllocHistory.GetAverage() + 1023) >> 10,
786 (GC::CalcStepSize() + 1023) >> 10,
787 (GC::AllocBytes + 1023) >> 10,
788 (GC::Estimate + 1023) >> 10,
789 (GC::Threshold + 1023) >> 10);
790 return out;
791}
792
793//==========================================================================
794//

Callers

nothing calls this directly

Calls 5

CalcStepSizeFunction · 0.85
TimeMSMethod · 0.80
AppendFormatMethod · 0.80
GetAverageMethod · 0.80
FormatMethod · 0.45

Tested by

no test coverage detected