# campfire: Rails vs the emitted tree

_48 measurements across 16 cells_

## `/rooms/1`

| lane | req/sec | p50 (ms) | p99 (ms) | RSS (MB) | req/sec/GB |
|------|--------:|---------:|---------:|---------:|-----------:|
| rails | 345.3 | 40.30 | 152.34 | 3258 | 184 |
| rails-1p | 40.9 | 379.76 | 470.57 | 431 | 124 |
| rails-nocache | 26.9 | 604.72 | 930.70 | 3023 | 16 |
| rails-nocache-1p | 5.7 | 1280.00 | 1970.00 | 427 | 18 |
| ruby | 178.7 | 88.15 | 186.61 | 1144 | 228 |
| ruby-1p | 24.0 | 651.51 | 1130.00 | 169 | 170 |
| spinel | 56.4 | 227.88 | 527.88 | 179 | 350 |
| spinel-1p | 36.8 | 476.75 | 656.64 | 83 | 508 |

_rails / ruby = 1.93x_

_rails-nocache / ruby = 0.15x_

`rails` serves campfire's message fragments from Redis (`cached: true`); `rails-nocache` renders them. The emitted tree has no fragment cache, so `rails-nocache` is the lane that compares renderers and `rails` is the lane that says what a deployment costs.

## `/rooms/1/messages`

| lane | req/sec | p50 (ms) | p99 (ms) | RSS (MB) | req/sec/GB |
|------|--------:|---------:|---------:|---------:|-----------:|
| rails | 677.4 | 20.71 | 71.72 | 3228 | 360 |
| rails-1p | 84.2 | 190.90 | 208.05 | 420 | 262 |
| rails-nocache | 29.2 | 642.50 | 934.54 | 3062 | 17 |
| rails-nocache-1p | 6.0 | 1470.00 | 1880.00 | 417 | 19 |
| ruby | 180.3 | 86.73 | 197.18 | 1191 | 216 |
| ruby-1p | 23.3 | 676.35 | 1210.00 | 173 | 161 |
| spinel | 57.4 | 242.65 | 536.30 | 177 | 359 |
| spinel-1p | 28.5 | 644.49 | 836.15 | 89 | 362 |

_rails / ruby = 3.76x_

_rails-nocache / ruby = 0.16x_

`rails` serves campfire's message fragments from Redis (`cached: true`); `rails-nocache` renders them. The emitted tree has no fragment cache, so `rails-nocache` is the lane that compares renderers and `rails` is the lane that says what a deployment costs.

## What each lane rendered

A throughput number for a page that is not the same page is not
a comparison. One authenticated GET per lane per endpoint,
before any load:

| lane | endpoint | status | tags | bytes |
|---|---|--:|--:|--:|
| rails | `/rooms/1` | 200 | 3963 | 442544 |
| rails | `/rooms/1/messages` | 200 | 3698 | 409027 |
| rails-nocache | `/rooms/1` | 200 | 3963 | 442544 |
| rails-nocache | `/rooms/1/messages` | 200 | 3698 | 409027 |
| ruby | `/rooms/1` | 200 | 3963 | 423409 |
| ruby | `/rooms/1/messages` | 200 | 3698 | 392267 |
| spinel | `/rooms/1` | 200 | 3963 | 423409 |
| spinel | `/rooms/1/messages` | 200 | 3698 | 392267 |
| rails-1p | `/rooms/1` | 200 | 3963 | 442544 |
| rails-1p | `/rooms/1/messages` | 200 | 3698 | 409027 |
| rails-nocache-1p | `/rooms/1` | 200 | 3963 | 442544 |
| rails-nocache-1p | `/rooms/1/messages` | 200 | 3698 | 409027 |
| ruby-1p | `/rooms/1` | 200 | 3963 | 423409 |
| ruby-1p | `/rooms/1/messages` | 200 | 3698 | 392267 |
| spinel-1p | `/rooms/1` | 200 | 3963 | 423409 |
| spinel-1p | `/rooms/1/messages` | 200 | 3698 | 392267 |

