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

PyInstrument Extension #2727

Merged
merged 19 commits into from
Apr 25, 2023

Conversation

Helithumper
Copy link
Contributor

Description

This adds a new extension for PyInstrument, an instrumentation framework with HTML reports.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@botberry
Copy link
Member

botberry commented Apr 24, 2023

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


This releases adds an extension for PyInstrument. It allows to instrument your server and find slow code paths.

You can use it like this:

import strawberry
from strawberry.extensions import pyinstrument

schema = strawberry.Schema(
    Query,
    extensions=[
        pyinstrument.PyInstrument(report_path="pyinstrument.html"),
    ],
)

Here's the preview release card for twitter:

Here's the tweet text:

🆕 Release (next) is out! Thanks to Peyton Duncan for the PR 👏

Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)

Copy link
Member

@patrick91 patrick91 left a comment

Choose a reason for hiding this comment

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

This looks great! I've added a few minor comments 😊

pyproject.toml Outdated Show resolved Hide resolved
strawberry/extensions/pyinstrument.py Outdated Show resolved Hide resolved
tests/extensions/test_pyinstrument.py Outdated Show resolved Hide resolved
RELEASE.md Outdated Show resolved Hide resolved
Helithumper and others added 2 commits April 24, 2023 15:57
Co-authored-by: Patrick Arminio <patrick.arminio@gmail.com>
@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Merging #2727 (d638118) into main (05d202c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2727      +/-   ##
==========================================
+ Coverage   96.49%   96.51%   +0.01%     
==========================================
  Files         195      196       +1     
  Lines        8015     8029      +14     
  Branches     1455     1455              
==========================================
+ Hits         7734     7749      +15     
+ Misses        181      179       -2     
- Partials      100      101       +1     

Copy link
Member

@patrick91 patrick91 left a comment

Choose a reason for hiding this comment

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

Thank you so much for doing this :D

I've made a couple of fixes, but nothing major 😊

@patrick91 patrick91 merged commit 4e875e8 into strawberry-graphql:main Apr 25, 2023
40 checks passed
@botberry
Copy link
Member

Thanks for contributing to Strawberry! 🎉 You've been invited to join
the Strawberry GraphQL organisation 😊

You can also request a free sticker by filling this form: https://forms.gle/dmnfQUPoY5gZbVT67

And don't forget to join our discord server: https://strawberry.rocks/discord 🔥

@Helithumper
Copy link
Contributor Author

Thanks for finishing this up :D

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.

None yet

3 participants