-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi!
The predecessor of this issue is this one.
This issue is related to this one.
I plan to enhance the API endpoint /v3/performance/{expid} by adding the total core-hours and distribution of time of an experiment. I would like to do the implementation to the file performance_metrics.py, this way:
-
Total core-hours: Add to the function
def to_json(self) -> Dict:a new atribute calledTotal_core_hours; the value would beself.valid_sim_core_hours_sumwhich is a new class attribute ofPerformanceMetrics,that would be calculated atdef _calculate_global_metricsand would use a new function calleddef _calculate_total_energy(self): which returns the sum of the core-hours of the considered SIM jobs. -
Distribution of time: Add to the function
def to_json(self) -> Dict:two new atribute calledphases_total_timeandphases_critical_path_timewhich represent two embedded vectors with the time of each phase of an experiment for the two approaches (Total time and critical path); the values would beself.phases_total_timeandself.phases_critical_path_timewhich are two new class attributes ofPerformanceMetrics, they would be calculated atdef _calculate_global_metricsand would use two new functions calleddef _calculate_phases_total_time(self)anddef _calculate_phases_critical_path_time(self); which returns a vector with the total time used in the different phases depending of the approach. Also, between thedef _calculate_global_metricsand the two functions to calculate the times there will be a new function calleddef _extract_phases_jobswhich returns a list of the jobs of each phase.