issue232.py 541 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. """
  3. A performance benchmark using the example from issue #232.
  4. See https://github.com/Julian/jsonschema/pull/232.
  5. """
  6. from twisted.python.filepath import FilePath
  7. from pyperf import Runner
  8. from pyrsistent import m
  9. from jsonschema.tests._suite import Version
  10. import jsonschema
  11. issue232 = Version(
  12. path=FilePath(__file__).sibling("issue232"),
  13. remotes=m(),
  14. name="issue232",
  15. )
  16. if __name__ == "__main__":
  17. issue232.benchmark(
  18. runner=Runner(),
  19. Validator=jsonschema.Draft4Validator,
  20. )