mirror of
				https://github.com/carrotquest/django-clickhouse.git
				synced 2025-10-31 16:07:56 +03:00 
			
		
		
		
	Added some statsd counters for sync process
This commit is contained in:
		
							parent
							
								
									38db27626c
								
							
						
					
					
						commit
						6c9e217161
					
				|  | @ -195,6 +195,7 @@ class ClickHouseModel(with_metaclass(ClickHouseModelMeta, InfiModel)): | |||
| 
 | ||||
|                 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')): | ||||
|  | @ -202,6 +203,8 @@ class ClickHouseModel(with_metaclass(ClickHouseModelMeta, InfiModel)): | |||
|                 else: | ||||
|                     import_objects = [] | ||||
| 
 | ||||
|                 statsd.incr(statsd_key.format('import_objects', count=len(import_objects))) | ||||
| 
 | ||||
|                 if import_objects: | ||||
|                     with statsd.timer(statsd_key.format('steps.get_insert_batch')): | ||||
|                         batch = cls.get_insert_batch(import_objects) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user