mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
fix: Correct percentage calculation in UUID sampling method
This commit is contained in:
parent
95c9863d0a
commit
1a1cb0d3f1
1 changed files with 3 additions and 2 deletions
|
@ -97,8 +97,9 @@ class Analytics:
|
|||
if not uuid_str:
|
||||
return False
|
||||
|
||||
# Convert percentage to hex threshold (1% = "03", 10% = "1a", etc)
|
||||
threshold = format(int(256 * percent / 100), "02x")
|
||||
# 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
|
||||
threshold = format(int(255 * percent / 100), "02x")
|
||||
return uuid_str < threshold
|
||||
|
||||
def get_data_file_path(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue