fix: Correct sampling logic by changing <= to < in UUID comparison

This commit is contained in:
Paul Gauthier 2024-11-20 17:58:16 -08:00 committed by Paul Gauthier (aider)
parent 6b703244ec
commit fa85bdceed

View file

@ -100,7 +100,7 @@ class Analytics:
# Convert percentage to hex threshold (1% = "04", 10% = "1a", etc) # Convert percentage to hex threshold (1% = "04", 10% = "1a", etc)
# Using first 2 hex digits (0-ff) means each digit is 1/256 of the space # Using first 2 hex digits (0-ff) means each digit is 1/256 of the space
threshold = format(int(255 * percent / 100), "02x") threshold = format(int(255 * percent / 100), "02x")
return uuid_str <= threshold return uuid_str < threshold
def get_data_file_path(self): def get_data_file_path(self):
data_file = Path.home() / ".aider" / "analytics.json" data_file = Path.home() / ".aider" / "analytics.json"