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

Refactor of contract profiler #884

Merged
merged 12 commits into from
Sep 28, 2022

Conversation

MaksymilianDemitraszek
Copy link
Contributor

Transaction profiler will be refactored in a separeate PR.

This PR adds:

  • some docstring
  • some structure simplifications
  • improves typing
  • adds some test for functions which are unit-testable

I will add general integration tests after I integrate profiler in the final way (we discussed this integration with @kasperski95), right now those are a litlle too difficult to setup.

#828

@MaksymilianDemitraszek MaksymilianDemitraszek changed the base branch from master to profiling September 23, 2022 16:35
@MaksymilianDemitraszek MaksymilianDemitraszek marked this pull request as ready for review September 23, 2022 16:38
@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Base: 83.68% // Head: 84.03% // Increases project coverage by +0.35% 🎉

Coverage data is based on head (ddeb27f) compared to base (fc8df49).
Patch coverage: 61.69% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##           profiling     #884      +/-   ##
=============================================
+ Coverage      83.68%   84.03%   +0.35%     
=============================================
  Files            258      257       -1     
  Lines           8759     8732      -27     
=============================================
+ Hits            7330     7338       +8     
+ Misses          1429     1394      -35     
Impacted Files Coverage Δ
protostar/profiler/pprof.py 11.76% <0.00%> (-0.49%) ⬇️
protostar/profiler/contract_profiler.py 55.41% <55.41%> (ø)
protostar/profiler/contract_profiler_test.py 97.14% <97.14%> (ø)
protostar/profiler/profile.py 21.73% <100.00%> (-8.09%) ⬇️
...rotostar/starknet/cheatable_execute_entry_point.py 69.29% <100.00%> (+0.24%) ⬆️
...rotostar/starknet/cheatable_starknet_exceptions.py 83.33% <0.00%> (-3.04%) ⬇️
protostar/testing/fuzzing/strategies/felts.py 90.47% <0.00%> (-1.20%) ⬇️
protostar/cli/network_command_util.py 89.74% <0.00%> (ø)
protostar/commands/migrate/migrate_command_test.py 100.00% <0.00%> (ø)
protostar/configuration_file/configuration_file.py 81.81% <0.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MaksymilianDemitraszek MaksymilianDemitraszek merged commit 885ef7c into profiling Sep 28, 2022
@MaksymilianDemitraszek MaksymilianDemitraszek deleted the refactor/refactor-contract-profiler branch September 28, 2022 12:07
Arcticae pushed a commit that referenced this pull request Mar 13, 2023
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from
3.2.0 to 3.2.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst">pytest-xdist's
changelog</a>.</em></p>
<blockquote>
<h1>pytest-xdist 3.2.1 (2023-03-12)</h1>
<h2>Bug Fixes</h2>
<ul>
<li><code>[#884](pytest-dev/pytest-xdist#884)
&lt;https://github.com/pytest-dev/pytest-xdist/issues/884&gt;</code>_:
Fixed hang in <code>worksteal</code> scheduler.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/b591be4868e5d85de5a98e72d6aa64f7dedbcb28"><code>b591be4</code></a>
Release 3.2.1</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/b6c195a56c3617e7d36fb95bc064e65716b1196f"><code>b6c195a</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/885">#885</a>
from amezin/steal-hang-fix</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/6abcdfc22ed64c699ac0fae8dc75d67b33dbffbe"><code>6abcdfc</code></a>
Fix hang caused by <code>steal</code> command with empty test queue</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/58fd7ccc052d8eabdc77d52ecf29bb67e2627969"><code>58fd7cc</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/881">#881</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/ba526fad5ac3132a1782971ee9617bf04d78fd54"><code>ba526fa</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/879">#879</a>
from pytest-dev/pre-commit-ci-update-config</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/efe674b2659fccbd31db39cac64d9681e1a0ce3c"><code>efe674b</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/5d692a7d6318054ba4a75dae4c49ffba32200dff"><code>5d692a7</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/878">#878</a>
from akx/patch-1</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/5e795d88e7b390a36c33282d1415be5c66dcb92d"><code>5e795d8</code></a>
docs: Remove unused statement in one-log-per-worker example</li>
<li><a
href="https://github.com/pytest-dev/pytest-xdist/commit/2329d3454f7dc30e7b343b9a35d49fc0e9519c1a"><code>2329d34</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-xdist/issues/875">#875</a>
from pytest-dev/release-3.2.0</li>
<li>See full diff in <a
href="https://github.com/pytest-dev/pytest-xdist/compare/v3.2.0...v3.2.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest-xdist&package-manager=pip&previous-version=3.2.0&new-version=3.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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