mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2024-11-14 05:16:34 +03:00
Added some statsd counters for sync process
This commit is contained in:
parent
6c9e217161
commit
0829e5bacd
|
@ -260,6 +260,7 @@ class ClickHouseMultiModel(ClickHouseModel):
|
|||
|
||||
with statsd.timer(statsd_key.format('steps.get_operations')):
|
||||
operations = storage.get_operations(import_key, cls.get_sync_batch_size())
|
||||
statsd.incr(statsd_key.format('operations', count=len(operations)))
|
||||
|
||||
if operations:
|
||||
with statsd.timer(statsd_key.format('steps.get_sync_objects')):
|
||||
|
@ -267,6 +268,8 @@ class ClickHouseMultiModel(ClickHouseModel):
|
|||
else:
|
||||
import_objects = []
|
||||
|
||||
statsd.incr(statsd_key.format('import_objects', count=len(import_objects)))
|
||||
|
||||
if import_objects:
|
||||
batches = {}
|
||||
with statsd.timer(statsd_key.format('steps.get_insert_batch')):
|
||||
|
|
Loading…
Reference in New Issue
Block a user