diff options
author | itraviv <itraviv@cisco.com> | 2016-11-13 17:38:22 +0200 |
---|---|---|
committer | itraviv <itraviv@cisco.com> | 2016-11-13 17:39:07 +0200 |
commit | f6641c898b4ef5a6bd7f0d504404ac3576f9a397 (patch) | |
tree | 43f8aa5c4f20359dedebaaa0b045e54cd2f5767a /doc/AnalyticsWebReport.py | |
parent | 47f6ce0eed8d7f6a32f0a0d723a02e440d9d0fc5 (diff) |
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 <itraviv@cisco.com>
Diffstat (limited to 'doc/AnalyticsWebReport.py')
-rwxr-xr-x | doc/AnalyticsWebReport.py | 18 |
1 files changed, 18 insertions, 0 deletions
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()
|