Files
TheRock/rocm-systems/projects/rocprofiler-sdk/external/sqlite/test/json/README.md
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

2.3 KiB

The files in this subdirectory are used to help measure the performance of the SQLite JSON functions, especially in relation to handling large JSON inputs.

1.0 Prerequisites

  • Standard SQLite build environment (SQLite source tree, compiler, make, etc.)

  • Valgrind

  • Fossil (only the "fossil xdiff" command is used by this procedure)

  • tclsh

2.0 Setup

  • Run: "tclsh json-generator.tcl | sqlite3 json100mb.db" to create the 100 megabyte test database. Do this so that the "json100mb.db" file lands in the directory from which you will run tests, not in the test/json subdirectory of the source tree.

  • Make a copy of "json100mb.db" into "jsonb100mb.db" - change the prefix from "json" to "jsonb".

  • Bring up jsonb100mb.db in the sqlite3 command-line shell. Convert all of the content into JSONB using a commands like this:

   UPDATE data1 SET x=jsonb(x);
   VACUUM;
  • Build the baseline sqlite3.c file with sqlite3.h and shell.c.
   make clean sqlite3.c
  • Run "sh json-speed-check.sh trunk". This creates the baseline profile in "jout-trunk.txt" for the preformance test using text JSON.

  • Run "sh json-speed-check.sh trunk --jsonb". This creates the baseline profile in "joutb-trunk.txt" for the performance test for processing JSONB

  • (Optional) Verify that the json100mb.db database really does contain approximately 100MB of JSON content by running:

   SELECT sum(length(x)) FROM data1;
   SELECT * FROM data1 WHERE NOT json_valid(x);

3.0 Testing

  • Build the sqlite3.c (with sqlite3.h and shell.c) to be tested.

  • Run "sh json-speed-check.sh x1". The profile output will appear in jout-x1.txt. Substitute any label you want in place of "x1".

  • Run "sh json-speed-check.sh x1 --jsonb". The profile output will appear in joutb-x1.txt. Substitute any label you want in place of "x1".

  • Run the script shown below in the CLI. Divide 2500 by the real elapse time from this test to get an estimate for number of MB/s that the JSON parser is able to process.

   .open json100mb.db
   .timer on
   WITH RECURSIVE c(n) AS (VALUES(1) UNION ALL SELECT n+1 FROM c WHERE n<25)
   SELECT sum(json_valid(x)) FROM c, data1;