mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
lf_report.py: added set_table_dataframe_from_csv lf_snp_test.py : generate html and pdf for snp
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -37,17 +37,17 @@ class lf_report():
|
||||
#_path the report directory under which the report directories will be created.
|
||||
_path = "/home/lanforge/report-data",
|
||||
_alt_path = "",
|
||||
_results_dir_name = "LANforge_Test_Results",
|
||||
_output_format = 'html', # pass in on the write functionality, current not used
|
||||
_dataframe="",
|
||||
_date = "",
|
||||
_title="LANForge Test Run Heading",
|
||||
_table_title="LANForge Table Heading",
|
||||
_graph_title="LANForge Graph Title",
|
||||
_obj = "",
|
||||
_obj_title = "",
|
||||
_date="",
|
||||
_output_html="outfile.html",
|
||||
_output_pdf="outfile.pdf",
|
||||
_results_dir_name = "LANforge_Test_Results",
|
||||
_output_format = 'html', # pass in on the write functionality, current not used
|
||||
_dataframe="",
|
||||
_path_date_time=""): # this is where the final report is placed.
|
||||
#other report paths,
|
||||
|
||||
@@ -126,7 +126,8 @@ class lf_report():
|
||||
if self.date != "":
|
||||
self.date_time_directory = str(self.date) + str("_") + str(self.results_dir_name)
|
||||
else:
|
||||
self.date_time_directory = str(datetime.datetime.now().strftime("%Y_%m_%d_%H_%M_%S_")).replace(':','-') + str(self.results_dir_name)
|
||||
self.date = str(datetime.datetime.now().strftime("%Y_%m_%d_%H_%M_%S")).replace(':','-')
|
||||
self.date_time_directory = self.date + str("_") + str(self.results_dir_name)
|
||||
|
||||
#def set_date_time_directory(self,date_time_directory):
|
||||
# self.date_time_directory = date_time_directory
|
||||
@@ -158,7 +159,7 @@ class lf_report():
|
||||
def set_date(self,_date):
|
||||
self.date = _date
|
||||
|
||||
def set_dataframe(self,_dataframe):
|
||||
def set_table_dataframe(self,_dataframe):
|
||||
self.dataframe = _dataframe
|
||||
|
||||
def set_custom_html(self,_custom_html):
|
||||
|
||||
@@ -1644,7 +1644,7 @@ LANforge GUI what is displayed in the Column and how to access the value with cl
|
||||
print("ap_dict: {}".format(ap_dict))
|
||||
|
||||
# Logging information
|
||||
report = lf_report()
|
||||
report = lf_report(_results_dir_name = "Scaling_and_Performance")
|
||||
|
||||
if args.csv_outfile != None:
|
||||
current_time = time.strftime("%m_%d_%Y_%H_%M_%S", time.localtime())
|
||||
@@ -2434,15 +2434,25 @@ LANforge GUI what is displayed in the Column and how to access the value with cl
|
||||
logg.info("Full test passed, all connections increased rx rate")
|
||||
##########################################
|
||||
#
|
||||
# Print out location of results
|
||||
# Build Results
|
||||
#
|
||||
##########################################
|
||||
if args.csv_outfile != None:
|
||||
logg.info("Report CSV: {}".format(csv_outfile))
|
||||
logg.info("Report CSV Results: {}".format(csv_results))
|
||||
report.set_title("Scaling And Performance")
|
||||
report.build_banner()
|
||||
report.set_table_title("Scaling And Performance Throught put")
|
||||
report.build_table_title()
|
||||
report.set_table_dataframe_from_csv(csv_results)
|
||||
report.build_table()
|
||||
report.write_html()
|
||||
report.write_pdf()
|
||||
|
||||
if args.log:
|
||||
logg.info("output_log: {}".format(outfile_log))
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user