From f6641c898b4ef5a6bd7f0d504404ac3576f9a397 Mon Sep 17 00:00:00 2001 From: itraviv Date: Sun, 13 Nov 2016 17:38:22 +0200 Subject: added scripts and asciidoc for automated creation of trex analytics report. the creation is done by issuing './b build --performance' command Signed-off-by: itraviv --- doc/AnalyticsWebReport.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 doc/AnalyticsWebReport.py (limited to 'doc/AnalyticsWebReport.py') diff --git a/doc/AnalyticsWebReport.py b/doc/AnalyticsWebReport.py new file mode 100755 index 00000000..9bf186bd --- /dev/null +++ b/doc/AnalyticsWebReport.py @@ -0,0 +1,18 @@ +import os +import sys +import AnalyticsConnect as ac +import TRexDataAnalysis as tr +import time + + +def main(): + analytics = ac.initialize_analyticsreporting() + # print 'retrieving data from Google Analytics' + current_date = time.strftime("%Y-%m-%d") + response = ac.get_report(analytics, '2016-11-06', current_date) + ga_all_data_dict, setups = ac.export_to_tuples(response) + tr.create_all_data(ga_all_data_dict, setups, '2016-11-06', current_date, save_path=os.getcwd() + '/images/', + add_stats='yes') + +if __name__ == "__main__": + main() -- cgit 1.2.3-korg