Coder Social home page Coder Social logo

react-bench's Introduction

Server-side Rendering

Some naive benchmarks.

Baseline (404 handler)

Serving a simple string (html).

$ wrk -c 20 -r 50000 -t 4 http://localhost:3000
Making 50000 requests to http://localhost:3000
  4 threads and 20 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     0.98ms   59.07us   1.42ms   92.54%
    Req/Sec     4.85k   359.03     5.00k    85.07%
  50000 requests in 2.46s, 14.21MB read
  Non-2xx or 3xx responses: 50000
Requests/sec:  20349.61
Transfer/sec:      5.78MB

Handlebars

Serving a precompiled handlebars-template.

$ wrk -c 20 -r 50000 -t 4 http://localhost:3000/handlebars
Making 50000 requests to http://localhost:3000/handlebars
  4 threads and 20 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.02ms   81.48us   1.55ms   95.59%
    Req/Sec     4.00k     0.00     4.00k   100.00%
  50000 requests in 2.58s, 14.88MB read
Requests/sec:  19414.63
Transfer/sec:      5.78MB

Compiling for every request (not sure why you would ever do this).

$ wrk -c 20 -r 50000 -t 4 http://localhost:3000/handlebars
Making 50000 requests to http://localhost:3000/handlebars
  4 threads and 20 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     4.83ms  706.78us   8.98ms   90.45%
    Req/Sec   783.44    412.56     1.00k    78.34%
  50000 requests in 11.98s, 14.88MB read
Requests/sec:   4173.81
Transfer/sec:      1.24MB

React

First stab at server-side React rendering.

$ wrk -c 20 -r 50000 -t 4 http://localhost:3000/react
Making 50000 requests to http://localhost:3000/react
  4 threads and 20 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    11.09ms    3.27ms  33.62ms   88.34%
    Req/Sec     0.00      0.00     0.00    100.00%
  50000 requests in 26.97s, 23.06MB read
Requests/sec:   1853.80
Transfer/sec:      0.85MB

Setting NODE_EVN=production with react.

$ wrk -c 20 -r 50000 -t 4 http://localhost:3000/react
Making 50000 requests to http://localhost:3000/react
  4 threads and 20 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     4.33ms  626.65us   9.18ms   94.35%
    Req/Sec     1.00k     0.00     1.00k   100.00%
  50000 requests in 10.79s, 23.06MB read
Requests/sec:   4635.51
Transfer/sec:      2.14MB

react-bench's People

Contributors

cpsubrian avatar

Stargazers

Dendi Suhubdy avatar Ali Torki avatar Free Wortley avatar

Watchers

 avatar

Forkers

strml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.