Skip to content

Commit

Permalink
tlsfuzzer/analysis.py: report how many data used out of total data
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgePantelakis committed May 3, 2024
1 parent 43f3673 commit d24320d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/test_tlsfuzzer_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1978,6 +1978,7 @@ def file_selector(*args, **kwargs):
}
self.analysis._bit_size_sign_test = {255: 0.3, 254: 0.7, 253: 0.4}
self.analysis._bit_size_wilcoxon_test = {255: 0.2, 254: 0.8, 253: 0.6}
self.analysis._total_bit_size_data = 100000
self.analysis._total_bit_size_data_used = 10000

self.analysis._bit_size_write_summary("passed", 0.5)
Expand All @@ -1997,7 +1998,8 @@ def file_selector(*args, **kwargs):
)
self.assertEqual(
_summary[5],
"Used 10,000 data observations for results"
"Used 10,000 out of 100,000 available " +
"data observations for results."
)
self.assertEqual(_summary[6], "passed")

Expand Down
8 changes: 6 additions & 2 deletions tlsfuzzer/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1743,8 +1743,12 @@ def _bit_size_write_summary(self, verdict, skillings_mack_pvalue):
np.average(all_wilcoxon_values),
max(all_wilcoxon_values),
) +
"Used {0:,} data observations for results\n"
.format(self._total_bit_size_data_used) +
"Used {0:,} out of {1:,} available data observations "
.format(
self._total_bit_size_data_used,
self._total_bit_size_data
) +
"for results.\n" +
verdict + "\n\n" + ("-" * 88) + "\n" +
"| size | Sign test | Wilcoxon test " +
"| {0} | {1} |\n"
Expand Down

0 comments on commit d24320d

Please sign in to comment.