<commit_before>#!/usr/bin/python

from pid_controller import PIDController
from power import OutPower, InPower
from thermal import Thermal, ThermalGovernor
from results import CR2, get_results, combine_results

def summary_plots(**kwords):
    """A summary of plots as similar as possible to what CompareRuns plots"""

    if "path" in kwords:
        path = kwords["path"]
        del kwords["path"]
    else:
        path = None

    gov_data = ThermalGovernor(path=path)
    pid_data = PIDController(path=path)

    if "width" not in kwords:
        kwords["width"] = 20
    if "height" not in kwords:
        kwords["height"] = 5

    gov_data.plot_temperature(**kwords)
    pid_data.plot_controller(**kwords)
    gov_data.plot_input_power(**kwords)
    gov_data.plot_output_power(**kwords)<commit_msg>cr2: add utilisation plot to the summary plots<commit_after>#!/usr/bin/python

from pid_controller import PIDController
from power import OutPower, InPower
from thermal import Thermal, ThermalGovernor
from results import CR2, get_results, combine_results

def summary_plots(**kwords):
    """A summary of plots as similar as possible to what CompareRuns plots"""

    if "path" in kwords:
        path = kwords["path"]
        del kwords["path"]
    else:
        path = None

    gov_data = ThermalGovernor(path=path)
    inpower_data = InPower(path=path)
    pid_data = PIDController(path=path)

    if "width" not in kwords:
        kwords["width"] = 20
    if "height" not in kwords:
        kwords["height"] = 5

    # XXX This needs to be made generic
    map_label = {0: "A7", 1: "A15"}

    gov_data.plot_temperature(**kwords)
    inpower_data.plot_load(map_label, **kwords)
    pid_data.plot_controller(**kwords)
    gov_data.plot_input_power(**kwords)
    gov_data.plot_output_power(**kwords)
{'fraction_non_alphanumeric': 0.10176991150442478, 'fraction_numerical': 0.007743362831858407, 'mean_word_length': 3.6987012987012986, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4689969', 'n_tokens_mistral': 627, 'n_tokens_neox': 567, 'n_words': 158}