mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
mine_regression_results: Support Python environment control variable
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -23,18 +23,32 @@ class MineRegression:
|
|||||||
dfs = [pd.merge(results[n], systems[n], on='IP') for n in range(len(self.ips))]
|
dfs = [pd.merge(results[n], systems[n], on='IP') for n in range(len(self.ips))]
|
||||||
self.df = pd.concat(dfs)
|
self.df = pd.concat(dfs)
|
||||||
self.df = self.df[self.df['STDOUT'] == 'STDOUT']
|
self.df = self.df[self.df['STDOUT'] == 'STDOUT']
|
||||||
|
print(self.df.columns)
|
||||||
|
|
||||||
def generate_report(self):
|
def generate_report(self):
|
||||||
system_variations = self.df[
|
system_variations = self.df[
|
||||||
['IP', 'Python version', 'LANforge version', 'OS Version', 'Hostname']].drop_duplicates(
|
['IP', 'Python version', 'LANforge version', 'OS Version', 'Hostname', 'Python Environment']].drop_duplicates(
|
||||||
['Python version', 'LANforge version', 'OS Version']).reset_index(drop=True)
|
['IP', 'Python version', 'LANforge version', 'OS Version', 'Hostname', 'Python Environment']).reset_index(drop=True)
|
||||||
|
print(self.df.drop_duplicates('IP'))
|
||||||
|
print(self.df['IP'].value_counts())
|
||||||
|
print(system_variations['IP'].value_counts())
|
||||||
errors = list()
|
errors = list()
|
||||||
|
lanforge_errors = list()
|
||||||
for index in system_variations.index:
|
for index in system_variations.index:
|
||||||
|
print(system_variations['IP'][index])
|
||||||
variation = system_variations.iloc[index]
|
variation = system_variations.iloc[index]
|
||||||
result = self.df.loc[self.df[['Python version', 'LANforge version', 'OS Version']].isin(dict(
|
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]
|
variation).values()).all(axis=1), :].dropna(subset=['STDERR']).shape[0]
|
||||||
|
print(result)
|
||||||
errors.append(result)
|
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]
|
||||||
|
print(result)
|
||||||
|
lanforge_errors.append(lanforge_result)
|
||||||
system_variations['errors'] = errors
|
system_variations['errors'] = errors
|
||||||
|
system_variations['LANforge errors'] = lanforge_errors
|
||||||
|
system_variations['Python errors'] = system_variations['errors'] - system_variations['LANforge errors']
|
||||||
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:
|
||||||
@@ -50,7 +64,7 @@ def main():
|
|||||||
|
|
||||||
if args.ip is None:
|
if args.ip is None:
|
||||||
args.ip = ['192.168.92.18', '192.168.92.12', '192.168.93.51', '192.168.92.15']
|
args.ip = ['192.168.92.18', '192.168.92.12', '192.168.93.51', '192.168.92.15']
|
||||||
|
#args.ip = ['192.168.93.51']
|
||||||
Miner = MineRegression(system_information=args.system_info,
|
Miner = MineRegression(system_information=args.system_info,
|
||||||
save_csv=args.save_csv,
|
save_csv=args.save_csv,
|
||||||
ips=args.ip)
|
ips=args.ip)
|
||||||
|
|||||||
Reference in New Issue
Block a user