From 29eb8b7e7c9360a3768786ffe571d5582f1978e9 Mon Sep 17 00:00:00 2001 From: Pawel Piatek Date: Wed, 9 Feb 2022 23:15:26 +0100 Subject: [PATCH] post_process: simplify highest value function This logic is just what "any" does. Signed-off-by: Pawel Piatek Change-Id: Id6384e7e284dfabb73f9ecfbc10c40643c3c5177 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11490 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- autorun_post.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/autorun_post.py b/autorun_post.py index 29eac15ca..c9b75a20d 100755 --- a/autorun_post.py +++ b/autorun_post.py @@ -9,15 +9,6 @@ import re import pandas as pd -def highest_value(inp): - ret_value = False - for x in inp: - if x: - return True - else: - return False - - def generateTestCompletionTables(output_dir, completion_table): data_table = pd.DataFrame(completion_table, columns=["Agent", "Domain", "Test", "With Asan", "With UBsan"]) data_table.to_html(os.path.join(output_dir, 'completions_table.html')) @@ -27,9 +18,9 @@ def generateTestCompletionTables(output_dir, completion_table): pivot_by_agent.to_html(os.path.join(output_dir, "post_process", 'completions_table_by_agent.html')) pivot_by_test = pd.pivot_table(data_table, index=["Domain", "Test", "Agent"]) pivot_by_test.to_html(os.path.join(output_dir, "post_process", 'completions_table_by_test.html')) - pivot_by_asan = pd.pivot_table(data_table, index=["Domain", "Test"], values=["With Asan"], aggfunc=highest_value) + pivot_by_asan = pd.pivot_table(data_table, index=["Domain", "Test"], values=["With Asan"], aggfunc=any) pivot_by_asan.to_html(os.path.join(output_dir, "post_process", 'completions_table_by_asan.html')) - pivot_by_ubsan = pd.pivot_table(data_table, index=["Domain", "Test"], values=["With UBsan"], aggfunc=highest_value) + pivot_by_ubsan = pd.pivot_table(data_table, index=["Domain", "Test"], values=["With UBsan"], aggfunc=any) pivot_by_ubsan.to_html(os.path.join(output_dir, "post_process", 'completions_table_by_ubsan.html'))