[mod] metrics: add to pylint and justify indentations
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
		
							parent
							
								
									65c29081cc
								
							
						
					
					
						commit
						c54bf42cb9
					
				
							
								
								
									
										3
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								Makefile
									
									
									
									
									
								
							| @ -199,7 +199,8 @@ PYLINT_FILES=\ | |||||||
| 	searx/engines/yahoo_news.py \
 | 	searx/engines/yahoo_news.py \
 | ||||||
| 	searx/engines/apkmirror.py \
 | 	searx/engines/apkmirror.py \
 | ||||||
| 	searx/engines/artic.py \
 | 	searx/engines/artic.py \
 | ||||||
| 	searx_extra/update/update_external_bangs.py | 	searx_extra/update/update_external_bangs.py \
 | ||||||
|  | 	searx/metrics/__init__.py | ||||||
| 
 | 
 | ||||||
| test.pylint: pyenvinstall | test.pylint: pyenvinstall | ||||||
| 	$(call cmd,pylint,$(PYLINT_FILES)) | 	$(call cmd,pylint,$(PYLINT_FILES)) | ||||||
|  | |||||||
| @ -1,4 +1,5 @@ | |||||||
| # SPDX-License-Identifier: AGPL-3.0-or-later | # SPDX-License-Identifier: AGPL-3.0-or-later | ||||||
|  | # pylint: disable=missing-module-docstring, missing-function-docstring | ||||||
| 
 | 
 | ||||||
| import typing | import typing | ||||||
| import math | import math | ||||||
| @ -63,7 +64,7 @@ def initialize(engine_names=None): | |||||||
|     """ |     """ | ||||||
|     Initialize metrics |     Initialize metrics | ||||||
|     """ |     """ | ||||||
|     global counter_storage, histogram_storage |     global counter_storage, histogram_storage # pylint: disable=global-statement | ||||||
| 
 | 
 | ||||||
|     counter_storage = CounterStorage() |     counter_storage = CounterStorage() | ||||||
|     histogram_storage = HistogramStorage() |     histogram_storage = HistogramStorage() | ||||||
| @ -164,7 +165,8 @@ def get_engines_stats(engine_list): | |||||||
|         max_time_total = max(time_total, max_time_total or 0) |         max_time_total = max(time_total, max_time_total or 0) | ||||||
|         max_result_count = max(result_count, max_result_count or 0) |         max_result_count = max(result_count, max_result_count or 0) | ||||||
| 
 | 
 | ||||||
|         list_time.append({'total': round(time_total, 1), |         list_time.append({ | ||||||
|  |             'total': round(time_total, 1), | ||||||
|             'total_p80': round(time_total_p80, 1), |             'total_p80': round(time_total_p80, 1), | ||||||
|             'total_p95': round(time_total_p95, 1), |             'total_p95': round(time_total_p95, 1), | ||||||
|             'http': round(time_http, 1), |             'http': round(time_http, 1), | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user