feat: Record processing time of get_ranked_tags_map_uncached on cache miss

This commit is contained in:
Paul Gauthier (aider) 2024-08-17 06:23:23 -07:00
parent 78fb4ae238
commit 27c79d662b

View file

@ -422,9 +422,13 @@ class RepoMap:
return self.map_cache[cache_key]
# If not in cache, generate the map
import time
start_time = time.time()
result = self.get_ranked_tags_map_uncached(
chat_fnames, other_fnames, max_map_tokens, mentioned_fnames, mentioned_idents
)
end_time = time.time()
self.map_processing_time = end_time - start_time
# Store the result in the cache
self.map_cache[cache_key] = result