9bb2eac719 
								
									
								
							
								 
							
						 
						
							
							
								
								Bump black from 22.12.0 to 23.1.0 ( #15103 )  
							
							
							
						 
						
							2023-02-22 15:29:09 -05:00  
				
					
						
							
							
								 
						
							
							
								d8cc86eff4 
								
									
								
							
								 
							
						 
						
							
							
								
								Remove redundant types from comments. ( #14412 )  
							
							... 
							
							
							
							Remove type hints from comments which have been added
as Python type hints. This helps avoid drift between comments
and reality, as well as removing redundant information.
Also adds some missing type hints which were simple to fill in. 
							
						 
						
							2022-11-16 15:25:24 +00:00  
				
					
						
							
							
								 
						
							
							
								cf65433de2 
								
									
								
							
								 
							
						 
						
							
							
								
								Fix a memory leak when running the unit tests. ( #13798 )  
							
							
							
						 
						
							2022-09-14 15:29:05 +00:00  
				
					
						
							
							
								 
						
							
							
								cf11919ddd 
								
									
								
							
								 
							
						 
						
							
							
								
								Fix cache metrics not being updated when not using the legacy exposition module. ( #13717 )  
							
							
							
						 
						
							2022-09-08 15:30:48 +01:00  
				
					
						
							
							
								 
						
							
							
								b455c2a5ec 
								
									
								
							
								 
							
						 
						
							
							
								
								Update Grafana dashboard to not use legacy metric names. ( #13714 )  
							
							
							
						 
						
							2022-09-06 12:21:21 +01:00  
				
					
						
							
							
								 
						
							
							
								be4250c7a8 
								
									
								
							
								 
							
						 
						
							
							
								
								Add experimental configuration option to allow disabling legacy Prometheus metric names. ( #13540 )  
							
							... 
							
							
							
							Co-authored-by: David Robertson <davidr@element.io> 
							
						 
						
							2022-08-24 11:35:54 +00:00  
				
					
						
							
							
								 
						
							
							
								11df4ec6c2 
								
									
								
							
								 
							
						 
						
							
							
								
								Add more type hints to the main state store. ( #12267 )  
							
							
							
						 
						
							2022-03-31 13:38:09 -04:00  
				
					
						
							
							
								 
						
							
							
								0dbbe33a65 
								
									
								
							
								 
							
						 
						
							
							
								
								Track cache invalidations ( #12000 )  
							
							... 
							
							
							
							Currently we only track evictions due to size or time constraints. 
							
						 
						
							2022-02-15 14:31:04 +00:00  
				
					
						
							
							
								 
						
							
							
								7468723697 
								
									
								
							
								 
							
						 
						
							
							
								
								Add most missing type hints to synapse.util ( #11328 )  
							
							
							
						 
						
							2021-11-16 08:47:36 -05:00  
				
					
						
							
							
								 
						
							
							
								a2d7195e01 
								
									
								
							
								 
							
						 
						
							
							
								
								Track why we're evicting from caches ( #10829 )  
							
							... 
							
							
							
							So we can see distinguish between "evicting because the cache is too big" and "evicting because the cache entries haven't been recently used". 
							
						 
						
							2021-09-22 10:59:52 +01:00  
				
					
						
							
							
								 
						
							
							
								524b8ead77 
								
									
								
							
								 
							
						 
						
							
							
								
								Add types to synapse.util. ( #10601 )  
							
							
							
						 
						
							2021-09-10 17:03:18 +01:00  
				
					
						
							
							
								 
						
							
							
								bdfde6dca1 
								
									
								
							
								 
							
						 
						
							
							
								
								Use inline type hints in `http/federation/`, `storage/` and `util/` ( #10381 )  
							
							
							
						 
						
							2021-07-15 12:46:54 -04:00  
				
					
						
							
							
								 
						
							
							
								ef889c98a6 
								
									
								
							
								 
							
						 
						
							
							
								
								Optionally track memory usage of each LruCache ( #9881 )  
							
							... 
							
							
							
							This will double count slightly in the presence of interned strings. It's off by default as it can consume a lot of resources. 
							
						 
						
							2021-05-05 16:54:36 +01:00  
				
					
						
							
							
								 
						
							
							
								4b965c862d 
								
									
								
							
								 
							
						 
						
							
							
								
								Remove redundant "coding: utf-8" lines ( #9786 )  
							
							... 
							
							
							
							Part of #9744 
Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now.
`Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>` 
							
						 
						
							2021-04-14 15:34:27 +01:00  
				
					
						
							
							
								 
						
							
							
								b5efcb577e 
								
									
								
							
								 
							
						 
						
							
							
								
								Make it possible to use dmypy ( #9692 )  
							
							... 
							
							
							
							Running `dmypy run` will do a `mypy` check while spinning up a daemon
that makes rerunning `dmypy run` a lot faster.
`dmypy` doesn't support `follow_imports = silent` and has
`local_partial_types` enabled, so this PR enables those options and
fixes the issues that were newly raised. Note that `local_partial_types`
will be enabled by default in upcoming mypy releases. 
							
						 
						
							2021-03-26 16:49:46 +00:00  
				
					
						
							
							
								 
						
							
							
								4c3827f2c1 
								
									
								
							
								 
							
						 
						
							
							
								
								Enable addtional flake8-bugbear linting checks. ( #9659 )  
							
							
							
						 
						
							2021-03-24 09:34:30 -04:00  
				
					
						
							
							
								 
						
							
							
								0a00b7ff14 
								
									
								
							
								 
							
						 
						
							
							
								
								Update black, and run auto formatting over the codebase ( #9381 )  
							
							... 
							
							
							
							- Update black version to the latest
 - Run black auto formatting over the codebase
    - Run autoformatting according to [`docs/code_style.md
`](80d6dc9783/docs/code_style.md 
							
						 
						
							2021-02-16 22:32:34 +00:00  
				
					
						
							
							
								 
						
							
							
								3ee17585cd 
								
									
								
							
								 
							
						 
						
							
							
								
								Make LruCache register its own metrics ( #8561 )  
							
							... 
							
							
							
							rather than have everything that instantiates an LruCache manage metrics
separately, have LruCache do it itself. 
							
						 
						
							2020-10-16 15:51:57 +01:00  
				
					
						
							
							
								 
						
							
							
								aec294ee0d 
								
									
								
							
								 
							
						 
						
							
							
								
								Use slots in attrs classes where possible ( #8296 )  
							
							... 
							
							
							
							slots use less memory (and attribute access is faster) while slightly
limiting the flexibility of the class attributes. This focuses on objects
which are instantiated "often" and for short periods of time. 
							
						 
						
							2020-09-14 12:50:06 -04:00  
				
					
						
							
							
								 
						
							
							
								c619253db8 
								
									
								
							
								 
							
						 
						
							
							
								
								Stop sub-classing object ( #8249 )  
							
							
							
						 
						
							2020-09-04 06:54:56 -04:00  
				
					
						
							
							
								 
						
							
							
								d4676910c9 
								
							
								 
							
						 
						
							
							
								
								remove miscellaneous PY2 code  
							
							
							
						 
						
							2020-05-15 19:37:41 +01:00  
				
					
						
							
							
								 
						
							
							
								7cb8b4bc67 
								
									
								
							
								 
							
						 
						
							
							
								
								Allow configuration of Synapse's cache without using synctl or environment variables ( #6391 )  
							
							
							
						 
						
							2020-05-11 18:45:23 +01:00  
				
					
						
							
							
								 
						
							
							
								54fef094b3 
								
									
								
							
								 
							
						 
						
							
							
								
								Remove usage of deprecated logger.warn method from codebase ( #6271 )  
							
							... 
							
							
							
							Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated. 
							
						 
						
							2019-10-31 10:23:24 +00:00  
				
					
						
							
							
								 
						
							
							
								864f144543 
								
									
								
							
								 
							
						 
						
							
							
								
								Fix up some typechecking ( #6150 )  
							
							... 
							
							
							
							* type checking fixes
* changelog 
							
						 
						
							2019-10-02 05:29:01 -07:00  
				
					
						
							
							
								 
						
							
							
								418635e68a 
								
									
								
							
								 
							
						 
						
							
							
								
								Add a prometheus metric for active cache lookups. ( #5750 )  
							
							... 
							
							
							
							* Add a prometheus metric for active cache lookups.
* changelog 
							
						 
						
							2019-07-24 11:33:13 +01:00  
				
					
						
							
							
								 
						
							
							
								32e7c9e7f2 
								
									
								
							
								 
							
						 
						
							
							
								
								Run Black. ( #5482 )  
							
							
							
						 
						
							2019-06-20 19:32:02 +10:00  
				
					
						
							
							
								 
						
							
							
								7ee94fc1ba 
								
							
								 
							
						 
						
							
							
								
								Log which cache is throwing exceptions  
							
							
							
						 
						
							2018-09-26 12:43:08 +01:00  
				
					
						
							
							
								 
						
							
							
								49af402019 
								
							
								 
							
						 
						
							
							
								
								run isort  
							
							
							
						 
						
							2018-07-09 16:09:20 +10:00  
				
					
						
							
							
								 
						
							
							
								042eedfa2b 
								
							
								 
							
						 
						
							
							
								
								Add hacky cache factor override system  
							
							
							
						 
						
							2018-06-04 15:39:28 +01:00  
				
					
						
							
							
								 
						
							
							
								357c74a50f 
								
							
								 
							
						 
						
							
							
								
								add comment about why unreg  
							
							
							
						 
						
							2018-05-28 19:14:41 +10:00  
				
					
						
							
							
								 
						
							
							
								754826a830 
								
							
								 
							
						 
						
							
							
								
								Merge remote-tracking branch 'origin/develop' into 3218-official-prom  
							
							
							
						 
						
							2018-05-28 18:57:23 +10:00  
				
					
						
							
							
								 
						
							
							
								071206304d 
								
							
								 
							
						 
						
							
							
								
								cleanup pep8 errors  
							
							
							
						 
						
							2018-05-22 16:54:22 -05:00  
				
					
						
							
							
								 
						
							
							
								85ba83eb51 
								
							
								 
							
						 
						
							
							
								
								fixes  
							
							
							
						 
						
							2018-05-22 16:28:23 -05:00  
				
					
						
							
							
								 
						
							
							
								df9f72d9e5 
								
							
								 
							
						 
						
							
							
								
								replacing portions  
							
							
							
						 
						
							2018-05-21 19:47:37 -05:00  
				
					
						
							
							
								 
						
							
							
								73cbdef5f7 
								
							
								 
							
						 
						
							
							
								
								fix py3 intern and remove unnecessary py3 encode  
							
							... 
							
							
							
							Signed-off-by: Adrian Tschira <nota@notafile.com> 
							
						 
						
							2018-05-19 17:35:31 +02:00  
				
					
						
							
							
								 
						
							
							
								495f075b41 
								
							
								 
							
						 
						
							
							
								
								Increase default cache factor size.  
							
							
							
						 
						
							2017-07-04 09:58:32 +01:00  
				
					
						
							
							
								 
						
							
							
								efab1dadde 
								
							
								 
							
						 
						
							
							
								
								Remove DEBUG_CACHES  
							
							
							
						 
						
							2017-04-25 10:54:09 +01:00  
				
					
						
							
							
								 
						
							
							
								d134d0935e 
								
							
								 
							
						 
						
							
							
								
								Only intern ascii strings  
							
							
							
						 
						
							2017-04-24 14:07:48 +01:00  
				
					
						
							
							
								 
						
							
							
								380dba1020 
								
							
								 
							
						 
						
							
							
								
								Measure metrics of string_cache  
							
							
							
						 
						
							2017-01-17 17:04:46 +00:00  
				
					
						
							
							
								 
						
							
							
								73c7112433 
								
							
								 
							
						 
						
							
							
								
								Change CacheMetrics to be quicker  
							
							... 
							
							
							
							We change it so that each cache has an individual CacheMetric, instead
of having one global CacheMetric. This means that when a cache tries to
increment a counter it does not need to go through so many indirections. 
							
						 
						
							2016-06-03 11:26:52 +01:00  
				
					
						
							
							
								 
						
							
							
								8122ad7bab 
								
							
								 
							
						 
						
							
							
								
								Simplify intern_dict  
							
							
							
						 
						
							2016-03-23 16:41:54 +00:00  
				
					
						
							
							
								 
						
							
							
								acdfef7b14 
								
							
								 
							
						 
						
							
							
								
								Intern all the things  
							
							
							
						 
						
							2016-03-23 16:25:54 +00:00  
				
					
						
							
							
								 
						
							
							
								75daede92f 
								
							
								 
							
						 
						
							
							
								
								String intern  
							
							
							
						 
						
							2016-03-23 14:53:53 +00:00  
				
					
						
							
							
								 
						
							
							
								6c28ac260c 
								
							
								 
							
						 
						
							
							
								
								copyrights  
							
							
							
						 
						
							2016-01-07 04:26:29 +00:00  
				
					
						
							
							
								 
						
							
							
								4807616e16 
								
							
								 
							
						 
						
							
							
								
								Wire up the dictionarycache to the metrics  
							
							
							
						 
						
							2015-08-12 10:13:35 +01:00  
				
					
						
							
							
								 
						
							
							
								2df8dd9b37 
								
							
								 
							
						 
						
							
							
								
								Move all the caches into their own package, synapse.util.caches  
							
							
							
						 
						
							2015-08-11 18:00:59 +01:00