-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
122 lines (86 loc) · 3.67 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Comparing performance of a simple model-load and show between yesod 0.7 and rails 2.3
Results
-------
Rails (in production mode, running with mongrel webserver, ruby 1.8.7) is six times slower than yesod (compiled in production mode).
Rails, development mode:
ransactions: 250 hits
Availability: 100.00 %
Elapsed time: 26.82 secs
Data transferred: 5.53 MB
Response time: 0.53 secs
Transaction rate: 9.32 trans/sec
Throughput: 0.21 MB/sec
Concurrency: 4.96
Successful transactions: 250
Failed transactions: 0
Longest transaction: 0.59
Shortest transaction: 0.17
Rails, production mode
ransactions: 250 hits
Availability: 100.00 %
Elapsed time: 22.37 secs
Data transferred: 5.53 MB
Response time: 0.44 secs
Transaction rate: 11.18 trans/sec
Throughput: 0.25 MB/sec
Concurrency: 4.97
Successful transactions: 250
Failed transactions: 0
Longest transaction: 0.52
Shortest transaction: 0.15
Yesod, old (hamlet <0.7.3, 14 times slower than rails):
ransactions: 250 hits
Availability: 100.00 %
Elapsed time: 377.51 secs
Data transferred: 0.79 MB
Response time: 7.55 secs
Transaction rate: 0.66 trans/sec
Throughput: 0.00 MB/sec
Concurrency: 5.00
Successful transactions: 250
Failed transactions: 0
Longest transaction: 8.35
Shortest transaction: 7.02
Yesod, updated Version (hamlet 0.7.3):
ransactions: 250 hits
Availability: 100.00 %
Elapsed time: 82.29 secs
Data transferred: 0.79 MB
Response time: 1.64 secs
Transaction rate: 3.04 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 4.99
Successful transactions: 250
Failed transactions: 0
Longest transaction: 1.74
Shortest transaction: 1.36
Yesod, updated again (persistent-postgresql 0.4.0.1)
ransactions: 250 hits
Availability: 100.00 %
Elapsed time: 3.70 secs
Data transferred: 0.37 MB
Response time: 0.07 secs
Transaction rate: 67.57 trans/sec
Throughput: 0.10 MB/sec
Concurrency: 4.78
Successful transactions: 250
Failed transactions: 0
Longest transaction: 0.14
Shortest transaction: 0.05
To reproduce results
--------------------
You will need a PostgreSQL Server, Rails and Yesod installed.
1. Create a Database called "haskell"
2. Import SQL dump
psql haskell < data.sql
3. Configure the database connection by editing rails-test/config/database.yml
4. In the rails-test directory start the server
./script/server
5. Access http://localhost:3000 and measure the time it takes to get 1000 quotes and display the values
6. Configure the database connection by editing yesod-test/Settings.hs (make sure to set the production settings)
7. In the yesod-test directory compile the app in production mode
cabal install -f "production"
8. Start the app ./dist/build/yesod-test-production/yesod-test-production
9. Access http://localhost:3000/quotes and measure the time it takes to get 1000 quotes and display the values
Testing with siege:
siege -b -c 5 -r 50 localhost:3000