iliana / rust-crowbar

Wrapper to simplify writing AWS Lambda functions in Rust (using the Python execution environment)
https://docs.rs/crowbar
Apache License 2.0
197 stars 16 forks source link

Suggestions on measuring python <=> rust overhead if any #40

Open softprops opened 6 years ago

softprops commented 6 years ago

Hi. I've been working on some extensions of crowbar that put a focus on apigateway and recently started putting together some notes to advertise performance expectations. My tests are somewhat limited to what happens after crowbar translates python objects to serde Json values.

Do you have any suggests on how I could measure the cost more completely or if you've already down this your self the approach you took? I'm thinking I could take my .so file and create my own python handler that dynamically loads it in it's event handler and just delegate the handling while timing what happens in between. Thoughts?

iliana commented 5 years ago

Would it make sense for the python <=> rust overhead to be benchmarked in cpython-json, since that seems to be where all the magic is happening?

That crate doesn't have any benchmarks I believe and could probably use some.