diff options
author | 2016-11-30 15:04:59 +0200 | |
---|---|---|
committer | 2016-11-30 15:04:59 +0200 | |
commit | b812770167d37125b3f3e1b0673517d8f83393ac (patch) | |
tree | b99f73265f7f713995ed9ccdf5016e01c45b9ca9 /doc/AnalyticsWebReport.py | |
parent | 5b4fcd558793cf7222cc260d8d5aead03cf1cb86 (diff) | |
parent | 3beb07058c3781d9f3ce888be636b6484f750c96 (diff) |
merging with latest master
Signed-off-by: imarom <imarom@cisco.com>
Conflicts:
src/main_dpdk.cpp
Diffstat (limited to 'doc/AnalyticsWebReport.py')
-rwxr-xr-x | doc/AnalyticsWebReport.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/AnalyticsWebReport.py b/doc/AnalyticsWebReport.py index 182d8367..bd4a9a2b 100755 --- a/doc/AnalyticsWebReport.py +++ b/doc/AnalyticsWebReport.py @@ -3,6 +3,7 @@ import sys import AnalyticsConnect as ac
import TRexDataAnalysis as tr
import time
+import datetime
def main(verbose = False):
@@ -10,12 +11,14 @@ def main(verbose = False): print('Retrieving data from Google Analytics')
analytics = ac.initialize_analyticsreporting()
current_date = time.strftime("%Y-%m-%d")
- response = ac.get_report(analytics, '2016-11-06', current_date)
+ k_days_ago = datetime.datetime.now() - datetime.timedelta(days=15)
+ start_date = str(k_days_ago.date())
+ response = ac.get_report(analytics, start_date, current_date)
ga_all_data_dict, setups = ac.export_to_tuples(response)
dest_path = os.path.join(os.getcwd(), 'build', 'images')
if verbose:
print('Saving data to %s' % dest_path)
- tr.create_all_data(ga_all_data_dict, setups, '2016-11-06', current_date, save_path = dest_path,
+ tr.create_all_data(ga_all_data_dict, setups, start_date, current_date, save_path = dest_path,
add_stats='yes')
if verbose:
print('Done without errors.')
|