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
This commit is contained in:
کامیت شده توسط
Chris Freehill
والد
9efb55b06f
کامیت
e6d910f67a
@@ -39,6 +39,7 @@ class RdciStatsSubSystem: public RdciSubSystem {
|
||||
private:
|
||||
void show_help() const;
|
||||
void show_job_stats(const rdc_gpu_usage_info_t& gpu_info) const;
|
||||
void show_job_stats_json(const rdc_gpu_usage_info_t& gpu_info) const;
|
||||
|
||||
enum OPERATIONS {
|
||||
STATS_UNKNOWN = 0,
|
||||
|
||||
@@ -39,7 +39,11 @@ class RdciSubSystem {
|
||||
|
||||
virtual void process() = 0;
|
||||
virtual ~RdciSubSystem();
|
||||
|
||||
bool is_json_output() const;
|
||||
|
||||
protected:
|
||||
void set_json_output(bool is_json);
|
||||
std::vector<std::string> split_string(const std::string& s,
|
||||
char delimiter) const;
|
||||
void show_common_usage() const;
|
||||
@@ -52,6 +56,9 @@ class RdciSubSystem {
|
||||
std::string root_ca_;
|
||||
std::string client_cert_;
|
||||
std::string client_key_;
|
||||
|
||||
private:
|
||||
bool is_json_output_;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<RdciSubSystem> RdciSubSystemPtr;
|
||||
|
||||
مرجع در شماره جدید
Block a user