def main(args): global client client = InfluxDBClient(args.host, args.port, args.user, args.password, args.project) osc.conf.get_config(override_apiurl=args.apiurl) apiurl = osc.conf.config['apiurl'] osc.conf.config['debug'] = args.debug # Ensure database exists. client.create_database(client._database) metrics_release.ingest(client) if args.release_only: return # Use separate cache since it is persistent. _, package = project_pseudometa_package(apiurl, args.project) if args.wipe_cache: Cache.delete_all() if args.heavy_cache: Cache.PATTERNS[r'/search/request'] = sys.maxsize Cache.PATTERNS[r'/source/[^/]+/{}/_history'.format( package)] = sys.maxsize Cache.PATTERNS[r'/source/[^/]+/{}/[^/]+\?rev=.*'.format( package)] = sys.maxsize Cache.init('metrics') Config(apiurl, args.project) api = StagingAPI(apiurl, args.project) print('dashboard: wrote {:,} points'.format(ingest_dashboard(api))) global who_workaround_swap, who_workaround_miss who_workaround_swap = who_workaround_miss = 0 points_requests = ingest_requests(api, args.project) points_schedule = ingest_release_schedule(args.project) print('who_workaround_swap', who_workaround_swap) print('who_workaround_miss', who_workaround_miss) print('wrote {:,} points and {:,} annotation points to db'.format( points_requests, points_schedule))
def main(args): global client client = InfluxDBClient(args.host, args.port, args.user, args.password, args.project) osc.conf.get_config(override_apiurl=args.apiurl) apiurl = osc.conf.config['apiurl'] osc.conf.config['debug'] = args.debug # Ensure database exists. client.create_database(client._database) metrics_release.ingest(client) if args.release_only: return # Use separate cache since it is persistent. _, package = project_pseudometa_package(apiurl, args.project) if args.wipe_cache: Cache.delete_all() if args.heavy_cache: Cache.PATTERNS[r'/search/request'] = sys.maxint Cache.PATTERNS[r'/source/[^/]+/{}/_history'.format(package)] = sys.maxint Cache.PATTERNS[r'/source/[^/]+/{}/[^/]+\?rev=.*'.format(package)] = sys.maxint Cache.init('metrics') Config(apiurl, args.project) api = StagingAPI(apiurl, args.project) print('dashboard: wrote {:,} points'.format(ingest_dashboard(api))) global who_workaround_swap, who_workaround_miss who_workaround_swap = who_workaround_miss = 0 points_requests = ingest_requests(api, args.project) points_schedule = ingest_release_schedule(args.project) print('who_workaround_swap', who_workaround_swap) print('who_workaround_miss', who_workaround_miss) print('wrote {:,} points and {:,} annotation points to db'.format( points_requests, points_schedule))
def main(args): global client client = InfluxDBClient(args.host, args.port, args.user, args.password, args.project) osc.conf.get_config(override_apiurl=args.apiurl) osc.conf.config['debug'] = args.debug # Ensure database exists. client.create_database(client._database) metrics_release.ingest(client) if args.release_only: return # Use separate cache since it is persistent. Cache.CACHE_DIR = Cache.CACHE_DIR + '-metrics' if args.wipe_cache: Cache.delete_all() Cache.PATTERNS['/search/request'] = sys.maxint Cache.init() Config(args.project) api = StagingAPI(osc.conf.config['apiurl'], args.project) global who_workaround_swap, who_workaround_miss who_workaround_swap = who_workaround_miss = 0 points_requests = ingest_requests(api, args.project) points_schedule = ingest_release_schedule(args.project) print('who_workaround_swap', who_workaround_swap) print('who_workaround_miss', who_workaround_miss) print('wrote {:,} points and {:,} annotation points to db'.format( points_requests, points_schedule))