Skip to content

Commit

Permalink
post_process: simplify highest value function
Browse files Browse the repository at this point in the history
This logic is just what "any" does.

Signed-off-by: Pawel Piatek <[email protected]>
Change-Id: Id6384e7e284dfabb73f9ecfbc10c40643c3c5177
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11490
Community-CI: Broadcom CI <[email protected]>
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Ben Walker <[email protected]>
Reviewed-by: Jim Harris <[email protected]>
  • Loading branch information
xjjx authored and tomzawadzki committed Mar 9, 2022
1 parent d8a1057 commit 29eb8b7
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions autorun_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@
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'))
Expand All @@ -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'))


Expand Down

0 comments on commit 29eb8b7

Please sign in to comment.