Skip to content

Commit

Permalink
Fix grape server
Browse files Browse the repository at this point in the history
  • Loading branch information
davydovanton committed Apr 17, 2016
1 parent ad69ac0 commit e71c4b3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
20 changes: 8 additions & 12 deletions benchmarks/servers/grape_json.ru
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,20 @@ module App
class Test < Grape::API
version 'v1', using: :header, vendor: 'twitter'
format :json
prefix :api

resource :statuses do
desc ''
get :public_timeline do
{ hello: 'world' }
end
get '/' do
{ hello: 'world' }
end
end
end

run App::Test

# Running 30s test @ http://localhost:9292/api/statuses/public_timeline.json
# Running 30s test @ http://localhost:9292
# 4 threads and 4 connections
# Thread Stats Avg Stdev Max +/- Stdev
# Latency 2.87ms 3.73ms 88.15ms 96.20%
# Req/Sec 406.49 72.55 626.00 81.17%
# 48651 requests in 30.06s, 4.08MB read
# Requests/sec: 1618.24
# Transfer/sec: 139.07KB
# Latency 3.05ms 6.59ms 147.21ms 98.12%
# Req/Sec 428.71 80.90 720.00 81.32%
# 51248 requests in 30.08s, 4.30MB read
# Requests/sec: 1703.87
# Transfer/sec: 146.43KB
12 changes: 6 additions & 6 deletions benchmarks/servers/results.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ Transfer/sec: 386.94KB
[Link](https://github.com/davydovanton/hanami-bench/blob/master/benchmarks/servers/grape_json.ru)

```
Running 30s test @ http://localhost:9292/api/statuses/public_timeline.json
Running 30s test @ http://localhost:9292
4 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 2.87ms 3.73ms 88.15ms 96.20%
Req/Sec 406.49 72.55 626.00 81.17%
48651 requests in 30.06s, 4.08MB read
Requests/sec: 1618.24
Transfer/sec: 139.07KB
Latency 3.05ms 6.59ms 147.21ms 98.12%
Req/Sec 428.71 80.90 720.00 81.32%
51248 requests in 30.08s, 4.30MB read
Requests/sec: 1703.87
Transfer/sec: 146.43KB
```

### Rails JSON
Expand Down

0 comments on commit e71c4b3

Please sign in to comment.