##// END OF EJS Templates
tasks: change sampling rates for something better suited for big amounts of data
ergo -
Show More
@@ -53,15 +53,16 b' from appenlight.lib.enums import ReportType'
53
53
54 log = get_task_logger(__name__)
54 log = get_task_logger(__name__)
55
55
56 sample_boundries = list(range(100, 10000, 100))
56 sample_boundries = list(range(100, 1000, 100)) + \
57 list(range(1000, 10000, 1000)) + \
58 list(range(10000, 100000, 5000))
57
59
58
60
59 def pick_sample(total_occurences, report_type=1):
61 def pick_sample(total_occurences, report_type=None):
60 every = 1.0
62 every = 1.0
61 position = bisect.bisect_left(sample_boundries, total_occurences)
63 position = bisect.bisect_left(sample_boundries, total_occurences)
62 if position > 0:
64 if position > 0:
63 # 404
65 if report_type == ReportType.not_found:
64 if report_type == 2:
65 divide = 10.0
66 divide = 10.0
66 else:
67 else:
67 divide = 100.0
68 divide = 100.0
General Comments 0
You need to be logged in to leave comments. Login now