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

Run a benchmark #130

Open
motss opened this issue Feb 28, 2020 · 4 comments
Open

Run a benchmark #130

motss opened this issue Feb 28, 2020 · 4 comments

Comments

@motss
Copy link

motss commented Feb 28, 2020

No description provided.

@evert evert changed the title Benchmark please Run a benchmark Feb 28, 2020
@muturgan
Copy link

just an exellent description...

but if it is interesting for somebody, there are my results of fastify/benchmarks:
express

{
  "requests": {
    "sent": 1089238
  },
  "latency": {
    "average": 3.58
  },
  "throughput": {
    "average": 4597990.41
  },
  "errors": 0,
  "timeouts": 0,
  "duration": 40.04,
  "connections": 100,
  "pipelining": 10
}

fastify

{
  "requests": {
    "sent": 2246483
  },
  "latency": {
    "average": 1.7
  },
  "throughput": {
    "average": 9486950.4
  },
  "errors": 0,
  "timeouts": 0,
  "duration": 40.04,
  "connections": 100,
  "pipelining": 10
}

nest-fastify

{
  "requests": {
    "sent": 1861624
  },
  "latency": {
    "average": 2.07
  },
  "throughput": {
    "average": 7861324.8
  },
  "errors": 0,
  "timeouts": 0,
  "duration": 40.04,
  "connections": 100,
  "pipelining": 10
}

curveball

{
  "requests": {
    "sent": 1889003
  },
  "latency": {
    "average": 2.04
  },
  "throughput": {
    "average": 8684492.81
  },
  "errors": 0,
  "timeouts": 0,
  "duration": 40.04,
  "connections": 100,
  "pipelining": 10
}

So, curveball works as fast as nest-with-fastify. And that is really great result for me.
At the same time a curveball based project will have much simpler file structure then a nest-based (that is pretty good for me).
Moreover it allows you to use decorators at your controllers that like so many people (not me but really many).

Great job guys!

@evert
Copy link
Member

evert commented Feb 29, 2020

Hi @muturgan ,

that's a fantastic result. Can you share something about the methodology? Perhaps you still have some of the code that you used to do the benchmark? It would be nice to publish this, but reproducibility seems important.

Thank you for doing this!

@muturgan
Copy link

muturgan commented Mar 1, 2020

sure

you can clone my fork of fastify/benchmarks:
https://github.com/muturgan/benchmarks
then checkout to the branch "my"
install packages
exec the "start" script

then you should looking to the "results" folder

i think it is a right way to make pull request into the fastify/benchmarks repo with a new curveball benchmark.
but when i made it with other frameworks some time ago it was ignored.
so i did not make it again with curveball.

the fastify/benchmarks have a MIT License so you can modify it as you want to benchmarking your project in different cases.

what about the methodology, it just checks the http implementation - tested frameworks instances just answer "hello world" to all get requests of specified endpoint without any logic.

@evert
Copy link
Member

evert commented Mar 1, 2020

That's cool =) Given that the express benchmark doesn't have a controller, and is just a single function we might get some more speed by removing the controller. Regardless, this is cool. Thank you!

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

No branches or pull requests

3 participants