bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.17k stars 392 forks source link

Allow spinning a Memray environment up in codespaces #582

Closed godlygeek closed 4 months ago

godlygeek commented 5 months ago

Update our Dockerfile to the latest Debian stable, and add a devcontainer.json based on it, with our build and test dependencies installed.

codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.86%. Comparing base (41248ed) to head (b134158). Report is 42 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #582 +/- ## ========================================== + Coverage 92.55% 92.86% +0.30% ========================================== Files 91 92 +1 Lines 11304 11234 -70 Branches 1581 2055 +474 ========================================== - Hits 10462 10432 -30 + Misses 837 802 -35 + Partials 5 0 -5 ``` | [Flag](https://app.codecov.io/gh/bloomberg/memray/pull/582/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | Coverage Δ | | |---|---|---| | [cpp](https://app.codecov.io/gh/bloomberg/memray/pull/582/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | `92.86% <ø> (+6.92%)` | :arrow_up: | | [python_and_cython](https://app.codecov.io/gh/bloomberg/memray/pull/582/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | `92.86% <ø> (-2.86%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jcarnaxide commented 5 months ago

First comment I would like to add, spinning up the codespace took ~7 minutes. This is likely due to all the dependencies required for this currently considered codespace. This makes me wonder if a slimmed down version of this codespace might make sense for folks attempting to follow the tutorial (and not necessarily needing all of the dependencies)

I want to be clear, my suggestion is not to modify this codespace, it probably makes sense to leave this one as is, just some food for thought if we want to potentially shrink the time to create a codespace for folks. Then again, 7 minutes is not too long, so maybe optimization is overkill.

Just food for thought 😄

pablogsal commented 5 months ago

Do we know where these 7 minute are being spent? The dependencies are not that many so I am a bit surprised

godlygeek commented 5 months ago

I timed it at 5 minutes. https://gist.github.com/godlygeek/cc5bfd9e64da8b4c5f24178e735745cc shows the log. 3.5 minutes of that is installing the DPKG dependencies, most of which seemed to be spent installing nodejs and its deps, 0.5 minutes is setting up our virtualenv and installing our build and test deps, and 1 minute is building Memray from source, give or take a bit of rounding.

godlygeek commented 4 months ago

@gusmonod Give this PR an approval, if you wouldn't mind!