comparison contrib/perf.py @ 51152:6a78b5a1d1ab stable

perf-tags: fix clear_cache_fnodes to actually clear that cache The function was not doing it what it advertise for a long time. So we fix it and we add a way for the perf extensions to detect broken version.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 03 Dec 2023 04:49:49 +0100
parents 2705748ba166
children 46fed351e451 8fc92193a2cf
comparison
equal deleted inserted replaced
51151:2705748ba166 51152:6a78b5a1d1ab
971 clear_disk_fn = getattr( 971 clear_disk_fn = getattr(
972 tags, 972 tags,
973 "clear_cache_on_disk", 973 "clear_cache_on_disk",
974 _default_clear_on_disk_tags_cache, 974 _default_clear_on_disk_tags_cache,
975 ) 975 )
976 clear_fnodes_fn = getattr( 976 if getattr(tags, 'clear_cache_fnodes_is_working', False):
977 tags, 977 clear_fnodes_fn = tags.clear_cache_fnodes
978 "clear_cache_fnodes", 978 else:
979 _default_clear_on_disk_tags_fnodes_cache, 979 clear_fnodes_fn = _default_clear_on_disk_tags_fnodes_cache
980 )
981 clear_fnodes_rev_fn = getattr( 980 clear_fnodes_rev_fn = getattr(
982 tags, 981 tags,
983 "forget_fnodes", 982 "forget_fnodes",
984 _default_forget_fnodes, 983 _default_forget_fnodes,
985 ) 984 )