GithubHelp home page GithubHelp logo

ellecox / json-schema-benchmark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ebdrup/json-schema-benchmark

0.0 2.0 0.0 328 KB

Benchmarks for Node.js JSON-schema validators

License: MIT License

JavaScript 100.00%

json-schema-benchmark's Introduction

json-schema-benchmark

Performance benchmark for Node.js JSON-schema validators.

Also tests against official JSON-schema test suite and checks for validators that cause side-effects on schema or data.

Contribute to these benchmarks

Performance

performance

Validator Relative speed Number of test runs per second
djv 100% 19948 (± 2.5%)
ajv 87.2% 17385 (± 3.41%)
is-my-json-valid 61.6% 12291 (± 2.25%)
jsen 57.9% 11557 (± 3.39%)
schemasaurus 23.4% 4675 (± 3.81%)
themis 17.1% 3406 (± 4.78%)
jsck 7.3% 1453 (± 2.56%)
z-schema 6.6% 1311 (± 2.34%)
skeemas 0.9% 182 (± 2.16%)
jsonschema 0.8% 168 (± 2.59%)
tv4 0.4% 78 (± 2.44%)
jayschema 0.2% 30 (± 3.99%)

235 tests are run in each test run.

Validators tested: is-my-json-valid (2.15.0), jsen (0.6.4), ajv (4.10.4), themis (1.1.6), z-schema (3.18.2), jjv (1.0.2), djv (1.0.0-beta), skeemas (1.2.2), jayschema (0.3.1), schemasaurus (0.7.8), jsck (0.3.0), jassi (0.1.2), JSV (4.0.2), request-validator (0.3.3), json-gate (0.8.23), json-model (0.2.24), tv4, jsonschema (1.1.1), revalidator (0.3.1),

(validators not in the results above where excluded because of failing tests - see below for details)

djv is currently the fastest JSON-schema validator out there.

The fastest validator has 100%, the rest a lower score relative to the fastest. If a validator has a score of 5% that means that it's speed is 5% of the fastest, meaning that it's 20 times slower than the fastest.

Test failure summary

This test suite uses the official JSON-schema test suite.

If a validator does not pass a test in the official test suite, it will show up in these results.

failing tests

Validator Number of failing tests (click for details)
ajv 1
djv 1
jsen 1
skeemas 2
z-schema 3
jsonschema 4
jjv 7
is-my-json-valid 8
jayschema 10
themis 14
schemasaurus 16
jsck 18
tv4 24
request-validator 29
jassi 31
json-model 40
JSV 57
json-gate 71
revalidator 138

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)
tv4 2
revalidator 267
json-model 288

Validators not in the list have no side-effects on data or schemas.

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.

Benchmarks owned by themis

Benchmarks owned by z-schema

Benchmarks owned by jsck

There is also a benchmark suite by cosmicrealms.

License

MIT

json-schema-benchmark's People

Contributors

ebdrup avatar bugventure avatar epoberezkin avatar alexeygrishin avatar

Watchers

James Cloos avatar ElleC avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.