Skip to content

Conversation

@enzomarx
Copy link

This pull request implements the functionality to save speed test results to a persistent CSV file (speedtest_history.csv).

(Why is this change necessary?)
Currently, the script is ephemeral. The results are displayed in the console, but are lost as soon as the execution ends.

This feature transforms the tool from a "one-time test" to a "monitoring tool," allowing users to do something they couldn't before: build a history of their internet performance, analyze connection patterns, and keep a record of the tests.

Changes Made->
New imports: Addition of the native csv and os and datetime libraries for file manipulation and timestamps. New Function: Creation of save_results_csv(data_row), which manages the logic for writing to the file. It checks if the speedtest_history.csv file already exists. If it doesn't exist, it creates the file and writes the headers. If it already exists, it simply appends the new results row. Modification to main(): At the end of the execution, the test data (Download, Upload, Ping, ISP, etc.) are collected in a dictionary and passed to the save_results_csv() function.

This is a "non-destructive" addition (non-breaking change) and does not alter any of the original functionalities, it only adds the saving step at the end.

LELIONTRIBAL0 and others added 2 commits November 12, 2025 12:56
Added functionality to save speed test results to a CSV file, including timestamp and relevant metrics. Implemented error handling for file operations.
@LELIONTRIBAL0 LELIONTRIBAL0 force-pushed the main branch 28 times, most recently from 2dbc2b1 to d133190 Compare November 18, 2025 14:57
@LELIONTRIBAL0 LELIONTRIBAL0 force-pushed the main branch 30 times, most recently from 88aaf38 to 8842a11 Compare November 27, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants