Giter VIP home page Giter VIP logo

json-schema-benchmark's Issues

request-validator usage is wrong

To have request-validator run the actual validation, you need to call validate(value) on the object returned after creating the validator with a particular schema.

Link to source

This line should really be instance.validate(json).

Opitonal JSON-schema tests should be criteria for inclusion of a validator into the performance tests

Your criteria for including a validator into the performance tests shouldn't really take optional tests into account. All the tested validators are run either on node or in the browser. The JavaScript runtimes there cannot handle JSON parsing in a way that is compatible with the bignum and zeroTerminatedFloats test cases. As for the format tests, the JSON-schema spec clearly states that conforming validators MAY choose to support the format keyword, but are not required to.

Library size as benchmark

Very informative benchmark, however it will be helpful if comparison of lib sizes are taken into account.

Clarify mechanism to update benchmark results

I just realized there were updates to the test suite and released v1.2.4 of skeemas which fixes about 11 of the test failures currently reported.

I'm happy to submit PRs to help update benchmark results but I understand the benchmark owners would prefer to run them independently. What is the correct mechanism for library owners to request an update of these results?

Misleading results for @exodus/schemasafe

Hi, thanks very much for putting this benchmark together.

I found this repo very helpful in evaluating which JSON schema validator to use in my latest project. However, I found the benchmarks for @exodus/schemasafe misleading.

schemasafe disables error reporting by default, which seems like significantly different (and unexpected) behavior compared to the other validators in this benchmark.

I did see this note in CONTRIBUTING.md:

Also, do not tweak any of the settings or options of a validator. Each validator should be run in it's standard setting. This is to make sure that nothing breaks if the benchmarks changes. But also to reflect the kind of performance a user of the validator would get, if using it without tweaking.

However, in my opinion, to make an "apples to apples" comparison between schemasafe and the other validators, we should apply the includeErrors option to schemasafe.

Vine.js benchmarking?

Vine.js claims to be one of the fastest, would be interesting if you could add it.

Latest report for json-schema-library

Hi ebdrup.

I am wondering why the latest report for json-schema-library failed. The report shows version 4.0.0 being used on node version 9. Cloning this repository, updating the submodule and switching to node 9 does pass all tests for json-schema-library.

Do you have any idea why this failed in your run?

Thank you for your help!
sagold

Clarification on benchmark

In "Number of test runs per second", does "test runs" mean running the whole JSON schema test suite (about 200+ tests), or just one test in JSON schema test suite?

Thank you.

differentiate between required test failures and the optional feature tests

Moved here from #5
It might be nice to differentiate between required test failures and the optional feature tests as well.

Honestly, the optional/zeroTerminatedFloats tests are not relevant to javascript implementations of json-schema at all, they are intended for languages that differentiate between 1.0 and 1. Given the wording of the spec you could even argue that the tests are not valid in any implementation as 1.0 is a "mathematical integer".

...for interoperability reasons, JSON values used in the context of JSON Schema, whether that JSON be a JSON Schema or an instance, SHOULD ensure that mathematical integers be represented as integers as defined by this specification.

Do the benchmark on a more realistic schema

The current benchmark is run on a subset of the tests in the official JSON-schema test suite.
Although the results seem very much in line with what other stable benchmarks produce (like themis), and exercising as much of the standard as possible is good to catch any slow corners in a validator. It might be a good idea to do a benchmark on data that is more like what you see in production.

Perhaps an performance benchmark on one simple and one advanced schema.

To keep things simple for anyone wanting to chose a validator, the benchmark should still produce one single number for each validator like it does now. Nitty gritty details about performance are for schema validator authors to do in their efforts.

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.