intracom-telecom-sdn/nstat

View on GitHub
stress_test/report_gen.py

Summary

Maintainability
C
7 hrs
Test Coverage

Showing 8 of 8 total issues

Function generate_plots has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
Open

def generate_plots(self):
"""
NSTAT post test actions
 
:param args: Object containing user specified parameters \
Severity: Minor
Found in stress_test/report_gen.py - About 2 hrs to fix

Cyclomatic complexity is too high in method generate_plots. (7)
Open

def generate_plots(self):
"""
NSTAT post test actions
 
:param args: Object containing user specified parameters \
Severity: Minor
Found in stress_test/report_gen.py by radon

Cyclomatic complexity is too high in method results_report. (6)
Open

def results_report(self):
"""
Creates a complete report of the test. This is the main method of
this class.
"""
Severity: Minor
Found in stress_test/report_gen.py by radon

Function results_report has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def results_report(self):
"""
Creates a complete report of the test. This is the main method of
this class.
"""
Severity: Minor
Found in stress_test/report_gen.py - About 25 mins to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if self.test_config_json['plots'][plot_index]['x_axis_scale'] == 'log':
plot_options.xscale_log = True
else:
plot_options.xscale_log = False
Severity: Major
Found in stress_test/report_gen.py and 1 other location - About 1 hr to fix
stress_test/report_gen.py on lines 156..159

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if self.test_config_json['plots'][plot_index]['y_axis_scale'] == 'log':
plot_options.yscale_log = True
else:
plot_options.yscale_log = False
Severity: Major
Found in stress_test/report_gen.py and 1 other location - About 1 hr to fix
stress_test/report_gen.py on lines 152..155

Similar blocks of code found in 2 locations. Consider refactoring.
Open

plot_options.x_axis_fct = \
float(eval(self.test_config_json['plots'][plot_index]['x_axis_factor']))
Severity: Minor
Found in stress_test/report_gen.py and 1 other location - About 45 mins to fix
stress_test/report_gen.py on lines 150..151

Similar blocks of code found in 2 locations. Consider refactoring.
Open

plot_options.y_axis_fct = \
float(eval(self.test_config_json['plots'][plot_index]['y_axis_factor']))
Severity: Minor
Found in stress_test/report_gen.py and 1 other location - About 45 mins to fix
stress_test/report_gen.py on lines 148..149
Category
Status