-
Notifications
You must be signed in to change notification settings - Fork 0
Benchmark
Efra Espada edited this page Jun 16, 2018
·
4 revisions
Results of 3 common actions on Turbine and GraphQL with a JSON database.
get
actions look for an object on the given path.
/users/userA
set
actions updates an object on the given path passing another object.
/users/userA
{
name: "Mark",
age 30
}
query
actions looks for an object on the given path for the conditions passed:
/users/*
{
name: "Mark"
}
It will return all users named "Mark".
- GraphQL JSON database size ~ 6 MB on Disk:
- Turbine JSON database size ~ 15.1 MB on Disk:
Action | GraphQL | Turbine | Times |
---|---|---|---|
GET | 36.5 s. | 2 s. | x1000 |
POST | 2.6 s. | 11.9 s. | x1000 |
QUERY | 47.5 s. | 2.6 s. | x1000 |
Action | GraphQL | Turbine | Times |
---|---|---|---|
GET | 643.8 s. | 24.7 s. | x10000 |
POST | 58.7 s. | 123.9 s. | x10000 |
QUERY | 480.5 s. | 41.6 s. | x10000 |
Run this test on your PC by cloning this repo and running:
node launcher.js
/benchmark
node turbine_puncher.js
/benchmark
node graphql.js
node graphql_puncher.js
Copyright 2018 Efraín Espada
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.