Skip to content

Fixed stats checker #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 30 additions & 28 deletions redis_benchmarks_specification/__cli__/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,35 +260,37 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
row.append(pct)
writer.writerow(row)

if total_tracked_count > 0:
total_tracked_commands_pct = "{0:.3g} %".format(
total_tracked_count / total_count * 100.0
)
if total_tracked_count > 0:
total_tracked_commands_pct = "{0:.3g} %".format(
total_tracked_count / total_count * 100.0
)

logging.info("Total commands: {}".format(total_commands))
total_tracked_commands = len(tracked_commands_json.keys())
logging.info("Total tracked commands: {}".format(total_tracked_commands))
logging.info("Total tracked commands pct: {}".format(total_tracked_commands_pct))
all_groups = groups_json.keys()
total_groups = len(all_groups)
logging.info("Total groups: {}".format(total_groups))
total_tracked_groups = len(tracked_groups)
logging.info("Total tracked groups: {}".format(total_tracked_groups))
logging.info(
"Total untracked groups: {}".format(total_groups - total_tracked_groups)
)
logging.info("Printing untracked groups:")
for group_name in all_groups:
if group_name not in tracked_groups:
logging.info(" - {}".format(group_name))
logging.info("Top 10 fully tracked?: {}".format(len(top_10_missing) == 0))
logging.info("Top 30 fully tracked?: {}".format(len(top_30_missing) == 0))
if len(top_30_missing) > 0:
logging.info("\t\tTotal missing for Top 30: {}".format(len(top_30_missing)))

logging.info("Top 50 fully tracked?: {}".format(len(top_50_missing) == 0))
if len(top_50_missing) > 0:
logging.info("\t\tTotal missing for Top 50: {}".format(len(top_50_missing)))
logging.info("Total commands: {}".format(total_commands))
total_tracked_commands = len(tracked_commands_json.keys())
logging.info("Total tracked commands: {}".format(total_tracked_commands))
logging.info(
"Total tracked commands pct: {}".format(total_tracked_commands_pct)
)
all_groups = groups_json.keys()
total_groups = len(all_groups)
logging.info("Total groups: {}".format(total_groups))
total_tracked_groups = len(tracked_groups)
logging.info("Total tracked groups: {}".format(total_tracked_groups))
logging.info(
"Total untracked groups: {}".format(total_groups - total_tracked_groups)
)
logging.info("Printing untracked groups:")
for group_name in all_groups:
if group_name not in tracked_groups:
logging.info(" - {}".format(group_name))
logging.info("Top 10 fully tracked?: {}".format(len(top_10_missing) == 0))
logging.info("Top 30 fully tracked?: {}".format(len(top_30_missing) == 0))
if len(top_30_missing) > 0:
logging.info("\t\tTotal missing for Top 30: {}".format(len(top_30_missing)))

logging.info("Top 50 fully tracked?: {}".format(len(top_50_missing) == 0))
if len(top_50_missing) > 0:
logging.info("\t\tTotal missing for Top 50: {}".format(len(top_50_missing)))

if overall_result is False and fail_on_required_diff:
logging.error(
Expand Down