mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
fix: init map_processing_time
to 0 in __init__; move time import to top of file
This commit is contained in:
parent
6ca1a2eb57
commit
88dc1c63fd
1 changed files with 2 additions and 2 deletions
|
@ -3,6 +3,7 @@ import math
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
import warnings
|
import warnings
|
||||||
from collections import Counter, defaultdict, namedtuple
|
from collections import Counter, defaultdict, namedtuple
|
||||||
from importlib import resources
|
from importlib import resources
|
||||||
|
@ -65,6 +66,7 @@ class RepoMap:
|
||||||
self.tree_cache = {}
|
self.tree_cache = {}
|
||||||
self.tree_context_cache = {}
|
self.tree_context_cache = {}
|
||||||
self.map_cache = {}
|
self.map_cache = {}
|
||||||
|
self.map_processing_time = 0
|
||||||
|
|
||||||
def token_count(self, text):
|
def token_count(self, text):
|
||||||
len_text = len(text)
|
len_text = len(text)
|
||||||
|
@ -422,8 +424,6 @@ class RepoMap:
|
||||||
return self.map_cache[cache_key]
|
return self.map_cache[cache_key]
|
||||||
|
|
||||||
# If not in cache, generate the map
|
# If not in cache, generate the map
|
||||||
import time
|
|
||||||
|
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
result = self.get_ranked_tags_map_uncached(
|
result = self.get_ranked_tags_map_uncached(
|
||||||
chat_fnames, other_fnames, max_map_tokens, mentioned_fnames, mentioned_idents
|
chat_fnames, other_fnames, max_map_tokens, mentioned_fnames, mentioned_idents
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue