Skip to content

Parameterization of tdp-finder.py to return only extracted TDP value, without any text #9

@deligianp

Description

@deligianp

Current functionality

Currently tdp-finder.py can be used to find the TDP of the system's CPU and return this result in the following form:

TDP ({tdp_column}) => {tdp_in_w} W

e.g.:
TDP (TDP) => 21.0 W

This provides a human-readable form of the TDP information but it implies potential future parsing of that text when running the metrics_aggregator.py, in favor of automating the flow of treecript metrics extraction.

Proposed extension

tdp_finder.py could be extended with a command line argument that controls whether the output will be in human-readable format or just the value of the TDP. This way, the execution of tdp-finder.py could easily be used in an automated pipeline or even be embedded within the invocation of the metrics_aggregator.py.

For example:

  • Assuming that tdp-finder.py can accept an optional argument -p (for "plain") for which it will only respond with the TDP value, the following snippet can automate the calls for both tdp-finder.py and metrics-aggregator.py:
tdp=$(tdp-finder.py -p metrics/2025_11_05-17_33-2855499/ dataset/intel-cpus.csv)
if [ $? -eq 0 ]; then
    metrics-aggregator.py metrics/2025_11_05-17_33-2855499/ charts "$tdp"
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions