Lines Matching full:stats
1 //===-- Statistic.cpp - Easy way to expose stats information --------------===//
12 // printed at the end of a run, when the -stats command line option is enabled
37 /// -stats - Command line option to cause transformations to emit stats about
42 "stats",
46 static cl::opt<bool> StatsAsJSON("stats-json",
54 std::vector<const Statistic*> Stats; member in __anone58620ff0111::StatisticInfo
65 Stats.push_back(S); in addStatistic()
76 // If stats are enabled, inform StatInfo that this statistic should be in RegisterStatistic()
106 std::stable_sort(Stats.begin(), Stats.end(), in sort()
119 StatisticInfo &Stats = *StatInfo; in PrintStatistics() local
123 for (size_t i = 0, e = Stats.Stats.size(); i != e; ++i) { in PrintStatistics()
125 (unsigned)utostr(Stats.Stats[i]->getValue()).size()); in PrintStatistics()
127 (unsigned)std::strlen(Stats.Stats[i]->getDebugType())); in PrintStatistics()
130 Stats.sort(); in PrintStatistics()
138 for (size_t i = 0, e = Stats.Stats.size(); i != e; ++i) in PrintStatistics()
140 MaxValLen, Stats.Stats[i]->getValue(), in PrintStatistics()
141 MaxDebugTypeLen, Stats.Stats[i]->getDebugType(), in PrintStatistics()
142 Stats.Stats[i]->getDesc()); in PrintStatistics()
160 StatisticInfo &Stats = *StatInfo; in PrintStatisticsJSON() local
162 Stats.sort(); in PrintStatisticsJSON()
167 for (const Statistic *Stat : Stats.Stats) { in PrintStatisticsJSON()
182 StatisticInfo &Stats = *StatInfo; in PrintStatistics() local
185 if (Stats.Stats.empty()) return; in PrintStatistics()
195 // Check if the -stats option is set instead of checking in PrintStatistics()
196 // !Stats.Stats.empty(). In release builds, Statistics operators in PrintStatistics()
197 // do nothing, so stats are never Registered. in PrintStatistics()