Skip to content

Feat/litestar #9905

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

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

pythonhubdev
Copy link
Contributor

@pythonhubdev pythonhubdev commented May 19, 2025

feat: Add Litestar Framework Implementation

This PR introduces comprehensive benchmarks for the Litestar framework across multiple configurations and server implementations.

Key Changes

  • 🚀 Added Litestar benchmark implementations for:
    • ASGI Servers: Uvicorn, Granian, Socketify
    • Protocols: HTTP/1.1, WebSockets
    • Templating: Jinja2 integration
    • ORJSON optimizations for JSON serialization

Removed:

  • Removed ujson5 and made orjson as default since it's mentioned in ujson docs itself to migrate.
  • Removed separate configurations for orjson
  • Removed support for hypercorn since it's been unmaintained

New Server

  • Added support for Granian server

@gi0baro
Copy link
Contributor

gi0baro commented May 21, 2025

Given using uvicorn workers with gunicorn is deprecated, might be a good idea not to implement such variants for new implementations..

@pythonhubdev
Copy link
Contributor Author

Sure will keep do this during the implementation

@pythonhubdev pythonhubdev marked this pull request as ready for review May 22, 2025 08:04
@pythonhubdev
Copy link
Contributor Author

@joanhey @gi0baro need some help here actions are failing fixed the parts can you help me where exactly should I fix and how can I run the test in my local?

@gi0baro
Copy link
Contributor

gi0baro commented May 22, 2025

@joanhey @gi0baro need some help here actions are failing fixed the parts can you help me where exactly should I fix and how can I run the test in my local?

For the Granian part, it looks like you're copying the wrong requirements file in the docker image:

litestar-granian: Exception: COPY failed: file not found in build context or excluded by .dockerignore: stat requirements-hypercorn.txt: file does not exist

https://github.com/TechEmpower/FrameworkBenchmarks/pull/9905/files#diff-7c69ad07ef0ff402b043234c1bf57f528611dd38a5c99c5778255b355ee6736bR10

Also, I'm pretty sure you can't use HTTP/2 only.

@pythonhubdev
Copy link
Contributor Author

@gi0baro all the other issues are fixed now the major issue is socketify web not able to figure out what the issue is.

@gi0baro
Copy link
Contributor

gi0baro commented May 22, 2025

@gi0baro all the other issues are fixed now the major issue is socketify web not able to figure out what the issue is.

You might want to ping @cirospaciari on that.

@pythonhubdev
Copy link
Contributor Author

Sure @cirospaciari can you please help me out here?

@cirospaciari
Copy link
Contributor

Sure @cirospaciari can you please help me out here?

Sure whats the problem you are encountering? wanna DM me in discord?

@pythonhubdev
Copy link
Contributor Author

Sure will text you on discord and also socketify discord link is not working as well

@cirospaciari
Copy link
Contributor

Sure will text you on discord and also socketify discord link is not working as well

https://discord.gg/uVckUZCx
Will update the oficial link thanks

@pythonhubdev
Copy link
Contributor Author

Thanks have texted you on Discord.

@joanhey
Copy link
Contributor

joanhey commented May 31, 2025

Hi @pythonhubdev

To test in local:

./tfb --mode verify --test litestart
./tfb --mode verify --test litestart-granian

./tfb --mode verify --test litestart litestar-granian litestar-gunicorn 

# for help
./tfb -h

@pythonhubdev
Copy link
Contributor Author

Will try this out. @cirospaciari any update on the socketifyweb part?

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.

4 participants