#include "xla/tsl/util/stats_calculator.h"
#include <iomanip>
#include <map>
#include <queue>
#include <sstream>
#include <string>
namespace tsl {
constexpr int kNodeTypeWidth = …;
StatsCalculator::StatsCalculator(const StatSummarizerOptions& options)
: … { … }
std::string StatsCalculator::GetShortSummary() const { … }
std::ostream& InitField(std::ostream& stream, int width) { … }
std::string StatsCalculator::HeaderString(const std::string& title) const { … }
std::string StatsCalculator::ColumnString(const Detail& detail,
const int64_t cumulative_stat_on_node,
const Stat<int64_t>& stat) const { … }
void StatsCalculator::OrderNodesByMetric(
SortingMetric metric, std::vector<const Detail*>* details) const { … }
void StatsCalculator::ComputeStatsByType(
std::map<std::string, int64_t>* node_type_map_count,
std::map<std::string, int64_t>* node_type_map_time,
std::map<std::string, int64_t>* node_type_map_memory,
std::map<std::string, int64_t>* node_type_map_times_called,
int64_t* accumulated_us) const { … }
std::string StatsCalculator::GetStatsByNodeType() const { … }
std::string StatsCalculator::GetStatsByMetric(const std::string& title,
SortingMetric sorting_metric,
int num_stats) const { … }
std::string StatsCalculator::GetOutputString() const { … }
void StatsCalculator::AddNodeStats(const std::string& name,
const std::string& type, int64_t run_order,
int64_t elapsed_time, int64_t mem_used) { … }
}