Skip to content

Commit 115e5fe

Browse files
Feature/Benchmarks and Parser Performance Optimization (morpheusgraphql#576)
1 parent 81b40b5 commit 115e5fe

File tree

46 files changed

+49231
-277
lines changed

Some content is hidden

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

46 files changed

+49231
-277
lines changed

.vscode/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"editor.formatOnSave": true,
33
"ghcSimple.feature.rangeType": false,
44
"cSpell.words": [
5+
"INLINEABLE",
56
"Nullary",
6-
"haxl"
7+
"haxl",
8+
"parens"
79
]
810
}

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ genDocs:
1111
cat README.md; \
1212
} > docs/index.md
1313

14+
clean:
15+
find . -name "*.cabal" -exec rm -rf {} \;
16+
17+
lint:
18+
curl -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s .

examples-subscription-extpubsub/examples-subscription-extpubsub.cabal

-65
This file was deleted.

morpheus-graphql-app/morpheus-graphql-app.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ cabal-version: 1.12
44
--
55
-- see: https://github.com/sol/hpack
66
--
7-
-- hash: 78e70a5663436c9fe3f864a6d3a10e1a07dd8bae9058f6693b803c2cf08de583
7+
-- hash: 91670160f0d99fc6eb2159c892e543b66cefe650b936676da1cb6c22da3d0bfe
88

99
name: morpheus-graphql-app
1010
version: 0.17.0
11-
synopsis: Morpheus GraphQL Core
11+
synopsis: Morpheus GraphQL App
1212
description: Build GraphQL APIs with your favourite functional language!
1313
category: web, graphql
1414
homepage: https://morpheusgraphql.com

morpheus-graphql-benchmarks/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Daviti Nalchevanidze
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

morpheus-graphql-benchmarks/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Morpheus GraphQL Benchmark
2+
3+
this Package Provides Benchmark for Morpheus GrapHQL
4+
5+
## Parsing Type System
6+
7+
| | GraphQL (mean) | GraphQL (std dev) | Morpheus (mean) | Morpheus (std dev) |
8+
| -------------------- | -------------- | ----------------- | --------------- | ------------------ |
9+
| Mythology Schema | 1.087 ms | 81.11 μs | 406.3 μs | 15.54 μs |
10+
| Long Descriptions | 10.59 ms | 200.1 μs | 489.1 μs | 15.40 μs |
11+
| Star Wars Schema | 85.95 ms | 2.369 ms | 42.65 ms | 1.425 ms |
12+
| Nested Wrapper Types | 1.487 s | 4.659 ms | 58.37 μs | 2.127 μs |
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
## 0.17.0 - 25.02.2021
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
cabal-version: 1.12
2+
3+
-- This file has been generated from package.yaml by hpack version 0.33.0.
4+
--
5+
-- see: https://github.com/sol/hpack
6+
--
7+
-- hash: 4ced1f1fee0a3be95fb08bef6db6eed45b5a18f574cc24626eb61798826b7f20
8+
9+
name: morpheus-graphql-benchmarks
10+
version: 0.17.0
11+
synopsis: Morpheus GraphQL Benchmarks
12+
description: Build GraphQL APIs with your favorite functional language!
13+
category: web, graphql
14+
homepage: https://morpheusgraphql.com
15+
bug-reports: https://github.com/nalchevanidze/morpheus-graphql/issues
16+
author: Daviti Nalchevanidze
17+
maintainer: [email protected]
18+
copyright: (c) 2019 Daviti Nalchevanidze
19+
license: MIT
20+
license-file: LICENSE
21+
build-type: Simple
22+
extra-source-files:
23+
changelog.md
24+
README.md
25+
data-files:
26+
samples/descriptions.gql
27+
samples/github.gql
28+
samples/mythology.gql
29+
samples/starwars.gql
30+
samples/wrappers.gql
31+
32+
source-repository head
33+
type: git
34+
location: https://github.com/nalchevanidze/morpheus-graphql
35+
36+
benchmark morpheus-bench
37+
type: exitcode-stdio-1.0
38+
main-is: Main.hs
39+
other-modules:
40+
Parser.GraphQL
41+
Parser.Morpheus
42+
Paths_morpheus_graphql_benchmarks
43+
hs-source-dirs:
44+
src
45+
ghc-options: -eventlog -threaded -rtsopts -with-rtsopts=-N6 -O2
46+
build-depends:
47+
base >=4.7 && <5
48+
, bytestring >=0.10.4 && <0.11
49+
, criterion
50+
, graphql >=0.11
51+
, megaparsec >=7.0.0 && <10.0.0
52+
, morpheus-graphql-core
53+
, relude >=0.3.0
54+
, text >=1.2.3.0 && <1.3
55+
, unordered-containers >=0.2.8.0 && <0.3
56+
default-language: Haskell2010
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: morpheus-graphql-benchmarks
2+
version: 0.17.0
3+
github: "nalchevanidze/morpheus-graphql"
4+
license: MIT
5+
author: "Daviti Nalchevanidze"
6+
category: web, graphql
7+
synopsis: Morpheus GraphQL Benchmarks
8+
maintainer: "[email protected]"
9+
homepage: https://morpheusgraphql.com
10+
copyright: "(c) 2019 Daviti Nalchevanidze"
11+
license-file: LICENSE
12+
description: Build GraphQL APIs with your favorite functional language!
13+
14+
extra-source-files:
15+
- changelog.md
16+
- README.md
17+
18+
data-files:
19+
- samples/**/*.gql
20+
21+
dependencies:
22+
- base >= 4.7 && < 5
23+
- relude >= 0.3.0
24+
- bytestring >= 0.10.4 && < 0.11
25+
- text >= 1.2.3.0 && < 1.3
26+
- unordered-containers >= 0.2.8.0 && < 0.3
27+
- megaparsec >= 7.0.0 && < 10.0.0
28+
- morpheus-graphql-core
29+
- criterion
30+
- graphql >= 0.11
31+
32+
benchmarks:
33+
morpheus-bench:
34+
main: Main.hs
35+
source-dirs: src
36+
ghc-options:
37+
- -eventlog
38+
- -threaded
39+
- -rtsopts
40+
- -with-rtsopts=-N6
41+
- -O2

morpheus-graphql-benchmarks/report.html

+1,159
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)