Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a Profiler that output a dictionary #358

Merged
merged 5 commits into from
Oct 24, 2024
Merged

feat: add a Profiler that output a dictionary #358

merged 5 commits into from
Oct 24, 2024

Conversation

12rambau
Copy link
Member

@12rambau 12rambau commented Oct 23, 2024

Fix #357

Represent the output of the profiler from Earth engine and parse it as a dictionary compatible with pandas.

with ee.Profiler() as p:
        ee.Number(3.14).add(0.00159).getInfo()
{'EECU·s': [0.001, None],
 'PeakMem': [4720, 3100],
 'Count': [3, 3],
 'Description': ['(plumbing)', 'Algorithm Number.add']}

It's documented in this pre-build: https://geetools--358.org.readthedocs.build/en/358/usage/profile.html#geetools-profiler

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.98%. Comparing base (4d96594) to head (e535f0c).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #358      +/-   ##
==========================================
+ Coverage   90.10%   90.98%   +0.88%     
==========================================
  Files          26       27       +1     
  Lines        1415     1620     +205     
  Branches       68       75       +7     
==========================================
+ Hits         1275     1474     +199     
- Misses        123      127       +4     
- Partials       17       19       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@fitoprincipe fitoprincipe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't used much the original profiler, but the few times I did I encounter a lot of failures and needed to run the code several times to make it work, has it happened the same to you? 'cos if the issue is still there, we could do something about it

geetools/ee_profiler.py Show resolved Hide resolved
geetools/ee_profiler.py Outdated Show resolved Hide resolved
geetools/ee_profiler.py Outdated Show resolved Hide resolved
geetools/ee_profiler.py Outdated Show resolved Hide resolved
Copy link
Member

@fitoprincipe fitoprincipe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good now 😃

@12rambau 12rambau merged commit 40836aa into main Oct 24, 2024
12 checks passed
@12rambau 12rambau deleted the profiler branch October 24, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants