Skip to content

Commit 261e1cf

Browse files
author
Nabeel Bukhari
committed
Merge branch 'master' of https://github.com/mplibunao/node-graphql-benchmarks into mplibunao-master
2 parents 822b4a3 + 0a77eb9 commit 261e1cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4246
-225
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,7 @@ results
6060

6161
dist
6262
results100
63-
results5
63+
results5
64+
65+
# Rust
66+
other-benchmarks/rust-gql/target

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
package-lock=false
22
save-exact=false
3+
strict-peer-dependencies=false

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"bracketSpacing": true,
66
"semi": true,
77
"useTabs": false,
8-
"jsxBracketSameLine": true,
8+
"bracketSameLine": true,
99
"endOfLine": "auto"
1010
}

METRICS.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
# Metrics
3+
* __Machine:__ darwin x64 | 16 vCPUs | 16.0GB Mem
4+
* __Node:__ `v18.7.0`
5+
* __Run:__ Sat Aug 06 2022 20:40:42 GMT+0800 (Philippine Standard Time)
6+
* __Method:__ `npm run metrics` (samples: 5)
7+
* __startup:__ time elapsed to setup the application
8+
* __listen:__ time elapsed until the http server is ready to accept requests (cold start)
9+
10+
| | startup(ms) | listen(ms) |
11+
| - | - | - |
12+
| fastify-REST.js | 177.98 | 190.56 |
13+
| graphql-compose+async.js | 277.69 | 281.22 |
14+
| express-graphql+graphql-compose.js | 278.04 | 281.54 |
15+
| express-graphql+graphql-jit+graphql-compose.js | 326.61 | 330.82 |
16+
| type-graphql+async.js | 343.35 | 347.15 |
17+
| type-graphql+middleware.js | 345.45 | 349.01 |
18+
| type-graphql+async-middleware.js | 346.59 | 350.13 |
19+
| express-graphql+type-graphql.js | 352.75 | 356.24 |
20+
| express-graphql.js | 387.67 | 391.12 |
21+
| fastify-express-grapql-typed.js | 377.15 | 391.17 |
22+
| benzene-http.js | 391.38 | 394.66 |
23+
| apollo-schema+async.js | 392.47 | 395.98 |
24+
| express-graphql+graphql-jit+type-graphql.js | 397.39 | 400.84 |
25+
| fastify-express-graphql-typed-jit.js | 398.94 | 411.06 |
26+
| graphql-api-koa.js | 410.65 | 414.32 |
27+
| apollo-server-express-tracing.js | 412.23 | 415.73 |
28+
| apollo-server-express.js | 413.64 | 417.04 |
29+
| core-graphql-jit-str.js | 419.10 | 422.30 |
30+
| core-graphql-jit-buf.js | 419.95 | 423.16 |
31+
| apollo-opentracing.js | 420.35 | 423.78 |
32+
| express-gql.js | 428.06 | 431.72 |
33+
| express-graphql+graphql-jit.js | 440.57 | 444.12 |
34+
| graphql-api-koa+graphql-jit.js | 458.00 | 461.67 |
35+
| core-graphql-jit-buf-fjs.js | 464.44 | 468.12 |
36+
| mercurius+graphql-compose.js | 457.14 | 502.77 |
37+
| apollo-server-koa+graphql-jit+type-graphql.js | 502.76 | 506.43 |
38+
| mercurius+graphql-jit+type-graphql.js | 487.01 | 532.63 |
39+
| yoga-graphql.js | 550.11 | 556.97 |
40+
| yoga-graphql-trace.js | 550.72 | 557.56 |
41+
| fastify-express-graphql-jit.js | 547.10 | 559.70 |
42+
| express-graphql-dd-trace-no-plugin.js | 649.30 | 651.26 |
43+
| mercurius.js | 647.97 | 695.01 |
44+
| mercurius+graphql-jit.js | 656.22 | 704.80 |
45+
| express-graphql-dd-trace.js | 801.28 | 803.21 |
46+
| express-graphql-dd-trace-less.js | 819.56 | 821.55 |

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This is a fork of [node-graphql-benchmark](https://github.com/benawad/node-graph
1313
- All benchmarks that perform slower than http server are moved to others folder subfolder of benchmark folder.
1414
- Fixed [bug](https://github.com/nabeelbukhari/node-graphql-benchmarks/blob/127b19c31d8eeba25a66889f58d3518bf082b556/other-benchmarks/go-gql/server.go#L25) in go-graphql benchmark and it turns out to be very slow.
1515
- Dependencies updates
16+
- For metrics (cold-start) see [metrics.md](METRICS.md)
1617

1718
# Explanation
1819

benchmark-compare.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@ if (!choices.length) {
2727
} else if (options.table && !options.percentage) {
2828
const tableSeparatorChars = options.commandlineMdTable
2929
? {
30-
top: "",
31-
"top-left": "",
32-
"top-mid": "",
33-
"top-right": "",
34-
bottom: "",
35-
"bottom-left": "",
36-
"bottom-mid": "",
37-
"bottom-right": "",
38-
mid: "",
39-
"left-mid": "",
40-
"mid-mid": "",
41-
"right-mid": "",
42-
left: "|",
43-
right: "|",
44-
middle: "|",
45-
}
30+
top: "",
31+
"top-left": "",
32+
"top-mid": "",
33+
"top-right": "",
34+
bottom: "",
35+
"bottom-left": "",
36+
"bottom-mid": "",
37+
"bottom-right": "",
38+
mid: "",
39+
"left-mid": "",
40+
"mid-mid": "",
41+
"right-mid": "",
42+
left: "|",
43+
right: "|",
44+
middle: "|",
45+
}
4646
: {};
4747
const table = new Table({
4848
chars: tableSeparatorChars,

benchmarks/rust-graphql.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"use strict";
2+
const { exec } = require("child_process");
3+
const path = require("path");
4+
5+
const forked = exec(
6+
"./target/release/rust-gql",
7+
{ cwd: path.join(__dirname, "..", "other-benchmarks/rust-gql/") },
8+
(error, stdout, stderr) => {
9+
if (error) {
10+
console.log(`error: ${error.message}`);
11+
return;
12+
}
13+
if (stderr) {
14+
console.log(`stderr: ${stderr}`);
15+
return;
16+
}
17+
console.log(`stdout: ${stdout}`);
18+
},
19+
);
20+
21+
forked.on("exit", () => console.log("exited"));

0 commit comments

Comments
 (0)