Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Line profiler adds more time compared to time module #165

Open
ddoe777 opened this issue Sep 12, 2019 · 1 comment
Open

Line profiler adds more time compared to time module #165

ddoe777 opened this issue Sep 12, 2019 · 1 comment

Comments

@ddoe777
Copy link

ddoe777 commented Sep 12, 2019

Hi,

I am running a function which has a lot of for-loop iterations. The function can not unfortunately be shared since it contains Intellectual Properties. Let me know if any specific programming nature of the code information can help! However, during the testing, the time measured by line_profiler seems to be twice when measured by time.time(). Are there cases where line profiler is not a good fit for measurement?

Thanks.

@Nodd
Copy link
Contributor

Nodd commented Sep 26, 2019

Line profiler adds some overhead to be able to measure the time for each line. The relative time are still correct, but it's up to you to know what you want to measure.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants