mirror of
				https://github.com/matrix-org/synapse.git
				synced 2025-10-31 00:01:33 +01:00 
			
		
		
		
	Add some comments about the reactor tick time metric
This commit is contained in:
		
							parent
							
								
									b0d9e633ee
								
							
						
					
					
						commit
						87b7d72760
					
				| @ -146,10 +146,15 @@ def runUntilCurrentTimer(func): | |||||||
|             num_pending += 1 |             num_pending += 1 | ||||||
| 
 | 
 | ||||||
|         num_pending += len(reactor.threadCallQueue) |         num_pending += len(reactor.threadCallQueue) | ||||||
| 
 |  | ||||||
|         start = time.time() * 1000 |         start = time.time() * 1000 | ||||||
|         ret = func(*args, **kwargs) |         ret = func(*args, **kwargs) | ||||||
|         end = time.time() * 1000 |         end = time.time() * 1000 | ||||||
|  | 
 | ||||||
|  |         # record the amount of wallclock time spent running pending calls. | ||||||
|  |         # This is a proxy for the actual amount of time between reactor polls, | ||||||
|  |         # since about 25% of time is actually spent running things triggered by | ||||||
|  |         # I/O events, but that is harder to capture without rewriting half the | ||||||
|  |         # reactor. | ||||||
|         tick_time.inc_by(end - start) |         tick_time.inc_by(end - start) | ||||||
|         pending_calls_metric.inc_by(num_pending) |         pending_calls_metric.inc_by(num_pending) | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user