Uploaded Test files
This commit is contained in:
parent
f584ad9d97
commit
2e81cb7d99
16627 changed files with 2065359 additions and 102444 deletions
5
venv/Lib/site-packages/jsonschema/benchmarks/__init__.py
Normal file
5
venv/Lib/site-packages/jsonschema/benchmarks/__init__.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
"""
|
||||
Benchmarks for validation.
|
||||
|
||||
This package is *not* public API.
|
||||
"""
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
26
venv/Lib/site-packages/jsonschema/benchmarks/issue232.py
Normal file
26
venv/Lib/site-packages/jsonschema/benchmarks/issue232.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env python
|
||||
"""
|
||||
A performance benchmark using the example from issue #232.
|
||||
|
||||
See https://github.com/Julian/jsonschema/pull/232.
|
||||
"""
|
||||
from twisted.python.filepath import FilePath
|
||||
from pyperf import Runner
|
||||
from pyrsistent import m
|
||||
|
||||
from jsonschema.tests._suite import Version
|
||||
import jsonschema
|
||||
|
||||
|
||||
issue232 = Version(
|
||||
path=FilePath(__file__).sibling("issue232"),
|
||||
remotes=m(),
|
||||
name="issue232",
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
issue232.benchmark(
|
||||
runner=Runner(),
|
||||
Validator=jsonschema.Draft4Validator,
|
||||
)
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env python
|
||||
"""
|
||||
A performance benchmark using the official test suite.
|
||||
|
||||
This benchmarks jsonschema using every valid example in the
|
||||
JSON-Schema-Test-Suite. It will take some time to complete.
|
||||
"""
|
||||
from pyperf import Runner
|
||||
|
||||
from jsonschema.tests._suite import Suite
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
Suite().benchmark(runner=Runner())
|
Loading…
Add table
Add a link
Reference in a new issue