Add a library for monitoring.

Change-Id: I64c3d143186be938042c12e2455bdb034d3bcba8
Reviewed-on: https://chromium-review.googlesource.com/1079639
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
This commit is contained in:
Edward Lemur
2018-07-12 00:54:05 +00:00
committed by Commit Bot
parent d64781e17a
commit 32e3d1e37c
11 changed files with 704 additions and 4 deletions

24
upload_metrics.py Normal file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env python
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import sys
import urllib2
APP_URL = 'https://cit-cli-metrics.appspot.com'
def main():
metrics = raw_input()
try:
urllib2.urlopen(APP_URL + '/upload', metrics)
except urllib2.HTTPError:
pass
return 0
if __name__ == '__main__':
sys.exit(main())