ml-energy / zeus

Deep Learning Energy Measurement and Optimization
https://ml.energy/zeus
Apache License 2.0
179 stars 24 forks source link

replace `time.time()` calls by `time.perf_counter()` #80

Closed ImahnShekhzadeh closed 1 month ago

ImahnShekhzadeh commented 1 month ago

Minor improvement suggestion: Since time.time() calls are only used to measure time differences (and the absolute time is not required), it is recommended to use time.perf_counter(), which offers the highest available resolution for measuring time differences.

ImahnShekhzadeh commented 1 month ago

Hi @jaywonchung,

I definitely agree that time.time() is more interpretable. Personally, I use Python's logging module, which conveniently offers the feature that everything that is logged has a timestamp, but I see that other people might choose to log to CSV files instead where this information might be missing if the file is chosen to log several runs.

Hence, closing this PR is fine by me.