performance.auxiliary.execution_time_utils
Author: Leonardo de Sousa Marques Affiliation: Embedded Computing Lab (ECL), Federal University of Santa Catarina (UFSC)
- Description:
Utilitary functions to analyze execution time results.
- load_json_file(json_file)[source]
Loads and parses JSON file, returning list of experiments.
- Parameters:
json_file (Path) – Path to the JSON file
- Returns:
List of experiment dictionaries
- Return type:
List[Dict]
- calculate_memory_overhead(baseline_value, current_values)[source]
Calculates memory overhead percentage compared to baseline.
- Parameters:
baseline_value (float) – Baseline memory value in bytes
current_values (List[float]) – List of current memory values
- Returns:
Dictionary with overhead_percent, baseline_bytes, current_bytes, or empty dict
- Return type:
Dict[str, float]
- get_metric_title(metric)[source]
Gets appropriate title for a metric.
- Parameters:
metric (str) – Metric key
- Returns:
Human-readable title for the metric
- Return type:
str
- get_metric_ylabel(metric)[source]
Gets appropriate y-axis label for a metric.
- Parameters:
metric (str) – Metric key
- Returns:
Y-axis label string
- Return type:
str
- save_plot(output_dir, codec_name, format, metric)[source]
Saves the current plot to file.
- Parameters:
output_dir (Path) – Directory to save the plot
codec_name (str) – Name of the codec
format (str) – File format (e.g., pdf, png)
metric (str) – Metric name for filename
- Returns:
None
- Return type:
None