mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-31 18:58:01 +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)
|
||||
errors = list()
|
||||
lanforge_errors = list()
|
||||
partial_failures = list()
|
||||
major_errors = list()
|
||||
successes = list()
|
||||
for index in system_variations.index:
|
||||
variation = system_variations.iloc[index]
|
||||
result = 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]
|
||||
system = self.df.loc[self.df[['Python version', 'LANforge version', 'OS Version', 'Python Environment', 'IP']].isin(dict(
|
||||
variation).values()).all(axis=1), :]
|
||||
result = system.dropna(subset=['STDERR']).shape[0]
|
||||
errors.append(result)
|
||||
|
||||
lanforge_result = self.df.loc[self.df[['Python version', 'LANforge version', 'OS Version', 'Python Environment', 'IP']].isin(dict(
|
||||
variation).values()).all(axis=1), :].dropna(subset=['LANforge Error']).shape[0]
|
||||
lanforge_result = system.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)
|
||||
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['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:
|
||||
system_variations.to_csv('regression_suite_results.csv')
|
||||
else:
|
||||
print(system_variations.sort_values('errors'))
|
||||
print(system_variations.sort_values('Successes'))
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user