mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
aider: Updated summarize_results function to display remaining time in MM:SS format.
# Context: USER: show MM:SS remaining ASSISTANT: To show the remaining time in MM:SS format, you need to modify the `summarize_results` function in the `scripts/benchmark.py` file. Update the `remaining` variable calculation and its print statement. ```python scripts/benchmark.py <<<<<<< ORIGINAL avg_duration = duration / completed_tests remaining = (total_tests - completed_tests) * avg_duration console.print(f"duration: {avg_duration:.1f} sec/test-case, {remaining:.0f} sec remaining") ======= avg_duration = duration / completed_tests remaining_seconds = (total_tests - completed_tests) * avg_duration remaining_minutes, remaining_seconds = divmod(remaining_seconds, 60) console.print(f"duration: {avg_duration:.1f} sec/test-case, {remaining_minutes:.0f}:{remaining_seconds:02.0f} remaining") >>>>>>> UPDATED ``` This change will display the remaining time in MM:SS format.
This commit is contained in:
parent
f836a4b760
commit
dc535a2aa0
1 changed files with 3 additions and 2 deletions
|
@ -206,9 +206,10 @@ def summarize_results(dirname, all_results, total_tests=None):
|
||||||
|
|
||||||
console.print()
|
console.print()
|
||||||
avg_duration = duration / completed_tests
|
avg_duration = duration / completed_tests
|
||||||
remaining = (total_tests - completed_tests) * avg_duration
|
remaining_seconds = (total_tests - completed_tests) * avg_duration
|
||||||
|
remaining_minutes, remaining_seconds = divmod(remaining_seconds, 60)
|
||||||
|
|
||||||
console.print(f"duration: {avg_duration:.1f} sec/test-case, {remaining:.0f} sec remaining")
|
console.print(f"duration: {avg_duration:.1f} sec/test-case, {remaining_minutes:.0f}:{remaining_seconds:02.0f} remaining")
|
||||||
|
|
||||||
avg_cost = total_cost / completed_tests
|
avg_cost = total_cost / completed_tests
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue