##// 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 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 62 every = 1.0
61 63 position = bisect.bisect_left(sample_boundries, total_occurences)
62 64 if position > 0:
63 # 404
64 if report_type == 2:
65 if report_type == ReportType.not_found:
65 66 divide = 10.0
66 67 else:
67 68 divide = 100.0
General Comments 0
You need to be logged in to leave comments. Login now