json-model-compiler 2.0.56__tar.gz → 2.0.57__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. json_model_compiler-2.0.57/.github/workflows/docs.yml +34 -0
  2. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/.github/workflows/sanity.yml +5 -1
  3. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/.gitignore +3 -0
  4. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/BACKLOG.md +4 -1
  5. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/BENCH.md +28 -41
  6. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/DEV.md +9 -0
  7. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/Makefile +13 -3
  8. {json_model_compiler-2.0.56/json_model_compiler.egg-info → json_model_compiler-2.0.57}/PKG-INFO +1 -1
  9. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/VERSION.md +24 -0
  10. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/about.sh +1 -1
  11. json_model_compiler-2.0.57/bench.sh +33 -0
  12. json_model_compiler-2.0.57/json_model/data/VERSION +1 -0
  13. json_model_compiler-2.0.57/json_model/data/perl_exe.pl +1 -0
  14. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/language.py +2 -1
  15. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/perl.py +14 -5
  16. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/lib/JSON/JsonModel.pm +15 -6
  17. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57/json_model_compiler.egg-info}/PKG-INFO +1 -1
  18. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model_compiler.egg-info/SOURCES.txt +2 -0
  19. json_model_compiler-2.0.56/json_model/data/VERSION +0 -1
  20. json_model_compiler-2.0.56/json_model/data/perl_exe.pl +0 -1
  21. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/.gitmodules +0 -0
  22. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/API.md +0 -0
  23. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/DESIGN.md +0 -0
  24. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/DOC.md +0 -0
  25. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/HOWTO.md +0 -0
  26. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/INTEGRATION.md +0 -0
  27. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/MANIFEST.in +0 -0
  28. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/PUBS.md +0 -0
  29. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/README.md +0 -0
  30. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/SPEC.md +0 -0
  31. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/TUTO.md +0 -0
  32. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/README.md +0 -0
  33. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/__init__.py +0 -0
  34. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/analyze.py +0 -0
  35. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/clang.py +0 -0
  36. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/convert.py +0 -0
  37. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/clang_entry.c +0 -0
  38. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/clang_free.c +0 -0
  39. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/clang_init.c +0 -0
  40. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/clang_pcre2_fun.c +0 -0
  41. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/clang_re2_fun.c +0 -0
  42. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/java_free.java +0 -0
  43. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/java_init.java +0 -0
  44. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/javascript_exe.js +0 -0
  45. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/javascript_foot.js +0 -0
  46. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/javascript_free.js +0 -0
  47. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/javascript_head.js +0 -0
  48. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/javascript_init.js +0 -0
  49. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/javascript_main.js +0 -0
  50. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/jmc.pod +0 -0
  51. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/perl_entry.pl +0 -0
  52. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/perl_free.pl +0 -0
  53. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/perl_init.pl +0 -0
  54. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/perl_main.pl +0 -0
  55. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/perl_pkg.pl +0 -0
  56. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/plpgsql_entry.sql +0 -0
  57. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/python_entry.py +0 -0
  58. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/python_exe.py +0 -0
  59. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/python_free.py +0 -0
  60. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/python_init.py +0 -0
  61. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/data/python_main.py +0 -0
  62. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/export.py +0 -0
  63. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/irep.py +0 -0
  64. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/java.py +0 -0
  65. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/javascript.py +0 -0
  66. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/model.py +0 -0
  67. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/mtypes.py +0 -0
  68. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/objops.py +0 -0
  69. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/optim.py +0 -0
  70. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/plpgsql.py +0 -0
  71. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/predefs.py +0 -0
  72. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/python.py +0 -0
  73. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/recurse.py +0 -0
  74. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/regex.py +0 -0
  75. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/resolver.py +0 -0
  76. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/Makefile +0 -0
  77. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/__init__.py +0 -0
  78. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/c/Makefile +0 -0
  79. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/c/json-model.c +0 -0
  80. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/c/json-model.h +0 -0
  81. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/c/main.c +0 -0
  82. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/.gitignore +0 -0
  83. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/Makefile +0 -0
  84. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/README.md +0 -0
  85. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/env.sh +0 -0
  86. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/json_model/Checker.java +0 -0
  87. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/json_model/GSON.java +0 -0
  88. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/json_model/JSON.java +0 -0
  89. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/json_model/JSONP.java +0 -0
  90. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/json_model/Jackson.java +0 -0
  91. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/json_model/Main.java +0 -0
  92. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/json_model/ModelChecker.java +0 -0
  93. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/json_model/Path.java +0 -0
  94. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/json_model/Report.java +0 -0
  95. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/json_model/Runtime.java +0 -0
  96. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/java/pom.xml +0 -0
  97. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/js/README.md +0 -0
  98. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/js/index.js +0 -0
  99. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/js/main.js +0 -0
  100. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/js/package.json +0 -0
  101. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/.gitignore +0 -0
  102. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/Changes +0 -0
  103. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/LICENSE +0 -0
  104. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/MANIFEST +0 -0
  105. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/Makefile.PL +0 -0
  106. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/README +0 -0
  107. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/env.sh +0 -0
  108. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/ignore.txt +0 -0
  109. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/t/00-load.t +0 -0
  110. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/t/manifest.t +0 -0
  111. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/t/pod-coverage.t +0 -0
  112. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/t/pod.t +0 -0
  113. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/pl/xt/boilerplate.t +0 -0
  114. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/sql/META.json +0 -0
  115. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/sql/Makefile +0 -0
  116. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/sql/json_model--2.0.sql +0 -0
  117. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/sql/json_model.control +0 -0
  118. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/support.py +0 -0
  119. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/runtime/types.py +0 -0
  120. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/script.py +0 -0
  121. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/submodel.py +0 -0
  122. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/ts_export.py +0 -0
  123. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/url_cache.py +0 -0
  124. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/utils.py +0 -0
  125. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model/xstatic.py +0 -0
  126. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model_compiler.egg-info/dependency_links.txt +0 -0
  127. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model_compiler.egg-info/entry_points.txt +0 -0
  128. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model_compiler.egg-info/not-zip-safe +0 -0
  129. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model_compiler.egg-info/requires.txt +0 -0
  130. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/json_model_compiler.egg-info/top_level.txt +0 -0
  131. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/package.json +0 -0
  132. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/pyproject.toml +0 -0
  133. {json_model_compiler-2.0.56 → json_model_compiler-2.0.57}/setup.cfg +0 -0
@@ -0,0 +1,34 @@
1
+ name: JMC Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - post
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v7
15
+ with:
16
+ submodules: true # for JSTS sources
17
+ - name: Install dependencies
18
+ run: apt install cloc make
19
+ - name: Build site
20
+ run: make _site
21
+ - name: Upload documentation artifact
22
+ id: deployment
23
+ uses: actions/upload-pages-artifact@v5
24
+ # with: path: _site
25
+ deploy:
26
+ environment:
27
+ name: github-pages
28
+ url: ${{ steps.deployment.outputs.page_url }}
29
+ runs-on: ubuntu-latest
30
+ needs: build
31
+ steps:
32
+ - name: Deploy to GitHub Pages
33
+ id: deployment
34
+ uses: actions/deploy-pages@v5
@@ -11,7 +11,11 @@ jobs:
11
11
  - name: Checkout project
12
12
  uses: actions/checkout@v7
13
13
  - name: Set up Python
14
- uses: actions/setup-python@v6
14
+ uses: actions/setup-python@v7
15
+ with:
16
+ python-version: '3.13'
17
+ # NOTE google-re2 / bazel error on freethreaded true
18
+ # freethreaded: true
15
19
  - name: Install Package Stuff
16
20
  run: make dev.py
17
21
  - name: Sanity Check
@@ -14,7 +14,10 @@ jmc.1
14
14
  site/MODELS.md
15
15
  site/JMC.md
16
16
  site/ABOUT.md
17
+ site/BENCH.md
17
18
  .about.md
18
19
  local.mk
19
20
  env.sh
20
21
  tmp/
22
+ _site/
23
+ .published.*
@@ -2,8 +2,11 @@
2
2
 
3
3
  ## Current Tasks
4
4
 
5
+ - [ ] pr: switch cristalina to post after release
6
+ - [ ] docker: install missing `Algorithm::LUHN` for perl JSB
5
7
  - [ ] bench: case failures handling needs some fixing
6
- - [ ] tests: run tests inside docker image
8
+ - [ ] tests: allow to skip some tests with make, depending on available runtimes
9
+ - [ ] tests: automate bench launch with a cron job?
7
10
  - [ ] tests: check more bad urls (eg bad %-escape)
8
11
  - [ ] tests: check pydantic generated classes
9
12
  - [ ] static: use combined type test and value extraction when available?
@@ -4,10 +4,10 @@ The purpose of this benchmark is to compare JSON value validation performance fo
4
4
  the same constraints, independently of the syntax used to express these constraints.
5
5
 
6
6
  These artifacts compare
7
- [JSON Model Compiler (jmc)](https://github.com/clairey-zx81/json-model) generated code using the
8
- [JSON Schema Utils (jsu)](https://hub.docker.com/repository/docker/zx80/json-schema-utils)
7
+ [JSON Model Compiler (JMC)](https://github.com/clairey-zx81/json-model) generated code using the
8
+ [JSON Schema Utils (JSU)](https://hub.docker.com/repository/docker/zx80/json-schema-utils)
9
9
  schema to model converter in C, JS, Java (GSON, Jackson and JSONP using Johnzon) and Python with
10
- [Sourcemeta Blaze CLI (sbc)](https://github.com/sourcemeta/jsonschema) using test cases and values
10
+ [Sourcemeta Blaze CLI (SBC)](https://github.com/sourcemeta/jsonschema) using test cases and values
11
11
  from [JSON Schema Benchmark](https://github.com/sourcemeta-research/jsonschema-benchmark).
12
12
 
13
13
  ## Recent Artifacts
@@ -15,26 +15,10 @@ from [JSON Schema Benchmark](https://github.com/sourcemeta-research/jsonschema-b
15
15
  Overall, depending on the chosen metrics, JMC with the C backend is 50-100% faster
16
16
  than Blaze on average to validate JSON values in these artifacts.
17
17
 
18
- - [2026080600](benchmarks/2026080600.md) jsu 0.9.17/jmc 2.0.55 vs sbc 16.7.0, content, fix.
19
- - [2026080501](benchmarks/2026080501.md) jsu 0.9.17/jmc 2.0.55 vs sbc 16.6.0, content, fix.
20
- - [2026080500](benchmarks/2026080500.md) jsu 0.9.17/jmc 2.0.55 vs sbc 16.5.0, content, fix.
21
- - [2026080400](benchmarks/2026080400.md) jsu 0.9.16/jmc 2.0.55 vs sbc 16.5.0, content, fix.
22
- - [2026080300](benchmarks/2026080300.md) jsu 0.9.16/jmc 2.0.55 vs sbc 16.4.0, content, fix.
23
- - [2026080100](benchmarks/2026080100.md) jsu 0.9.16/jmc 2.0.55 vs sbc 16.3.0, content, no fix.
24
- - [2026073100](benchmarks/2026073100.md) jsu 0.9.16/jmc 2.0.55 vs sbc 16.3.0, content, fix.
25
- - [2026073003](benchmarks/2026073003.md) jsu 0.9.16/jmc 2.0.54 vs sbc 16.3.0, content, fix.
26
- - [2026072902](benchmarks/2026072902.md) jsu 0.9.15/jmc 2.0.53 vs sbc 16.3.0, content, fix.
27
- - [2026072900](benchmarks/2026072900.md) jsu 0.9.15/jmc 2.0.52 vs sbc 16.3.0, content, fix.
28
- - [2026072600](benchmarks/2026072600.md) jsu 0.9.13/jmc 2.0.52 vs sbc 16.3.0, content, fix.
29
- - [2026072200](benchmarks/2026072200.md) jsu 0.9.13/jmc 2.0.52 vs sbc 16.2.1, content, fix.
30
- - [2026071700](benchmarks/2026071700.md) jsu 0.9.13/jmc 2.0.52 vs sbc 16.2.0, content, fix.
31
- - [2026071302](benchmarks/2026071302.md) jsu 0.9.13/jmc 2.0.52 vs sbc 16.1.0, content, fix.
32
- - [2026071000](benchmarks/2026071000.md) jsu 0.9.12/jmc 2.0.51 vs sbc 16.1.0, no content, fix.
33
- - [2026070900](benchmarks/2026070900.md) jsu 0.9.11/jmc 2.0.51 vs sbc 16.1.0, no content, fix.
34
- - [2026062200](benchmarks/2026062200.md) jsu 0.9.11/jmc 2.0.51 vs sbc 16.0.0, no content, fix.
35
- - [2026062102](benchmarks/2026062102.md) jsu 0.9.10/jmc 2.0.50 vs sbc 16.0.0, no content, fix.
36
-
37
- Options: _content_ validate string contents (format/predef), _fix_ improved models (bug fixes) or strictly schema compatible models.
18
+ BENCHES
19
+
20
+ Options: _content_ validate string contents (format/predef), _fix_ improved models (bug fixes)
21
+ or _no_ for strictly schema compatible models.
38
22
 
39
23
  ## Benchmarking Script
40
24
 
@@ -51,7 +35,7 @@ It is typically started on a large host with the
51
35
  which will spawn the necessary containers:
52
36
 
53
37
  ```sh
54
- JMC=latest JMC_OPTS="--predef --cc=clang" JSU_OPTS="--id --fix --no-strict" \
38
+ JMC=latest JMC_OPTS="--predef --cc=clang" \
55
39
  nohup ./start_bench.sh latest -p 12 -l 1000 -r 5 -c &
56
40
  # in the generated directory, look for the summary markdown and radar json files.
57
41
  ```
@@ -85,42 +69,42 @@ the run stops as soon as possible.
85
69
  Note that performance figures **must** be taken with a pinch of salt, please consider
86
70
  the following caveats, and others:
87
71
 
88
- - do you value latency or throuput or resource consumption? the answer is not so obvious,
72
+ - Do you value latency or throuput or resource consumption? the answer is not so obvious,
89
73
  probably you should prefer a high throuput _if_ the latency is good enough, but these
90
74
  benchmark actually measure raw latency.
91
- - test cases may or may not be representative of specific use cases,
75
+ - Test cases may or may not be representative of specific use cases,
92
76
  especially wrt schema/model and value sizes.
93
- - the overall load on the test host can impact measures, as well as power control
77
+ - The overall load on the test host can impact measures, as well as power control
94
78
  features which adjust the cpu frequency in real time, thus the frequency may be set
95
79
  explicitely, and effort are made to cap the load to limit its impact on measures.
96
80
  - Relying on hyper-threading can reduce performance for simple one thread tasks,
97
81
  so it is often disabled.
98
- - the measure overhead is estimated and deduced from the performance figures by default,
82
+ - The measure overhead is estimated and deduced from the performance figures by default,
99
83
  which leads to potentially fuzzy results when testing very small values.
100
- - compilers, libraries and other design and updates can have dramatic effects:
84
+ - Compilers, libraries and other design and updates can have dramatic effects:
101
85
  for faster parsing, a library may use linked-list for properties, which means
102
86
  that retrieving a given property value will cost more than a library which uses
103
87
  a hash table which is more costly to build.
104
- - before version _16.0_, blaze does _not_ implement checking string values (eg dates, url…),
88
+ - Before version _16.0_, blaze does _not_ implement checking string values (eg dates, url…),
105
89
  so these checks may be disactivated (see _Contents_ in _Parameters_) for fairness,
106
90
  reducing the results significance.
107
- - blaze uses its own special-purpose JSON representation which include a precomputed
91
+ - Blaze uses its own special-purpose JSON representation which include a precomputed
108
92
  custom hash for string comparisons, aleviating the need to actually compare strings
109
93
  in most cases.
110
- - blaze is a C++ library, if interfaced from another language, the cost of translating
94
+ - Blaze is a C++ library, if interfaced from another language, the cost of translating
111
95
  the JSON representation to this library should be taken into account;
112
96
  in contrast, jmc uses native JSON representations in the target ecosystem and generate
113
97
  validation code around it.
114
- - due to intrinsic limitations of the underlying libraries and the quality of models or schemas,
98
+ - Due to intrinsic limitations of the underlying libraries and the quality of models or schemas,
115
99
  some results may differ, mostly for good reasons: regex incompatibilities, stricter
116
100
  model definitions compared to lax schemas…
117
- - it is unclear whether JIT optimizations (eg Java and JS) may work around the
101
+ - It is unclear whether JIT optimizations (eg Java and JS) may work around the
118
102
  benchmarking loops and report undue very fast performances, eg on the GeoJSON case.
119
- - some execution environment (eg Java) take advantage of parallelism with threads (possibly
103
+ - Some execution environment (eg Java) take advantage of parallelism with threads (possibly
120
104
  for the garbage collector and JIT), which may or may not be a blessing: it can reduce
121
105
  the apparent latency (eg the gc runs in another thread) but have a detrimental overall
122
106
  effect on throughput and costs as more cpu ressources are spent on the same task.
123
- - test values are mostly valid, which is representative of a typical use case, but
107
+ - Test values are mostly valid, which is representative of a typical use case, but
124
108
  the tool accuracy should be asserted elsewhere with failing cases.
125
109
 
126
110
  ## Other Artifacts
@@ -137,13 +121,16 @@ It should be noted that benchmarking conditions are quite different compared to
137
121
  1. There is no loop to compute an average performance, but an initial _cold_ one-shot measure,
138
122
  a warming phase loop (up to 1000 rounds, kept under 10 seconds) and a _hot_ one-shot measure:
139
123
  This may tend to mask effects from occasional GC runs.
140
- 2. The benchmark focuses on schema conformance, including (buggy) schemas which
124
+ 2. Performance data are collected on all tests taken together: this is less favorable to cache
125
+ effects, and makes it impossible to investigate individual test figures.
126
+ 3. The benchmark focuses on schema conformance, including (buggy) schemas which
141
127
  are mostly dead code: It rejects tools which do not validate all strictly conformant
142
128
  values, even if these values would be rejected by the target application.
143
129
  The model used are strictly converted from schemas, native models are not used
144
130
  even if available and schemas are not fixed for typical errors (eg misplaced keywords).
145
- 3. Three schemas (`krakend`, `stale` and `yamllint`) in the test suites have been
146
- [edited](https://github.com/sourcemeta-research/jsonschema-benchmark/commit/ad109eb210c0939bd8393da28d8212f75c1c2d92),
147
- especially to deal corner cases issues with `$ref` under version 7 and prior,
148
- thus do not conform to the initial official schemas.
149
131
  4. The benchmark _removes_ format assertions before testing schemas.
132
+
133
+ Notably, three schemas (`krakend`, `stale` and `yamllint`) in the test suites have been
134
+ [edited](https://github.com/sourcemeta-research/jsonschema-benchmark/commit/ad109eb210c0939bd8393da28d8212f75c1c2d92),
135
+ as a work around corner cases issues with `$ref` under version 7 and prior,
136
+ thus do not conform to the initial official schemas.
@@ -132,6 +132,15 @@ make clean.js js # regenerate js stuff (and other languages)
132
132
  make foo.CLEAN foo.ALL # clean/regenerate all stuff for case "foo"
133
133
  ```
134
134
 
135
+ ### Tests in Docker Image
136
+
137
+ C, Java, JS, Perl and Python tests can run inside the docker image.
138
+ Some tests are skip, especially PL/pgSQL and JSON Schema Test Suite tests.
139
+
140
+ ```bash
141
+ jmc exec make -C /app/json-model/tests check
142
+ ```
143
+
135
144
  ## Code Doc
136
145
 
137
146
  Read sources…
@@ -23,6 +23,7 @@ venv/.init:
23
23
 
24
24
  venv/.dev: venv/.init
25
25
  pip install -e .[dev]
26
+ [ -d ../json-schema-utils ] && pip intall -e ../json-schema-utils
26
27
  touch $@
27
28
 
28
29
  venv/.dist: venv/.dev
@@ -66,7 +67,8 @@ clean.js:
66
67
 
67
68
  .PHONY: clean.site
68
69
  clean.site:
69
- $(RM) site/MODELS.md site/JMC.md site/ABOUT.md .about.md
70
+ $(RM) site/MODELS.md site/JMC.md site/ABOUT.md site/BENCH.md .about.md
71
+ $(RM) -r _site
70
72
 
71
73
  .PHONY: clean.py
72
74
  clean.py:
@@ -154,8 +156,11 @@ site/MODELS.md: Makefile models/
154
156
  site/JMC.md: json_model/data/jmc.pod
155
157
  pod2markdown $< > $@
156
158
 
159
+ site/BENCH.md: ./bench.sh
160
+ ./$< > $@
161
+
157
162
  # generate twice to include the about page in the counts
158
- site/ABOUT.md: ./about.sh site/JMC.md site/MODELS.md
163
+ site/ABOUT.md: ./about.sh site/JMC.md site/MODELS.md site/BENCH.md
159
164
  ./$< > $@
160
165
  ./$< > .about.md
161
166
  mv .about.md $@
@@ -166,6 +171,11 @@ jmc.1: json_model/data/jmc.pod dev
166
171
  year=$$(date +%Y)
167
172
  pod2man $< | sed "s/^\.TH JMC 1.*/.TH JMC 1 $$year \"v$$version\" \"User Documentation\"/" > $@
168
173
 
174
+ _site: build.site
175
+ cp -rL site _site
176
+ find _site -type d -print | xargs chmod a+rx
177
+ find _site -type f -print | xargs chmod a+r
178
+
169
179
  .PHONY: www
170
180
  www: build.site
171
181
  # http://localhost:3000
@@ -178,7 +188,7 @@ www: build.site
178
188
  -include local.mk
179
189
 
180
190
  .PHONY: build.site
181
- build.site: site/MODELS.md site/JMC.md site/ABOUT.md
191
+ build.site: site/MODELS.md site/JMC.md site/ABOUT.md site/BENCH.md
182
192
 
183
193
  .PHONY: publish.site
184
194
  publish.site: build.site
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: json_model_compiler
3
- Version: 2.0.56
3
+ Version: 2.0.57
4
4
  Summary: JSON Model Tools
5
5
  Author: Fabien Coelho, Claire Yannou-Medrala
6
6
  License-Expression: CC0-1.0
@@ -1,5 +1,29 @@
1
1
  # JSON Model Compiler Versions
2
2
 
3
+ ## 2.0.57 on 2026-08-18
4
+
5
+ - bench: improve reporting text
6
+ - bench: add tests on HT and Hz when starting bench
7
+ - pr: improve bench and about pages
8
+ - models: improve jmc-related models
9
+ - tests: merge testing files against a model in a directory
10
+ - tests: add jmc-bench model test
11
+ - bench: ensure fix/no-fix consistency
12
+ - dev: improve dev environment init
13
+ - tests: run tests inside docker image
14
+ - perl: fix bad double post condition
15
+ - perl: report error location
16
+ - tests: enable reporting with perl
17
+ - perl: fix uncleaned reports on pass
18
+ - perl: fix encoding of error message to use utf8
19
+ - perl: fix non deterministic output linked to `each`
20
+ - perl: fix model escaping in error messages
21
+ - bench: add cron job performance script
22
+ - bench: report summary speedup in radar labels
23
+ - pr: generate `BENCH.md` page links
24
+ - tests: test token push
25
+ - pr: create deployment script and cron and test
26
+
3
27
  ## 2.0.56 on 2026-08-07
4
28
 
5
29
  - bench: use local models instead of fetching urls
@@ -154,7 +154,7 @@ on a set of test vectors.
154
154
  - number of test JSON models: _${n_models}_
155
155
  - total test JSON model locs: _${model_locs}_
156
156
  - number of test vector JSON values: _${n_values}_
157
- - all tested JSON values (including models, generated schemas and test suite schemas): _${all_values}_
157
+ - all tested JSON values (including models, generated schemas and IR, and test suite schemas): _${all_values}_
158
158
 
159
159
  [Example models](https://json-model.org/MODELS) cover typical use cases and demonstrate
160
160
  JSON Model power and ease of expression.
@@ -0,0 +1,33 @@
1
+ #! /bin/bash
2
+ #
3
+ # generate BENCH.md page with links to available benchmarks
4
+ #
5
+
6
+ PYPI="https://pypi.org/project"
7
+
8
+ get_version()
9
+ {
10
+ local what=$1 file=$2
11
+ local line=$(grep "$what version:" < $file)
12
+ line=${line#*:\*\* }
13
+ line=${line%% *}
14
+ echo $line
15
+ }
16
+
17
+ sed -ne '1,/BENCHES/p' < BENCH.md | grep -v '^BENCHES$'
18
+
19
+ for artifact in $(ls site/benchmarks/*.md | sort -r) ; do
20
+ link=${artifact#site/}
21
+ name=${link#benchmarks/}
22
+ name=${name%.md}
23
+ jsu=$(get_version jsu $artifact)
24
+ jmc=$(get_version jmc $artifact)
25
+ sbc=$(get_version jsonschema-cli $artifact)
26
+ message=""
27
+ [ "$(grep 'content:.*yes' $artifact)" ] && message+="content" || message+="no content"
28
+ [ "$(grep 'JSU_OPT.*--no-id' $artifact)" ] && message+=", no id"
29
+ [ "$(grep 'fix:.*yes' $artifact)" ] && message+=", fix" || message+=", no fix"
30
+ echo "- Artifact [$name]($link) [JMC $jmc]($PYPI/json-model-compiler/$jmc/)/[JSU $jsu]($PYPI/json-schema-utils/$jsu/) vs [SBC $sbc](https://github.com/sourcemeta/jsonschema/releases/tag/v$sbc), $message."
31
+ done
32
+
33
+ sed -ne '/BENCHES/,$p' < BENCH.md | grep -v '^BENCHES$'
@@ -0,0 +1 @@
1
+ 2.0.57
@@ -0,0 +1 @@
1
+ #! /usr/bin/perl -CDSA
@@ -1,4 +1,5 @@
1
1
  import re
2
+ import json
2
3
  from .mtypes import Jsonable, JsonScalar, Number, TestHint, Conditionals, Block
3
4
  from .mtypes import Var, JsonExpr, BoolExpr, IntExpr, NumExpr, StrExpr, PathExpr, Expr
4
5
  from .predefs import BOOL_MODEL_PREDEFS, INT_MODEL_PREDEFS, FLOAT_MODEL_PREDEFS, STR_MODEL_PREDEFS
@@ -573,7 +574,7 @@ class Language:
573
574
 
574
575
  def esc_msg(self, s: str) -> StrExpr:
575
576
  """Escape string for inclusion in a report message."""
576
- return self.esc(s)
577
+ return json.dumps(s)
577
578
 
578
579
  def skip(self) -> Block:
579
580
  """Skip one line."""
@@ -179,7 +179,7 @@ class Perl(Language):
179
179
  return code
180
180
 
181
181
  def clean_report(self) -> Block:
182
- return [ "$rep = [] if defined $rep;" ] if self._with_report else []
182
+ return [ "@$rep = () if defined $rep;" ] if self._with_report else []
183
183
 
184
184
  def nope(self) -> Block:
185
185
  return [ ";" ]
@@ -295,9 +295,12 @@ class Perl(Language):
295
295
  return [ f"for my ${idx} (0 .. {alen})" ] + \
296
296
  self.indent([f"my ${val} = {aref}[${idx}];"] + body)
297
297
 
298
+ # NOTE probably %each is faster, but lacks determinism; could be an option.
298
299
  def obj_loop(self, obj: Var, key: Var, val: Var, body: Block) -> Block:
299
- return [ f"scalar keys %${obj};", f"while (my (${key}, ${val}) = each %${obj})" ] + \
300
- self.indent(body)
300
+ return [
301
+ f"scalar keys %${obj};",
302
+ f"for my ${key} (sort keys %${obj})"
303
+ ] + self.indent( [ f"my ${val} = $${obj}{{${key}}};" ] + body)
301
304
 
302
305
  def int_loop(self, idx: Var, start: IntExpr, end: IntExpr, body: Block) -> Block:
303
306
  if isinstance(end, int):
@@ -455,7 +458,7 @@ class Perl(Language):
455
458
  code[i] = line.replace("if (! ", "unless (")
456
459
  # simplify if no else one liners
457
460
  # FIXME overflow?
458
- if (ifm := re.match(r"^( +)(if|unless) \((.*)\)", code[i])) and re.match(r"^ *\{$", code[i+1]):
461
+ if (ifm := re.match(r"^( +)(if|unless) \((.*)\)$", code[i])) and re.match(r"^ *\{$", code[i+1]):
459
462
  j = i + 2
460
463
  # skip comments and blanks
461
464
  while code[j] is None or re.match(r"^ *#", code[j]) or re.match(r"^ *$", code[j]):
@@ -465,7 +468,13 @@ class Perl(Language):
465
468
  # go!
466
469
  indent, cond, expr = ifm.group(1), ifm.group(2), ifm.group(3)
467
470
  ins = insm.group(1)
468
- code[i] = f"{indent}{ins} {cond} {expr};"
471
+ if " if " in ins:
472
+ if cond == "unless":
473
+ code[i] = f"{indent}{ins} and not {expr};";
474
+ else:
475
+ code[i] = f"{indent}{ins} and {expr};";
476
+ else:
477
+ code[i] = f"{indent}{ins} {cond} {expr};"
469
478
  code[i+1] = None
470
479
  for k in range(i+2, j):
471
480
  if code[k] is not None and code[k].startswith(" "):
@@ -470,19 +470,31 @@ sub jm_process($$$$$$$$$)
470
470
  my $rep = $report ? [] : undef;
471
471
  my $valid = &$checker($json, $name, $rep) ? 1 : 0;
472
472
 
473
+ my $rep_txt = "";
474
+ if (not $valid and $rep and @$rep) {
475
+ $rep_txt = " (";
476
+ my $count = 0;
477
+ for my $ri (@$rep) {
478
+ $rep_txt .= "; " if $count++;
479
+ my $jpath = "." . join(".", @{$$ri[1]});
480
+ $rep_txt .= "$jpath: $$ri[0]";
481
+ }
482
+ $rep_txt .= ")";
483
+ }
484
+
473
485
  my $ok;
474
486
  if (defined $expect) {
475
487
  if ($valid == $expect) {
476
- print "$display: ", $valid? "PASS": "FAIL", "\n";
488
+ print "$display: ", $valid? "PASS": "FAIL", "$rep_txt\n";
477
489
  $ok = 1;
478
490
  }
479
491
  else {
480
- print "$display: ERROR, unexpected ", $valid? "PASS": "FAIL", "\n";
492
+ print "$display: ERROR, unexpected ", $valid? "PASS": "FAIL", "$rep_txt\n";
481
493
  $ok = 0;
482
494
  }
483
495
  }
484
496
  else {
485
- print "$display: ", $valid? "PASS": "FAIL", "\n";
497
+ print "$display: ", $valid? "PASS": "FAIL", "$rep_txt\n";
486
498
  $ok = 1;
487
499
  }
488
500
 
@@ -695,9 +707,6 @@ sub jm_main($$$)
695
707
  "parse" => \$parse,
696
708
  );
697
709
 
698
- # option fix and warnings
699
- warn "$0: option --report is not implemented yet\n" if $report;
700
-
701
710
  # empty loop measure overhead
702
711
  my $v = $time / 13.0 % 1.0;
703
712
  my $empty = 0.0;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: json_model_compiler
3
- Version: 2.0.56
3
+ Version: 2.0.57
4
4
  Summary: JSON Model Tools
5
5
  Author: Fabien Coelho, Claire Yannou-Medrala
6
6
  License-Expression: CC0-1.0
@@ -16,8 +16,10 @@ SPEC.md
16
16
  TUTO.md
17
17
  VERSION.md
18
18
  about.sh
19
+ bench.sh
19
20
  package.json
20
21
  pyproject.toml
22
+ .github/workflows/docs.yml
21
23
  .github/workflows/sanity.yml
22
24
  json_model/README.md
23
25
  json_model/__init__.py
@@ -1 +0,0 @@
1
- 2.0.56
@@ -1 +0,0 @@
1
- #! /usr/bin/perl