Fix timing of async functions and make histogram finer at lower ranges
Some checks failed
Build Docker image / test (push) Successful in 4m34s
Build Docker image / build (push) Has been cancelled

This commit is contained in:
Roman Krček
2025-05-13 18:14:36 +02:00
parent 020a6271cf
commit b01a799a94
3 changed files with 8 additions and 5 deletions

View File

@@ -1,10 +1,10 @@
from prometheus_client import Histogram, start_http_server
DOWNLOAD_DURATION = Histogram(
'tt_download_time',
'Time taken to download a single tiktok video',
'download_time_seconds',
'Time taken to download a single media item',
['service'],
buckets=[0.1, 0.5, 1, 2, 5, 10, 30, 60, 120]
buckets=[0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, 100]
)
FILE_SIZE_BYTES = Histogram(
@@ -13,6 +13,7 @@ FILE_SIZE_BYTES = Histogram(
['service'],
buckets=[
1e6, # 1 MB
2e6, # 2 MB
5e6, # 5 MB
10e6, # 10 MB
25e6, # 25 MB