Skip to content

Commit

Permalink
Improved tag-spec to show count of matched CPUs against SPEC total
Browse files Browse the repository at this point in the history
  • Loading branch information
mvaltas committed May 24, 2023
1 parent 64b0de6 commit b2e0e95
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ccfcoef/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def list_specs(raw):
click.secho(f'file: {click.style(spec.name, fg="white")} '
f'version:{click.style(version, fg="yellow")}')


@cli.command()
def verify_cpu_models():
"""
Expand All @@ -92,6 +93,7 @@ def verify_cpu_models():
else:
click.secho('No duplications on CPU models found.', fg='green')


@cli.command()
def show_constants():
"""
Expand Down Expand Up @@ -259,6 +261,9 @@ def tag_spec(write):
spec = SPECPower.instantiate(SPEC_RESULTS_FILE)
tagged = spec.tag_cpu_family(cpus)

tagged_cpus_count = tagged['CPU Family'].count()
click.secho(f'Matched {tagged_cpus_count} CPUs in {len(tagged)} SPECpower entries.', fg='white')

output[write](tagged, f'{SPEC_RESULTS_FILE.stem}-tagged.csv')


Expand Down

0 comments on commit b2e0e95

Please sign in to comment.