-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathREADME.template
80 lines (52 loc) · 3.68 KB
/
README.template
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
# json-schema-benchmark ({{schemaVersion}})
Performance benchmark for Node.js JSON-schema validators.
Also tests against [official JSON-schema test suite](https://github.com/json-schema/JSON-Schema-Test-Suite), version {{schemaVersion}}. and checks
for validators that cause side-effects on schema or data. The top 6 validators that fail the least tests are included in the benchmark.
[Contribute to these benchmarks](https://github.com/ebdrup/json-schema-benchmark/blob/master/CONTRIBUTING.md)
# Performance

|Validator|Relative speed|Number of test runs per second|
|---------|:------------:|:----------------------------:|
{{#results}}
|{{&link}}|{{percentage}}%|{{hz}} (± {{plusMinusPercent}}%)|
{{/results}}
{{testCount}} tests are run in each test run.
Validators tested: {{#validators}}{{&versionLink}}, {{/validators}}
(validators not in the results above where excluded because of failing tests - see below for details)
{{&fastestValidator}} is currently the fastest JSON-schema validator out there.
# Test failure summary
This test suite uses the [official JSON-schema test suite](https://github.com/json-schema/JSON-Schema-Test-Suite), version {{schemaVersion}}.
If a validator does not pass a test in the official test suite, it will show up in these results.

|Validator|Number of failing tests (click for details)|
|---------|-----------------------|
{{#validatorsFailingTests}}
|{{&link}}|[{{count}}](https://github.com/ebdrup/json-schema-benchmark/blob/master/{{folder}}reports/{{name}}.md)|
{{/validatorsFailingTests}}
Some validators have deliberately chosen not to support parts of the spec. Go to the homepage of the validator to learn if
that is the case for these tests.
# Side-effects summary
Number of tests that caused side-effects. The schema or data was altered by the validator.
|Validator|Number of side-effects (BAD)|
|---------|----------------------------|
{{#validatorsSideEffects}}
|{{&link}}|[{{count}}](https://github.com/ebdrup/json-schema-benchmark/blob/master/{{folder}}reports/{{name}}-side-effects.md)|
{{/validatorsSideEffects}}
Validators not in the list have no side-effects on data or schemas.
# Tests for other JSON-schema versions
- [draft7](https://github.com/ebdrup/json-schema-benchmark/tree/master/draft7)
- [draft6](https://github.com/ebdrup/json-schema-benchmark/)
- [draft4](https://github.com/ebdrup/json-schema-benchmark/tree/master/draft4)
# Features of validators
Note that these benchmarks and tests do not take into account other more advanced features of the validators. I encourage
you to take a look at each validator if you are looking for special features.
# Benchmarks by validator authors and others
Several of the validators have build benchmarks themselves. They are
more detailed then the benchmarks provided above.
{{#validatorBenchmarks}}
{{&link}}
{{/validatorBenchmarks}}
There is also a [benchmark suite](https://github.com/Sembiance/cosmicrealms.com/tree/master/sandbox/benchmark-of-node-dot-js-json-validation-modules-part-3)
by cosmicrealms.
# License
MIT