mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
mine_regression_results: Improve output table so it has columns tallying the number of successes, errors, partial errors, partial failures specifically
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -30,22 +30,32 @@ class MineRegression:
|
|||||||
['IP', 'Python version', 'LANforge version', 'OS Version', 'Hostname', 'Python Environment']).reset_index(drop=True)
|
['IP', 'Python version', 'LANforge version', 'OS Version', 'Hostname', 'Python Environment']).reset_index(drop=True)
|
||||||
errors = list()
|
errors = list()
|
||||||
lanforge_errors = list()
|
lanforge_errors = list()
|
||||||
|
partial_failures = list()
|
||||||
|
major_errors = list()
|
||||||
|
successes = list()
|
||||||
for index in system_variations.index:
|
for index in system_variations.index:
|
||||||
variation = system_variations.iloc[index]
|
variation = system_variations.iloc[index]
|
||||||
result = self.df.loc[self.df[['Python version', 'LANforge version', 'OS Version', 'Python Environment', 'IP']].isin(dict(
|
system = self.df.loc[self.df[['Python version', 'LANforge version', 'OS Version', 'Python Environment', 'IP']].isin(dict(
|
||||||
variation).values()).all(axis=1), :].dropna(subset=['STDERR']).shape[0]
|
variation).values()).all(axis=1), :]
|
||||||
|
result = system.dropna(subset=['STDERR']).shape[0]
|
||||||
errors.append(result)
|
errors.append(result)
|
||||||
|
|
||||||
lanforge_result = self.df.loc[self.df[['Python version', 'LANforge version', 'OS Version', 'Python Environment', 'IP']].isin(dict(
|
lanforge_result = system.dropna(subset=['LANforge Error']).shape[0]
|
||||||
variation).values()).all(axis=1), :].dropna(subset=['LANforge Error']).shape[0]
|
partial_failures.append(system[system['Status'] == 'Partial Failure'].shape[0])
|
||||||
|
major_errors.append(system[system['Status'] == 'ERROR'].shape[0])
|
||||||
lanforge_errors.append(lanforge_result)
|
lanforge_errors.append(lanforge_result)
|
||||||
system_variations['errors'] = errors
|
successes.append(system[system['Status'] == 'Success'].shape[0])
|
||||||
|
system_variations['Successes'] = successes
|
||||||
|
system_variations['Errors'] = errors
|
||||||
system_variations['LANforge errors'] = lanforge_errors
|
system_variations['LANforge errors'] = lanforge_errors
|
||||||
system_variations['Python errors'] = system_variations['errors'] - system_variations['LANforge errors']
|
system_variations['Python errors'] = system_variations['Errors'] - system_variations['LANforge errors']
|
||||||
|
system_variations['Partial Failures'] = partial_failures
|
||||||
|
system_variations['Major Errors'] = major_errors
|
||||||
|
system_variations
|
||||||
if self.save_csv:
|
if self.save_csv:
|
||||||
system_variations.to_csv('regression_suite_results.csv')
|
system_variations.to_csv('regression_suite_results.csv')
|
||||||
else:
|
else:
|
||||||
print(system_variations.sort_values('errors'))
|
print(system_variations.sort_values('Successes'))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
Reference in New Issue
Block a user