Support standard deviation and json output for job stats
In the job stats, in addition to the max, min and average,
it will also display the standard deviation.
A new option --json is added to the rdci to output the results
in json format.
In the job stats, using the GMT time instead of timestamp
for start and end time.
Change-Id: If245c4fc4854a1dc867f97ff5aa9112af7962eca
[ROCm/rdc commit: e6d910f67a]
Este commit está contenido en:
cometido por
Chris Freehill
padre
bf248131cb
commit
588ea96dd2
@@ -46,6 +46,15 @@ struct FieldSummaryStats {
|
||||
int64_t max_value;
|
||||
int64_t min_value;
|
||||
int64_t total_value;
|
||||
|
||||
// Use Welford algorithm to calculate the standard deviations.
|
||||
// https://en.wikipedia.org/wiki/Standard_deviation#Rapid_calculation_methods
|
||||
// https://www.johndcook.com/blog/standard_deviation/
|
||||
double old_m;
|
||||
double old_s;
|
||||
double new_m;
|
||||
double new_s;
|
||||
|
||||
uint64_t last_time;
|
||||
uint64_t count;
|
||||
};
|
||||
@@ -100,6 +109,8 @@ class RdcCacheManagerImpl: public RdcCacheManager {
|
||||
void set_summary(const FieldSummaryStats & stats,
|
||||
rdc_stats_summary_t& gpu, rdc_stats_summary_t& summary, // NOLINT
|
||||
unsigned int adjuster);
|
||||
void set_average_summary(
|
||||
rdc_stats_summary_t& summary, uint32_t num_gpus); // NOLINT
|
||||
RdcCacheSamples cache_samples_;
|
||||
RdcJobStatsCache cache_jobs_;
|
||||
std::mutex cache_mutex_;
|
||||
|
||||
Referencia en una nueva incidencia
Block a user