benchbox 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
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.
- benchbox/__init__.py +1 -1
- benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query72.tpl +1 -1
- benchbox/_binaries/tpc-ds/{darwin-x86_64/query_templates/ansi.tpl → templates/query_templates/sqlserver.tpl} +1 -1
- benchbox/_binaries/tpc-ds/templates/query_variants/README +6 -0
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query10.tpl → templates/query_variants/query10a.tpl} +13 -14
- benchbox/_binaries/tpc-ds/{darwin-x86_64/query_templates/query14.tpl → templates/query_variants/query14a.tpl} +30 -26
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query18.tpl → templates/query_variants/query18a.tpl} +40 -19
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query22.tpl → templates/query_variants/query22a.tpl} +31 -9
- benchbox/_binaries/tpc-ds/{darwin-x86_64/query_templates/query27.tpl → templates/query_variants/query27a.tpl} +23 -10
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query35.tpl → templates/query_variants/query35a.tpl} +9 -8
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query36.tpl → templates/query_variants/query36a.tpl} +24 -12
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query51.tpl → templates/query_variants/query51a.tpl} +37 -20
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query5.tpl → templates/query_variants/query5a.tpl} +15 -10
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query67.tpl → templates/query_variants/query67a.tpl} +46 -18
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query70.tpl → templates/query_variants/query70a.tpl} +31 -27
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query77.tpl → templates/query_variants/query77a.tpl} +22 -15
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query80.tpl → templates/query_variants/query80a.tpl} +22 -8
- benchbox/_binaries/tpc-ds/{linux-arm64/query_templates/query86.tpl → templates/query_variants/query86a.tpl} +22 -13
- benchbox/_binaries/tpc-h/templates/dists.dss +836 -0
- benchbox/_binaries/tpc-h/templates/queries/1.sql +28 -0
- benchbox/_binaries/tpc-h/templates/queries/10.sql +38 -0
- benchbox/_binaries/tpc-h/templates/queries/11.sql +34 -0
- benchbox/_binaries/tpc-h/templates/queries/12.sql +35 -0
- benchbox/_binaries/tpc-h/templates/queries/13.sql +27 -0
- benchbox/_binaries/tpc-h/templates/queries/14.sql +20 -0
- benchbox/_binaries/tpc-h/templates/queries/15.sql +40 -0
- benchbox/_binaries/tpc-h/templates/queries/16.sql +37 -0
- benchbox/_binaries/tpc-h/templates/queries/17.sql +24 -0
- benchbox/_binaries/tpc-h/templates/queries/18.sql +39 -0
- benchbox/_binaries/tpc-h/templates/queries/19.sql +42 -0
- benchbox/_binaries/tpc-h/templates/queries/2.sql +50 -0
- benchbox/_binaries/tpc-h/templates/queries/20.sql +44 -0
- benchbox/_binaries/tpc-h/templates/queries/21.sql +46 -0
- benchbox/_binaries/tpc-h/templates/queries/22.sql +44 -0
- benchbox/_binaries/tpc-h/templates/queries/3.sql +29 -0
- benchbox/_binaries/tpc-h/templates/queries/4.sql +28 -0
- benchbox/_binaries/tpc-h/templates/queries/5.sql +31 -0
- benchbox/_binaries/tpc-h/templates/queries/6.sql +16 -0
- benchbox/_binaries/tpc-h/templates/queries/7.sql +46 -0
- benchbox/_binaries/tpc-h/templates/queries/8.sql +44 -0
- benchbox/_binaries/tpc-h/templates/queries/9.sql +39 -0
- benchbox/_binaries/tpc-h/templates/variants/12a.sql +27 -0
- benchbox/_binaries/tpc-h/templates/variants/13a.sql +30 -0
- benchbox/_binaries/tpc-h/templates/variants/14a.sql +18 -0
- benchbox/_binaries/tpc-h/templates/variants/15a.sql +39 -0
- benchbox/_binaries/tpc-h/templates/variants/8a.sql +77 -0
- benchbox/base.py +88 -121
- benchbox/cli/benchmarks.py +3 -3
- benchbox/cli/commands/calculate_qphh.py +55 -14
- benchbox/cli/commands/checks.py +1 -4
- benchbox/cli/commands/convert.py +8 -3
- benchbox/cli/commands/metrics.py +55 -14
- benchbox/cli/commands/results.py +131 -3
- benchbox/cli/commands/run.py +157 -22
- benchbox/cli/commands/visualize.py +3 -3
- benchbox/cli/composite_params.py +1 -1
- benchbox/cli/config.py +13 -3
- benchbox/cli/database.py +3 -3
- benchbox/cli/dryrun.py +30 -4
- benchbox/cli/exceptions.py +2 -1
- benchbox/cli/execution_pipeline.py +2 -1
- benchbox/cli/orchestrator.py +25 -71
- benchbox/cli/tuning.py +1 -1
- benchbox/core/ai_primitives/benchmark.py +53 -0
- benchbox/core/ai_primitives/dataframe_operations.py +1217 -0
- benchbox/core/base_benchmark.py +90 -68
- benchbox/core/coffeeshop/queries.py +1 -1
- benchbox/core/coffeeshop/schema.py +1 -1
- benchbox/core/comparison/plotter.py +5 -4
- benchbox/core/dataframe/__init__.py +26 -0
- benchbox/core/dataframe/benchmark_suite.py +5 -4
- benchbox/core/dataframe/context.py +45 -0
- benchbox/core/dataframe/data_loader.py +180 -79
- benchbox/core/dataframe/maintenance_interface.py +866 -0
- benchbox/core/dryrun.py +152 -22
- benchbox/core/expected_results/registry.py +22 -5
- benchbox/core/manifest/io.py +4 -3
- benchbox/core/metadata_primitives/__init__.py +31 -0
- benchbox/core/metadata_primitives/benchmark.py +337 -0
- benchbox/core/metadata_primitives/dataframe_operations.py +1824 -0
- benchbox/core/platform_registry.py +134 -45
- benchbox/core/read_primitives/benchmark.py +56 -4
- benchbox/core/read_primitives/dataframe_queries.py +6547 -0
- benchbox/core/results/__init__.py +47 -6
- benchbox/core/results/builder.py +909 -0
- benchbox/core/results/database.py +5 -5
- benchbox/core/results/exporter.py +58 -96
- benchbox/core/results/filenames.py +102 -0
- benchbox/core/results/loader.py +10 -9
- benchbox/core/results/metrics.py +211 -0
- benchbox/core/results/models.py +3 -1
- benchbox/core/results/normalizer.py +346 -0
- benchbox/core/results/platform_info.py +235 -0
- benchbox/core/results/query_normalizer.py +200 -0
- benchbox/core/results/schema.py +368 -69
- benchbox/core/runner/conversion.py +2 -0
- benchbox/core/runner/dataframe_runner.py +135 -131
- benchbox/core/runner/runner.py +111 -18
- benchbox/core/schemas.py +145 -3
- benchbox/core/ssb/generator.py +14 -2
- benchbox/core/tpc_compliance.py +4 -4
- benchbox/core/tpc_metrics.py +9 -4
- benchbox/core/tpcdi/generator/manifest.py +15 -2
- benchbox/core/tpcds/benchmark/runner.py +3 -7
- benchbox/core/tpcds/c_tools.py +34 -28
- benchbox/core/tpcds/dataframe_queries/queries.py +44 -21
- benchbox/core/tpcds/generator/filesystem.py +23 -11
- benchbox/core/tpcds/generator/manager.py +3 -2
- benchbox/core/tpcds/maintenance_test.py +281 -0
- benchbox/core/tpcds/power_test.py +21 -11
- benchbox/core/tpcds/throughput_test.py +27 -9
- benchbox/core/tpcds_obt/etl/transformer.py +24 -5
- benchbox/core/tpch/dataframe_queries.py +46 -43
- benchbox/core/tpch/generator.py +21 -8
- benchbox/core/tpch/maintenance_test.py +87 -0
- benchbox/core/tpch/power_test.py +21 -5
- benchbox/core/tpch/queries.py +2 -7
- benchbox/core/tpch/streams.py +3 -19
- benchbox/core/transaction_primitives/benchmark.py +99 -0
- benchbox/core/transaction_primitives/dataframe_operations.py +1294 -0
- benchbox/core/transaction_primitives/generator.py +11 -4
- benchbox/core/visualization/__init__.py +2 -2
- benchbox/core/visualization/charts.py +4 -4
- benchbox/core/visualization/dependencies.py +1 -12
- benchbox/core/visualization/exporters.py +15 -26
- benchbox/core/visualization/result_plotter.py +90 -49
- benchbox/core/visualization/templates.py +6 -6
- benchbox/core/write_primitives/__init__.py +13 -0
- benchbox/core/write_primitives/benchmark.py +66 -0
- benchbox/core/write_primitives/dataframe_operations.py +912 -0
- benchbox/core/write_primitives/generator.py +11 -4
- benchbox/mcp/__init__.py +5 -1
- benchbox/mcp/errors.py +29 -0
- benchbox/mcp/resources/registry.py +12 -7
- benchbox/mcp/schemas.py +62 -0
- benchbox/mcp/server.py +17 -14
- benchbox/mcp/tools/__init__.py +3 -0
- benchbox/mcp/tools/analytics.py +550 -582
- benchbox/mcp/tools/benchmark.py +603 -611
- benchbox/mcp/tools/discovery.py +156 -205
- benchbox/mcp/tools/results.py +332 -533
- benchbox/mcp/tools/visualization.py +449 -0
- benchbox/platforms/__init__.py +740 -622
- benchbox/platforms/adapter_factory.py +6 -6
- benchbox/platforms/azure_synapse.py +3 -7
- benchbox/platforms/base/adapter.py +189 -49
- benchbox/platforms/base/cloud_spark/config.py +8 -0
- benchbox/platforms/base/cloud_spark/mixins.py +96 -0
- benchbox/platforms/base/cloud_spark/session.py +4 -2
- benchbox/platforms/base/cloud_spark/staging.py +15 -7
- benchbox/platforms/base/data_loading.py +315 -1
- benchbox/platforms/base/format_capabilities.py +37 -2
- benchbox/platforms/base/utils.py +6 -4
- benchbox/platforms/bigquery.py +5 -6
- benchbox/platforms/clickhouse_cloud.py +263 -0
- benchbox/platforms/databricks/adapter.py +16 -15
- benchbox/platforms/databricks/dataframe_adapter.py +4 -1
- benchbox/platforms/dataframe/__init__.py +31 -0
- benchbox/platforms/dataframe/benchmark_mixin.py +779 -0
- benchbox/platforms/dataframe/cudf_df.py +3 -3
- benchbox/platforms/dataframe/dask_df.py +3 -3
- benchbox/platforms/dataframe/datafusion_df.py +152 -15
- benchbox/platforms/dataframe/delta_lake_maintenance.py +341 -0
- benchbox/platforms/dataframe/ducklake_maintenance.py +402 -0
- benchbox/platforms/dataframe/expression_family.py +47 -8
- benchbox/platforms/dataframe/hudi_maintenance.py +437 -0
- benchbox/platforms/dataframe/iceberg_maintenance.py +605 -0
- benchbox/platforms/dataframe/modin_df.py +3 -3
- benchbox/platforms/dataframe/pandas_df.py +3 -3
- benchbox/platforms/dataframe/pandas_family.py +59 -8
- benchbox/platforms/dataframe/platform_checker.py +16 -49
- benchbox/platforms/dataframe/polars_df.py +14 -12
- benchbox/platforms/dataframe/polars_maintenance.py +630 -0
- benchbox/platforms/dataframe/pyspark_df.py +15 -0
- benchbox/platforms/dataframe/pyspark_maintenance.py +613 -0
- benchbox/platforms/datafusion.py +5 -6
- benchbox/platforms/duckdb.py +2 -1
- benchbox/platforms/fabric_warehouse.py +15 -15
- benchbox/platforms/firebolt.py +3 -2
- benchbox/platforms/influxdb/adapter.py +7 -3
- benchbox/platforms/motherduck.py +3 -2
- benchbox/platforms/onehouse/__init__.py +39 -0
- benchbox/platforms/onehouse/onehouse_client.py +509 -0
- benchbox/platforms/onehouse/quanton_adapter.py +646 -0
- benchbox/platforms/postgresql.py +5 -9
- benchbox/platforms/presto.py +2 -2
- benchbox/platforms/pyspark/session.py +3 -3
- benchbox/platforms/pyspark/sql_adapter.py +2 -3
- benchbox/platforms/redshift.py +7 -7
- benchbox/platforms/snowflake.py +4 -4
- benchbox/platforms/snowpark_connect.py +2 -1
- benchbox/platforms/trino.py +2 -2
- benchbox/release/__init__.py +17 -0
- benchbox/release/content_validation.py +745 -0
- benchbox/release/workflow.py +17 -0
- benchbox/utils/VERSION_MANAGEMENT.md +1 -1
- benchbox/utils/cloud_storage.py +7 -5
- benchbox/utils/compression.py +8 -8
- benchbox/utils/compression_mixin.py +2 -1
- benchbox/utils/data_validation.py +23 -14
- benchbox/utils/dependencies.py +47 -7
- benchbox/utils/file_format.py +407 -0
- benchbox/utils/format_converters/__init__.py +5 -1
- benchbox/utils/format_converters/ducklake_converter.py +227 -0
- benchbox/utils/format_converters/vortex_converter.py +168 -0
- benchbox/utils/tpc_compilation.py +43 -0
- benchbox/utils/version.py +14 -2
- {benchbox-0.1.0.dist-info → benchbox-0.1.1.dist-info}/METADATA +15 -15
- benchbox-0.1.1.dist-info/RECORD +839 -0
- {benchbox-0.1.0.dist-info → benchbox-0.1.1.dist-info}/WHEEL +1 -1
- benchbox/_binaries/tpc-ds/darwin-arm64/query_templates/sqlserver.tpl +0 -37
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/README +0 -4
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/db2.tpl +0 -38
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/netezza.tpl +0 -38
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/oracle.tpl +0 -38
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query1.tpl +0 -62
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query10.tpl +0 -98
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query11.tpl +0 -119
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query12.tpl +0 -72
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query13.tpl +0 -89
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query15.tpl +0 -56
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query16.tpl +0 -76
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query17.tpl +0 -80
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query18.tpl +0 -73
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query19.tpl +0 -64
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query2.tpl +0 -94
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query20.tpl +0 -67
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query21.tpl +0 -65
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query22.tpl +0 -54
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query23.tpl +0 -144
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query24.tpl +0 -147
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query25.tpl +0 -84
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query26.tpl +0 -61
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query28.tpl +0 -90
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query29.tpl +0 -85
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query3.tpl +0 -58
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query30.tpl +0 -66
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query31.tpl +0 -88
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query32.tpl +0 -65
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query33.tpl +0 -113
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query34.tpl +0 -77
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query35.tpl +0 -98
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query36.tpl +0 -74
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query37.tpl +0 -57
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query38.tpl +0 -58
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query39.tpl +0 -93
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query4.tpl +0 -154
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query40.tpl +0 -63
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query41.tpl +0 -90
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query42.tpl +0 -64
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query43.tpl +0 -55
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query44.tpl +0 -72
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query45.tpl +0 -56
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query46.tpl +0 -78
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query47.tpl +0 -89
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query48.tpl +0 -104
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query49.tpl +0 -164
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query5.tpl +0 -165
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query50.tpl +0 -96
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query51.tpl +0 -80
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query52.tpl +0 -59
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query53.tpl +0 -64
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query54.tpl +0 -95
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query55.tpl +0 -52
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query56.tpl +0 -108
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query57.tpl +0 -87
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query58.tpl +0 -101
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query59.tpl +0 -79
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query6.tpl +0 -62
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query60.tpl +0 -115
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query61.tpl +0 -83
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query62.tpl +0 -71
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query63.tpl +0 -64
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query64.tpl +0 -157
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query65.tpl +0 -62
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query66.tpl +0 -261
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query67.tpl +0 -81
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query68.tpl +0 -82
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query69.tpl +0 -85
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query7.tpl +0 -60
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query70.tpl +0 -73
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query71.tpl +0 -74
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query72.tpl +0 -67
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query73.tpl +0 -69
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query74.tpl +0 -99
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query75.tpl +0 -107
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query76.tpl +0 -64
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query77.tpl +0 -145
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query78.tpl +0 -94
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query79.tpl +0 -60
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query8.tpl +0 -144
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query80.tpl +0 -131
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query81.tpl +0 -68
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query82.tpl +0 -56
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query83.tpl +0 -104
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query84.tpl +0 -58
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query85.tpl +0 -121
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query86.tpl +0 -60
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query87.tpl +0 -56
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query88.tpl +0 -128
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query89.tpl +0 -75
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query9.tpl +0 -88
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query90.tpl +0 -58
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query91.tpl +0 -68
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query92.tpl +0 -68
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query93.tpl +0 -53
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query94.tpl +0 -67
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query95.tpl +0 -71
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query96.tpl +0 -52
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query97.tpl +0 -62
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query98.tpl +0 -70
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/query99.tpl +0 -69
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/sqlserver.tpl +0 -37
- benchbox/_binaries/tpc-ds/darwin-x86_64/query_templates/templates.lst +0 -99
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/README +0 -4
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/ansi.tpl +0 -38
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/db2.tpl +0 -38
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/netezza.tpl +0 -38
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/oracle.tpl +0 -38
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query1.tpl +0 -62
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query11.tpl +0 -119
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query12.tpl +0 -72
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query13.tpl +0 -89
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query14.tpl +0 -247
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query15.tpl +0 -56
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query16.tpl +0 -76
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query17.tpl +0 -80
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query19.tpl +0 -64
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query2.tpl +0 -94
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query20.tpl +0 -67
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query21.tpl +0 -65
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query23.tpl +0 -144
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query24.tpl +0 -147
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query25.tpl +0 -84
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query26.tpl +0 -61
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query27.tpl +0 -68
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query28.tpl +0 -90
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query29.tpl +0 -85
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query3.tpl +0 -58
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query30.tpl +0 -66
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query31.tpl +0 -88
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query32.tpl +0 -65
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query33.tpl +0 -113
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query34.tpl +0 -77
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query37.tpl +0 -57
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query38.tpl +0 -58
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query39.tpl +0 -93
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query4.tpl +0 -154
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query40.tpl +0 -63
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query41.tpl +0 -90
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query42.tpl +0 -64
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query43.tpl +0 -55
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query44.tpl +0 -72
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query45.tpl +0 -56
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query46.tpl +0 -78
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query47.tpl +0 -89
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query48.tpl +0 -104
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query49.tpl +0 -164
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query50.tpl +0 -96
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query52.tpl +0 -59
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query53.tpl +0 -64
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query54.tpl +0 -95
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query55.tpl +0 -52
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query56.tpl +0 -108
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query57.tpl +0 -87
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query58.tpl +0 -101
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query59.tpl +0 -79
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query6.tpl +0 -62
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query60.tpl +0 -115
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query61.tpl +0 -83
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query62.tpl +0 -71
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query63.tpl +0 -64
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query64.tpl +0 -157
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query65.tpl +0 -62
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query66.tpl +0 -261
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query68.tpl +0 -82
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query69.tpl +0 -85
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query7.tpl +0 -60
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query71.tpl +0 -74
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query72.tpl +0 -67
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query73.tpl +0 -69
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query74.tpl +0 -99
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query75.tpl +0 -107
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query76.tpl +0 -64
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query78.tpl +0 -94
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query79.tpl +0 -60
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query8.tpl +0 -144
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query81.tpl +0 -68
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query82.tpl +0 -56
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query83.tpl +0 -104
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query84.tpl +0 -58
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query85.tpl +0 -121
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query87.tpl +0 -56
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query88.tpl +0 -128
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query89.tpl +0 -75
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query9.tpl +0 -88
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query90.tpl +0 -58
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query91.tpl +0 -68
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query92.tpl +0 -68
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query93.tpl +0 -53
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query94.tpl +0 -67
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query95.tpl +0 -71
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query96.tpl +0 -52
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query97.tpl +0 -62
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query98.tpl +0 -70
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/query99.tpl +0 -69
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/sqlserver.tpl +0 -37
- benchbox/_binaries/tpc-ds/linux-arm64/query_templates/templates.lst +0 -99
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/README +0 -4
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/ansi.tpl +0 -38
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/db2.tpl +0 -38
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/netezza.tpl +0 -38
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/oracle.tpl +0 -38
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query1.tpl +0 -62
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query10.tpl +0 -98
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query11.tpl +0 -119
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query12.tpl +0 -72
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query13.tpl +0 -89
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query14.tpl +0 -247
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query15.tpl +0 -56
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query16.tpl +0 -76
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query17.tpl +0 -80
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query18.tpl +0 -73
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query19.tpl +0 -64
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query2.tpl +0 -94
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query20.tpl +0 -67
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query21.tpl +0 -65
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query22.tpl +0 -54
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query23.tpl +0 -144
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query24.tpl +0 -147
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query25.tpl +0 -84
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query26.tpl +0 -61
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query27.tpl +0 -68
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query28.tpl +0 -90
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query29.tpl +0 -85
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query3.tpl +0 -58
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query30.tpl +0 -66
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query31.tpl +0 -88
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query32.tpl +0 -65
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query33.tpl +0 -113
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query34.tpl +0 -77
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query35.tpl +0 -98
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query36.tpl +0 -74
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query37.tpl +0 -57
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query38.tpl +0 -58
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query39.tpl +0 -93
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query4.tpl +0 -154
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query40.tpl +0 -63
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query41.tpl +0 -90
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query42.tpl +0 -64
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query43.tpl +0 -55
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query44.tpl +0 -72
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query45.tpl +0 -56
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query46.tpl +0 -78
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query47.tpl +0 -89
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query48.tpl +0 -104
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query49.tpl +0 -164
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query5.tpl +0 -165
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query50.tpl +0 -96
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query51.tpl +0 -80
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query52.tpl +0 -59
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query53.tpl +0 -64
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query54.tpl +0 -95
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query55.tpl +0 -52
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query56.tpl +0 -108
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query57.tpl +0 -87
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query58.tpl +0 -101
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query59.tpl +0 -79
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query6.tpl +0 -62
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query60.tpl +0 -115
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query61.tpl +0 -83
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query62.tpl +0 -71
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query63.tpl +0 -64
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query64.tpl +0 -157
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query65.tpl +0 -62
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query66.tpl +0 -261
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query67.tpl +0 -81
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query68.tpl +0 -82
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query69.tpl +0 -85
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query7.tpl +0 -60
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query70.tpl +0 -73
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query71.tpl +0 -74
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query72.tpl +0 -67
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query73.tpl +0 -69
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query74.tpl +0 -99
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query75.tpl +0 -107
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query76.tpl +0 -64
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query77.tpl +0 -145
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query78.tpl +0 -94
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query79.tpl +0 -60
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query8.tpl +0 -144
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query80.tpl +0 -131
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query81.tpl +0 -68
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query82.tpl +0 -56
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query83.tpl +0 -104
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query84.tpl +0 -58
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query85.tpl +0 -121
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query86.tpl +0 -60
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query87.tpl +0 -56
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query88.tpl +0 -128
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query89.tpl +0 -75
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query9.tpl +0 -88
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query90.tpl +0 -58
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query91.tpl +0 -68
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query92.tpl +0 -68
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query93.tpl +0 -53
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query94.tpl +0 -67
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query95.tpl +0 -71
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query96.tpl +0 -52
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query97.tpl +0 -62
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query98.tpl +0 -70
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/query99.tpl +0 -69
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/sqlserver.tpl +0 -37
- benchbox/_binaries/tpc-ds/linux-x86_64/query_templates/templates.lst +0 -99
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/README +0 -4
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/ansi.tpl +0 -38
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/db2.tpl +0 -38
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/netezza.tpl +0 -38
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/oracle.tpl +0 -38
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query1.tpl +0 -62
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query10.tpl +0 -98
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query11.tpl +0 -119
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query12.tpl +0 -72
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query13.tpl +0 -89
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query14.tpl +0 -247
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query15.tpl +0 -56
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query16.tpl +0 -76
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query17.tpl +0 -80
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query18.tpl +0 -73
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query19.tpl +0 -64
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query2.tpl +0 -94
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query20.tpl +0 -67
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query21.tpl +0 -65
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query22.tpl +0 -54
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query23.tpl +0 -144
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query24.tpl +0 -147
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query25.tpl +0 -84
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query26.tpl +0 -61
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query27.tpl +0 -68
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query28.tpl +0 -90
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query29.tpl +0 -85
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query3.tpl +0 -58
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query30.tpl +0 -66
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query31.tpl +0 -88
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query32.tpl +0 -65
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query33.tpl +0 -113
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query34.tpl +0 -77
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query35.tpl +0 -98
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query36.tpl +0 -74
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query37.tpl +0 -57
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query38.tpl +0 -58
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query39.tpl +0 -93
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query4.tpl +0 -154
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query40.tpl +0 -63
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query41.tpl +0 -90
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query42.tpl +0 -64
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query43.tpl +0 -55
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query44.tpl +0 -72
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query45.tpl +0 -56
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query46.tpl +0 -78
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query47.tpl +0 -89
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query48.tpl +0 -104
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query49.tpl +0 -164
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query5.tpl +0 -165
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query50.tpl +0 -96
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query51.tpl +0 -80
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query52.tpl +0 -59
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query53.tpl +0 -64
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query54.tpl +0 -95
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query55.tpl +0 -52
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query56.tpl +0 -108
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query57.tpl +0 -87
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query58.tpl +0 -101
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query59.tpl +0 -79
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query6.tpl +0 -62
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query60.tpl +0 -115
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query61.tpl +0 -83
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query62.tpl +0 -71
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query63.tpl +0 -64
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query64.tpl +0 -157
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query65.tpl +0 -62
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query66.tpl +0 -261
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query67.tpl +0 -81
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query68.tpl +0 -82
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query69.tpl +0 -85
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query7.tpl +0 -60
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query70.tpl +0 -73
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query71.tpl +0 -74
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query72.tpl +0 -67
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query73.tpl +0 -69
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query74.tpl +0 -99
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query75.tpl +0 -107
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query76.tpl +0 -64
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query77.tpl +0 -145
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query78.tpl +0 -94
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query79.tpl +0 -60
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query8.tpl +0 -144
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query80.tpl +0 -131
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query81.tpl +0 -68
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query82.tpl +0 -56
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query83.tpl +0 -104
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query84.tpl +0 -58
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query85.tpl +0 -121
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query86.tpl +0 -60
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query87.tpl +0 -56
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query88.tpl +0 -128
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query89.tpl +0 -75
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query9.tpl +0 -88
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query90.tpl +0 -58
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query91.tpl +0 -68
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query92.tpl +0 -68
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query93.tpl +0 -53
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query94.tpl +0 -67
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query95.tpl +0 -71
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query96.tpl +0 -52
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query97.tpl +0 -62
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query98.tpl +0 -70
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/query99.tpl +0 -69
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/sqlserver.tpl +0 -37
- benchbox/_binaries/tpc-ds/windows-x86_64/query_templates/templates.lst +0 -99
- benchbox-0.1.0.dist-info/RECORD +0 -1192
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/README +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/ansi.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/db2.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/netezza.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/oracle.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query1.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query10.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query11.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query12.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query13.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query14.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query15.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query16.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query17.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query18.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query19.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query2.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query20.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query21.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query22.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query23.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query24.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query25.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query26.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query27.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query28.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query29.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query3.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query30.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query31.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query32.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query33.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query34.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query35.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query36.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query37.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query38.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query39.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query4.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query40.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query41.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query42.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query43.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query44.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query45.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query46.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query47.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query48.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query49.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query5.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query50.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query51.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query52.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query53.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query54.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query55.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query56.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query57.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query58.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query59.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query6.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query60.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query61.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query62.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query63.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query64.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query65.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query66.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query67.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query68.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query69.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query7.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query70.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query71.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query73.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query74.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query75.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query76.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query77.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query78.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query79.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query8.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query80.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query81.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query82.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query83.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query84.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query85.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query86.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query87.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query88.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query89.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query9.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query90.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query91.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query92.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query93.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query94.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query95.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query96.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query97.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query98.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/query99.tpl +0 -0
- /benchbox/_binaries/tpc-ds/{darwin-arm64 → templates}/query_templates/templates.lst +0 -0
- {benchbox-0.1.0.dist-info → benchbox-0.1.1.dist-info}/entry_points.txt +0 -0
- {benchbox-0.1.0.dist-info → benchbox-0.1.1.dist-info}/licenses/LICENSE +0 -0
- {benchbox-0.1.0.dist-info → benchbox-0.1.1.dist-info}/top_level.txt +0 -0
benchbox/mcp/tools/results.py
CHANGED
|
@@ -9,6 +9,9 @@ Licensed under the MIT License. See LICENSE file in the project root for details
|
|
|
9
9
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
|
+
import csv
|
|
13
|
+
import html
|
|
14
|
+
import io
|
|
12
15
|
import json
|
|
13
16
|
import logging
|
|
14
17
|
from pathlib import Path
|
|
@@ -17,6 +20,7 @@ from typing import Any
|
|
|
17
20
|
from mcp.server.fastmcp import FastMCP
|
|
18
21
|
from mcp.types import ToolAnnotations
|
|
19
22
|
|
|
23
|
+
from benchbox.core.results.loader import ResultLoadError, UnsupportedSchemaError, load_result_file
|
|
20
24
|
from benchbox.mcp.errors import ErrorCode, make_error
|
|
21
25
|
|
|
22
26
|
logger = logging.getLogger(__name__)
|
|
@@ -30,585 +34,380 @@ RESULTS_READONLY_ANNOTATIONS = ToolAnnotations(
|
|
|
30
34
|
openWorldHint=False,
|
|
31
35
|
)
|
|
32
36
|
|
|
37
|
+
# Tool annotations for export (creates files)
|
|
38
|
+
EXPORT_ANNOTATIONS = ToolAnnotations(
|
|
39
|
+
title="Export benchmark results",
|
|
40
|
+
readOnlyHint=False,
|
|
41
|
+
destructiveHint=False,
|
|
42
|
+
idempotentHint=True,
|
|
43
|
+
openWorldHint=False,
|
|
44
|
+
)
|
|
33
45
|
|
|
34
46
|
# Default results directory
|
|
35
47
|
DEFAULT_RESULTS_DIR = Path("benchmark_runs/results")
|
|
36
48
|
|
|
37
49
|
|
|
38
|
-
def _get_results_impl(result_file: str, include_queries: bool = True) -> dict[str, Any]:
|
|
39
|
-
"""Core implementation for getting benchmark results.
|
|
40
|
-
|
|
41
|
-
This is extracted to allow reuse by other tools without MCP wrapper issues.
|
|
42
|
-
"""
|
|
43
|
-
results_dir = DEFAULT_RESULTS_DIR
|
|
44
|
-
file_path = results_dir / result_file
|
|
45
|
-
|
|
46
|
-
if not file_path.exists():
|
|
47
|
-
# Try without directory prefix
|
|
48
|
-
if not result_file.endswith(".json"):
|
|
49
|
-
result_file += ".json"
|
|
50
|
-
file_path = results_dir / result_file
|
|
51
|
-
|
|
52
|
-
if not file_path.exists():
|
|
53
|
-
return make_error(
|
|
54
|
-
ErrorCode.RESOURCE_NOT_FOUND,
|
|
55
|
-
f"Result file not found: {result_file}",
|
|
56
|
-
details={"requested_file": result_file},
|
|
57
|
-
suggestion="Use list_recent_runs() to see available result files",
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
try:
|
|
61
|
-
with open(file_path) as f:
|
|
62
|
-
data = json.load(f)
|
|
63
|
-
|
|
64
|
-
response: dict[str, Any] = {
|
|
65
|
-
"file": file_path.name,
|
|
66
|
-
"platform": data.get("platform", {}),
|
|
67
|
-
"benchmark": data.get("benchmark"),
|
|
68
|
-
"scale_factor": data.get("scale_factor"),
|
|
69
|
-
"timestamp": data.get("timestamp"),
|
|
70
|
-
"execution_id": data.get("execution_id"),
|
|
71
|
-
"system": data.get("system", {}),
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
# Add summary
|
|
75
|
-
if "summary" in data:
|
|
76
|
-
response["summary"] = data["summary"]
|
|
77
|
-
|
|
78
|
-
# Add query results if requested
|
|
79
|
-
if include_queries and "phases" in data:
|
|
80
|
-
query_results = []
|
|
81
|
-
for phase_name, phase_data in data.get("phases", {}).items():
|
|
82
|
-
if "queries" in phase_data:
|
|
83
|
-
for query in phase_data["queries"]:
|
|
84
|
-
query_results.append(
|
|
85
|
-
{
|
|
86
|
-
"phase": phase_name,
|
|
87
|
-
"query_id": query.get("query_id"),
|
|
88
|
-
"runtime_ms": query.get("runtime_ms"),
|
|
89
|
-
"status": query.get("status"),
|
|
90
|
-
}
|
|
91
|
-
)
|
|
92
|
-
response["queries"] = query_results
|
|
93
|
-
response["query_count"] = len(query_results)
|
|
94
|
-
|
|
95
|
-
return response
|
|
96
|
-
|
|
97
|
-
except json.JSONDecodeError as e:
|
|
98
|
-
return make_error(
|
|
99
|
-
ErrorCode.RESOURCE_INVALID_FORMAT,
|
|
100
|
-
f"Invalid JSON in result file: {e}",
|
|
101
|
-
details={"file": result_file, "parse_error": str(e)},
|
|
102
|
-
)
|
|
103
|
-
except Exception as e:
|
|
104
|
-
return make_error(
|
|
105
|
-
ErrorCode.INTERNAL_ERROR,
|
|
106
|
-
f"Could not read result file: {e}",
|
|
107
|
-
details={"file": result_file, "exception_type": type(e).__name__},
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
|
|
111
50
|
def register_results_tools(mcp: FastMCP) -> None:
|
|
112
|
-
"""Register results tools with the MCP server.
|
|
113
|
-
|
|
114
|
-
Args:
|
|
115
|
-
mcp: The FastMCP server instance to register tools with.
|
|
116
|
-
"""
|
|
51
|
+
"""Register results tools with the MCP server."""
|
|
117
52
|
|
|
118
53
|
@mcp.tool(annotations=RESULTS_READONLY_ANNOTATIONS)
|
|
119
|
-
def
|
|
54
|
+
def get_results(
|
|
55
|
+
result_file: str | None = None,
|
|
56
|
+
format: str = "details",
|
|
57
|
+
output_path: str | None = None,
|
|
120
58
|
limit: int = 10,
|
|
121
59
|
platform: str | None = None,
|
|
122
60
|
benchmark: str | None = None,
|
|
61
|
+
include_queries: bool = True,
|
|
123
62
|
) -> dict[str, Any]:
|
|
124
|
-
"""
|
|
125
|
-
|
|
126
|
-
Searches for benchmark result files and returns metadata about recent runs.
|
|
63
|
+
"""Get benchmark results or list recent runs.
|
|
127
64
|
|
|
128
65
|
Args:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
66
|
+
result_file: Result filename (omit to list recent runs)
|
|
67
|
+
format: Output format: 'list', 'details', 'json', 'csv', 'html', 'text', 'markdown'
|
|
68
|
+
output_path: File path for export (relative to results dir)
|
|
69
|
+
limit: Max results when listing (default: 10)
|
|
70
|
+
platform: Filter by platform name (for listing)
|
|
71
|
+
benchmark: Filter by benchmark name (for listing)
|
|
72
|
+
include_queries: Include per-query details (default: True)
|
|
132
73
|
|
|
133
74
|
Returns:
|
|
134
|
-
List of
|
|
135
|
-
|
|
136
|
-
Example:
|
|
137
|
-
list_recent_runs(limit=5, platform="duckdb")
|
|
75
|
+
List of runs, full results, or exported content.
|
|
138
76
|
"""
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
return {
|
|
143
|
-
"runs": [],
|
|
144
|
-
"count": 0,
|
|
145
|
-
"message": f"No results directory found at {results_dir}",
|
|
146
|
-
}
|
|
77
|
+
# If no result_file, list recent runs
|
|
78
|
+
if result_file is None or format == "list":
|
|
79
|
+
return _list_recent_runs_impl(limit, platform, benchmark)
|
|
147
80
|
|
|
148
|
-
#
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
for file_path in sorted(result_files, key=lambda p: p.stat().st_mtime, reverse=True):
|
|
153
|
-
try:
|
|
154
|
-
with open(file_path) as f:
|
|
155
|
-
data = json.load(f)
|
|
156
|
-
|
|
157
|
-
# Extract metadata
|
|
158
|
-
run_platform = data.get("platform", {}).get("type", "unknown")
|
|
159
|
-
run_benchmark = data.get("benchmark", "unknown")
|
|
160
|
-
|
|
161
|
-
# Apply filters
|
|
162
|
-
if platform and platform.lower() not in run_platform.lower():
|
|
163
|
-
continue
|
|
164
|
-
if benchmark and benchmark.lower() not in run_benchmark.lower():
|
|
165
|
-
continue
|
|
166
|
-
|
|
167
|
-
run_info = {
|
|
168
|
-
"file": file_path.name,
|
|
169
|
-
"platform": run_platform,
|
|
170
|
-
"benchmark": run_benchmark,
|
|
171
|
-
"scale_factor": data.get("scale_factor", "unknown"),
|
|
172
|
-
"timestamp": data.get("timestamp", file_path.stat().st_mtime),
|
|
173
|
-
"execution_id": data.get("execution_id", "unknown"),
|
|
174
|
-
}
|
|
81
|
+
# Get results for specific file
|
|
82
|
+
results = _get_results_impl(result_file, include_queries)
|
|
83
|
+
if "error" in results:
|
|
84
|
+
return results
|
|
175
85
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
86
|
+
# Handle different output formats
|
|
87
|
+
format_lower = format.lower()
|
|
88
|
+
if format_lower == "details":
|
|
89
|
+
return results
|
|
90
|
+
elif format_lower in ("json", "csv", "html"):
|
|
91
|
+
return _export_results_impl(results, result_file, format_lower, output_path)
|
|
92
|
+
elif format_lower in ("text", "markdown"):
|
|
93
|
+
return _export_summary_impl(results, format_lower)
|
|
94
|
+
else:
|
|
95
|
+
return make_error(
|
|
96
|
+
ErrorCode.VALIDATION_INVALID_FORMAT,
|
|
97
|
+
f"Invalid format: {format}",
|
|
98
|
+
details={"valid_formats": ["list", "details", "json", "csv", "html", "text", "markdown"]},
|
|
99
|
+
)
|
|
182
100
|
|
|
183
|
-
runs.append(run_info)
|
|
184
101
|
|
|
185
|
-
|
|
186
|
-
|
|
102
|
+
def _list_recent_runs_impl(
|
|
103
|
+
limit: int,
|
|
104
|
+
platform: str | None,
|
|
105
|
+
benchmark: str | None,
|
|
106
|
+
) -> dict[str, Any]:
|
|
107
|
+
"""List recent benchmark runs."""
|
|
108
|
+
results_dir = DEFAULT_RESULTS_DIR
|
|
187
109
|
|
|
188
|
-
|
|
189
|
-
|
|
110
|
+
if not results_dir.exists():
|
|
111
|
+
return {"runs": [], "count": 0, "message": f"No results directory found at {results_dir}"}
|
|
112
|
+
|
|
113
|
+
result_files = [
|
|
114
|
+
path
|
|
115
|
+
for path in results_dir.glob("*.json")
|
|
116
|
+
if not path.name.endswith(".plans.json") and not path.name.endswith(".tuning.json")
|
|
117
|
+
]
|
|
118
|
+
|
|
119
|
+
runs = []
|
|
120
|
+
for file_path in sorted(result_files, key=lambda p: p.stat().st_mtime, reverse=True):
|
|
121
|
+
try:
|
|
122
|
+
with open(file_path) as f:
|
|
123
|
+
data = json.load(f)
|
|
124
|
+
|
|
125
|
+
run_platform = data.get("platform", {}).get("name", "unknown")
|
|
126
|
+
benchmark_block = data.get("benchmark", {}) if isinstance(data.get("benchmark"), dict) else {}
|
|
127
|
+
run_benchmark = benchmark_block.get("id", "unknown")
|
|
128
|
+
run_scale = benchmark_block.get("scale_factor")
|
|
129
|
+
run_timestamp = data.get("run", {}).get("timestamp", file_path.stat().st_mtime)
|
|
130
|
+
run_execution_id = data.get("run", {}).get("id", "unknown")
|
|
131
|
+
|
|
132
|
+
if platform and platform.lower() not in run_platform.lower():
|
|
133
|
+
continue
|
|
134
|
+
if benchmark and benchmark.lower() not in run_benchmark.lower():
|
|
190
135
|
continue
|
|
191
136
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
|
|
200
|
-
},
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
@mcp.tool(annotations=RESULTS_READONLY_ANNOTATIONS)
|
|
204
|
-
def get_results(
|
|
205
|
-
result_file: str,
|
|
206
|
-
include_queries: bool = True,
|
|
207
|
-
) -> dict[str, Any]:
|
|
208
|
-
"""Get detailed results from a benchmark run.
|
|
209
|
-
|
|
210
|
-
Args:
|
|
211
|
-
result_file: Name of the result file (from list_recent_runs)
|
|
212
|
-
include_queries: Whether to include per-query details (default: True)
|
|
213
|
-
|
|
214
|
-
Returns:
|
|
215
|
-
Full benchmark results including configuration and query timings.
|
|
216
|
-
|
|
217
|
-
Example:
|
|
218
|
-
get_results(result_file="tpch_sf001_duckdb_20231201_120000.json")
|
|
219
|
-
"""
|
|
220
|
-
return _get_results_impl(result_file, include_queries)
|
|
221
|
-
|
|
222
|
-
@mcp.tool(annotations=RESULTS_READONLY_ANNOTATIONS)
|
|
223
|
-
def compare_results(
|
|
224
|
-
file1: str,
|
|
225
|
-
file2: str,
|
|
226
|
-
threshold_percent: float = 10.0,
|
|
227
|
-
) -> dict[str, Any]:
|
|
228
|
-
"""Compare two benchmark runs to identify performance changes.
|
|
229
|
-
|
|
230
|
-
Compares query execution times between two runs and highlights
|
|
231
|
-
regressions (slowdowns) and improvements.
|
|
137
|
+
run_info = {
|
|
138
|
+
"file": file_path.name,
|
|
139
|
+
"platform": run_platform,
|
|
140
|
+
"benchmark": run_benchmark,
|
|
141
|
+
"scale_factor": run_scale if run_scale is not None else "unknown",
|
|
142
|
+
"timestamp": run_timestamp,
|
|
143
|
+
"execution_id": run_execution_id,
|
|
144
|
+
}
|
|
232
145
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
146
|
+
if "summary" in data:
|
|
147
|
+
summary = data["summary"]
|
|
148
|
+
timing = summary.get("timing", {})
|
|
149
|
+
queries = summary.get("queries", {})
|
|
150
|
+
run_info["summary"] = {
|
|
151
|
+
"total_queries": queries.get("total"),
|
|
152
|
+
"total_runtime_ms": timing.get("total_ms"),
|
|
153
|
+
}
|
|
237
154
|
|
|
238
|
-
|
|
239
|
-
Comparison results with per-query deltas and summary.
|
|
155
|
+
runs.append(run_info)
|
|
240
156
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
"""
|
|
244
|
-
results_dir = DEFAULT_RESULTS_DIR
|
|
245
|
-
|
|
246
|
-
# Load both files
|
|
247
|
-
def load_result(filename: str) -> dict | None:
|
|
248
|
-
path = results_dir / filename
|
|
249
|
-
if not path.exists() and not filename.endswith(".json"):
|
|
250
|
-
path = results_dir / (filename + ".json")
|
|
251
|
-
if not path.exists():
|
|
252
|
-
return None
|
|
253
|
-
with open(path) as f:
|
|
254
|
-
return json.load(f)
|
|
255
|
-
|
|
256
|
-
data1 = load_result(file1)
|
|
257
|
-
data2 = load_result(file2)
|
|
258
|
-
|
|
259
|
-
if data1 is None:
|
|
260
|
-
return make_error(
|
|
261
|
-
ErrorCode.RESOURCE_NOT_FOUND,
|
|
262
|
-
f"Baseline file not found: {file1}",
|
|
263
|
-
details={"file_type": "baseline", "requested_file": file1},
|
|
264
|
-
suggestion="Use list_recent_runs() to see available result files",
|
|
265
|
-
)
|
|
266
|
-
if data2 is None:
|
|
267
|
-
return make_error(
|
|
268
|
-
ErrorCode.RESOURCE_NOT_FOUND,
|
|
269
|
-
f"Comparison file not found: {file2}",
|
|
270
|
-
details={"file_type": "comparison", "requested_file": file2},
|
|
271
|
-
suggestion="Use list_recent_runs() to see available result files",
|
|
272
|
-
)
|
|
157
|
+
if len(runs) >= limit:
|
|
158
|
+
break
|
|
273
159
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
for phase_data in data.get("phases", {}).values():
|
|
278
|
-
for query in phase_data.get("queries", []):
|
|
279
|
-
qid = query.get("query_id")
|
|
280
|
-
runtime = query.get("runtime_ms")
|
|
281
|
-
if qid and runtime is not None:
|
|
282
|
-
timings[qid] = runtime
|
|
283
|
-
return timings
|
|
284
|
-
|
|
285
|
-
timings1 = extract_timings(data1)
|
|
286
|
-
timings2 = extract_timings(data2)
|
|
287
|
-
|
|
288
|
-
# Compare queries
|
|
289
|
-
all_queries = set(timings1.keys()) | set(timings2.keys())
|
|
290
|
-
comparisons = []
|
|
291
|
-
regressions = []
|
|
292
|
-
improvements = []
|
|
293
|
-
|
|
294
|
-
for qid in sorted(all_queries):
|
|
295
|
-
t1 = timings1.get(qid)
|
|
296
|
-
t2 = timings2.get(qid)
|
|
297
|
-
|
|
298
|
-
comp = {"query_id": qid, "baseline_ms": t1, "comparison_ms": t2}
|
|
299
|
-
|
|
300
|
-
if t1 is not None and t2 is not None and t1 > 0:
|
|
301
|
-
delta_ms = t2 - t1
|
|
302
|
-
delta_pct = (delta_ms / t1) * 100
|
|
303
|
-
comp["delta_ms"] = round(delta_ms, 2)
|
|
304
|
-
comp["delta_percent"] = round(delta_pct, 2)
|
|
305
|
-
|
|
306
|
-
if delta_pct > threshold_percent:
|
|
307
|
-
comp["status"] = "regression"
|
|
308
|
-
regressions.append(qid)
|
|
309
|
-
elif delta_pct < -threshold_percent:
|
|
310
|
-
comp["status"] = "improvement"
|
|
311
|
-
improvements.append(qid)
|
|
312
|
-
else:
|
|
313
|
-
comp["status"] = "stable"
|
|
314
|
-
else:
|
|
315
|
-
comp["status"] = "missing_data"
|
|
316
|
-
|
|
317
|
-
comparisons.append(comp)
|
|
318
|
-
|
|
319
|
-
# Calculate total runtime delta
|
|
320
|
-
total1 = sum(timings1.values())
|
|
321
|
-
total2 = sum(timings2.values())
|
|
322
|
-
total_delta_pct = ((total2 - total1) / total1 * 100) if total1 > 0 else 0
|
|
323
|
-
|
|
324
|
-
return {
|
|
325
|
-
"baseline": {
|
|
326
|
-
"file": file1,
|
|
327
|
-
"platform": data1.get("platform", {}).get("type"),
|
|
328
|
-
"benchmark": data1.get("benchmark"),
|
|
329
|
-
"total_runtime_ms": round(total1, 2),
|
|
330
|
-
},
|
|
331
|
-
"comparison": {
|
|
332
|
-
"file": file2,
|
|
333
|
-
"platform": data2.get("platform", {}).get("type"),
|
|
334
|
-
"benchmark": data2.get("benchmark"),
|
|
335
|
-
"total_runtime_ms": round(total2, 2),
|
|
336
|
-
},
|
|
337
|
-
"summary": {
|
|
338
|
-
"total_delta_percent": round(total_delta_pct, 2),
|
|
339
|
-
"regressions": len(regressions),
|
|
340
|
-
"improvements": len(improvements),
|
|
341
|
-
"stable": len(comparisons) - len(regressions) - len(improvements),
|
|
342
|
-
"threshold_percent": threshold_percent,
|
|
343
|
-
},
|
|
344
|
-
"regressions": regressions,
|
|
345
|
-
"improvements": improvements,
|
|
346
|
-
"query_comparisons": comparisons,
|
|
347
|
-
}
|
|
160
|
+
except Exception as e:
|
|
161
|
+
logger.warning(f"Could not parse result file {file_path}: {e}")
|
|
162
|
+
continue
|
|
348
163
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
164
|
+
return {
|
|
165
|
+
"runs": runs,
|
|
166
|
+
"count": len(runs),
|
|
167
|
+
"total_available": len(result_files),
|
|
168
|
+
"filters_applied": {"platform": platform, "benchmark": benchmark, "limit": limit},
|
|
169
|
+
}
|
|
355
170
|
|
|
356
|
-
Args:
|
|
357
|
-
result_file: Name of the result file
|
|
358
|
-
format: Output format ('text', 'markdown', or 'json')
|
|
359
171
|
|
|
360
|
-
|
|
361
|
-
|
|
172
|
+
def _get_results_impl(result_file: str, include_queries: bool = True) -> dict[str, Any]:
|
|
173
|
+
"""Core implementation for getting benchmark results."""
|
|
174
|
+
results_dir = DEFAULT_RESULTS_DIR
|
|
175
|
+
file_path = results_dir / result_file
|
|
362
176
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
177
|
+
if not file_path.exists():
|
|
178
|
+
if not result_file.endswith(".json"):
|
|
179
|
+
result_file += ".json"
|
|
180
|
+
file_path = results_dir / result_file
|
|
367
181
|
|
|
368
|
-
|
|
369
|
-
|
|
182
|
+
if not file_path.exists():
|
|
183
|
+
return make_error(
|
|
184
|
+
ErrorCode.RESOURCE_NOT_FOUND,
|
|
185
|
+
f"Result file not found: {result_file}",
|
|
186
|
+
details={"requested_file": result_file},
|
|
187
|
+
suggestion="Use get_results() without result_file to list available files",
|
|
188
|
+
)
|
|
370
189
|
|
|
371
|
-
|
|
372
|
-
|
|
190
|
+
try:
|
|
191
|
+
_, data = load_result_file(file_path)
|
|
192
|
+
response: dict[str, Any] = data
|
|
193
|
+
response["file"] = file_path.name
|
|
194
|
+
if not include_queries and "queries" in response:
|
|
195
|
+
response = dict(response)
|
|
196
|
+
response.pop("queries", None)
|
|
197
|
+
return response
|
|
373
198
|
|
|
374
|
-
|
|
375
|
-
|
|
199
|
+
except FileNotFoundError:
|
|
200
|
+
return make_error(
|
|
201
|
+
ErrorCode.RESOURCE_NOT_FOUND,
|
|
202
|
+
f"Result file not found: {result_file}",
|
|
203
|
+
details={"requested_file": result_file},
|
|
204
|
+
)
|
|
205
|
+
except (ResultLoadError, UnsupportedSchemaError) as e:
|
|
206
|
+
return make_error(
|
|
207
|
+
ErrorCode.RESOURCE_INVALID_FORMAT,
|
|
208
|
+
f"Invalid result file: {e}",
|
|
209
|
+
details={"file": result_file, "parse_error": str(e)},
|
|
210
|
+
)
|
|
211
|
+
except Exception as e:
|
|
212
|
+
return make_error(
|
|
213
|
+
ErrorCode.INTERNAL_ERROR,
|
|
214
|
+
f"Could not read result file: {e}",
|
|
215
|
+
details={"file": result_file, "exception_type": type(e).__name__},
|
|
216
|
+
)
|
|
376
217
|
|
|
377
|
-
if format == "markdown":
|
|
378
|
-
lines.append(f"# Benchmark Results: {results.get('benchmark', 'Unknown')}")
|
|
379
|
-
lines.append("")
|
|
380
|
-
lines.append(f"**Platform**: {results.get('platform', {}).get('type', 'Unknown')}")
|
|
381
|
-
lines.append(f"**Scale Factor**: {results.get('scale_factor', 'Unknown')}")
|
|
382
|
-
lines.append(f"**Execution ID**: {results.get('execution_id', 'Unknown')}")
|
|
383
|
-
lines.append("")
|
|
384
218
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
219
|
+
def _export_results_impl(
|
|
220
|
+
results: dict[str, Any],
|
|
221
|
+
result_file: str,
|
|
222
|
+
format: str,
|
|
223
|
+
output_path: str | None,
|
|
224
|
+
) -> dict[str, Any]:
|
|
225
|
+
"""Export results to JSON, CSV, or HTML format."""
|
|
226
|
+
content: str = ""
|
|
227
|
+
|
|
228
|
+
if format == "json":
|
|
229
|
+
content = json.dumps(results, indent=2, default=str)
|
|
230
|
+
|
|
231
|
+
elif format == "csv":
|
|
232
|
+
output = io.StringIO()
|
|
233
|
+
queries = results.get("queries", [])
|
|
234
|
+
|
|
235
|
+
if queries:
|
|
236
|
+
fieldnames = ["query_id", "runtime_ms", "status"]
|
|
237
|
+
writer = csv.DictWriter(output, fieldnames=fieldnames)
|
|
238
|
+
writer.writeheader()
|
|
239
|
+
for q in queries:
|
|
240
|
+
writer.writerow(
|
|
241
|
+
{
|
|
242
|
+
"query_id": q.get("id", ""),
|
|
243
|
+
"runtime_ms": q.get("ms", ""),
|
|
244
|
+
"status": q.get("status", ""),
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
content = output.getvalue()
|
|
402
248
|
else:
|
|
403
|
-
|
|
404
|
-
lines.append(f"Benchmark Results: {results.get('benchmark', 'Unknown')}")
|
|
405
|
-
lines.append(f"Platform: {results.get('platform', {}).get('type', 'Unknown')}")
|
|
406
|
-
lines.append(f"Scale Factor: {results.get('scale_factor', 'Unknown')}")
|
|
407
|
-
lines.append("")
|
|
408
|
-
|
|
409
|
-
if "summary" in results:
|
|
410
|
-
summary = results["summary"]
|
|
411
|
-
lines.append("Summary:")
|
|
412
|
-
lines.append(f" Total Queries: {summary.get('total_queries', 'N/A')}")
|
|
413
|
-
lines.append(f" Total Runtime: {summary.get('total_runtime_ms', 'N/A')} ms")
|
|
414
|
-
|
|
415
|
-
return {
|
|
416
|
-
"format": format,
|
|
417
|
-
"content": "\n".join(lines),
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
# Tool annotations for export (creates files)
|
|
421
|
-
EXPORT_ANNOTATIONS = ToolAnnotations(
|
|
422
|
-
title="Export benchmark results",
|
|
423
|
-
readOnlyHint=False, # Can create output files
|
|
424
|
-
destructiveHint=False,
|
|
425
|
-
idempotentHint=True,
|
|
426
|
-
openWorldHint=False,
|
|
427
|
-
)
|
|
428
|
-
|
|
429
|
-
@mcp.tool(annotations=EXPORT_ANNOTATIONS)
|
|
430
|
-
def export_results(
|
|
431
|
-
result_file: str,
|
|
432
|
-
format: str = "json",
|
|
433
|
-
output_path: str | None = None,
|
|
434
|
-
) -> dict[str, Any]:
|
|
435
|
-
"""Export benchmark results to different formats.
|
|
249
|
+
content = "query_id,runtime_ms,status\n"
|
|
436
250
|
|
|
437
|
-
|
|
438
|
-
|
|
251
|
+
elif format == "html":
|
|
252
|
+
content = _generate_html_report(results)
|
|
439
253
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
output_path: Optional file path to write output (relative to results dir)
|
|
444
|
-
|
|
445
|
-
Returns:
|
|
446
|
-
Export status with content or file path.
|
|
447
|
-
|
|
448
|
-
Example:
|
|
449
|
-
export_results(result_file="run.json", format="csv")
|
|
450
|
-
export_results(result_file="run.json", format="html", output_path="report.html")
|
|
451
|
-
"""
|
|
452
|
-
import csv
|
|
453
|
-
import html
|
|
454
|
-
import io
|
|
455
|
-
|
|
456
|
-
# Validate format
|
|
457
|
-
valid_formats = ["json", "csv", "html"]
|
|
458
|
-
if format.lower() not in valid_formats:
|
|
254
|
+
# Write to file if output_path provided
|
|
255
|
+
if output_path:
|
|
256
|
+
if ".." in output_path or output_path.startswith("/"):
|
|
459
257
|
return make_error(
|
|
460
|
-
ErrorCode.
|
|
461
|
-
|
|
462
|
-
details={"
|
|
463
|
-
suggestion=
|
|
258
|
+
ErrorCode.VALIDATION_ERROR,
|
|
259
|
+
"Invalid output path",
|
|
260
|
+
details={"path": output_path},
|
|
261
|
+
suggestion="Use a relative path without '..' components",
|
|
464
262
|
)
|
|
465
263
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
format_lower = format.lower()
|
|
473
|
-
content: str = ""
|
|
474
|
-
|
|
475
|
-
if format_lower == "json":
|
|
476
|
-
content = json.dumps(results, indent=2, default=str)
|
|
477
|
-
|
|
478
|
-
elif format_lower == "csv":
|
|
479
|
-
# Export query-level results as CSV
|
|
480
|
-
output = io.StringIO()
|
|
481
|
-
queries = results.get("queries", [])
|
|
482
|
-
|
|
483
|
-
if queries:
|
|
484
|
-
fieldnames = ["query_id", "phase", "runtime_ms", "status"]
|
|
485
|
-
writer = csv.DictWriter(output, fieldnames=fieldnames)
|
|
486
|
-
writer.writeheader()
|
|
487
|
-
for q in queries:
|
|
488
|
-
writer.writerow(
|
|
489
|
-
{
|
|
490
|
-
"query_id": q.get("query_id", ""),
|
|
491
|
-
"phase": q.get("phase", ""),
|
|
492
|
-
"runtime_ms": q.get("runtime_ms", ""),
|
|
493
|
-
"status": q.get("status", ""),
|
|
494
|
-
}
|
|
495
|
-
)
|
|
496
|
-
content = output.getvalue()
|
|
497
|
-
else:
|
|
498
|
-
content = "query_id,phase,runtime_ms,status\n"
|
|
499
|
-
|
|
500
|
-
elif format_lower == "html":
|
|
501
|
-
# Generate HTML report with XSS prevention via html.escape()
|
|
502
|
-
esc = html.escape # Shorthand for readability
|
|
503
|
-
platform_type = esc(str(results.get("platform", {}).get("type", "Unknown")))
|
|
504
|
-
benchmark_name = esc(str(results.get("benchmark", "Unknown")))
|
|
505
|
-
scale_factor = esc(str(results.get("scale_factor", "Unknown")))
|
|
506
|
-
execution_id = esc(str(results.get("execution_id", "Unknown")))
|
|
507
|
-
|
|
508
|
-
html_parts = [
|
|
509
|
-
"<!DOCTYPE html>",
|
|
510
|
-
"<html><head>",
|
|
511
|
-
f"<title>Benchmark Results: {benchmark_name}</title>",
|
|
512
|
-
"<style>",
|
|
513
|
-
"body { font-family: -apple-system, BlinkMacSystemFont, sans-serif; margin: 40px; }",
|
|
514
|
-
"h1 { color: #333; }",
|
|
515
|
-
"table { border-collapse: collapse; width: 100%; margin-top: 20px; }",
|
|
516
|
-
"th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }",
|
|
517
|
-
"th { background-color: #4CAF50; color: white; }",
|
|
518
|
-
"tr:nth-child(even) { background-color: #f2f2f2; }",
|
|
519
|
-
".summary { background: #f8f9fa; padding: 15px; border-radius: 5px; margin: 20px 0; }",
|
|
520
|
-
"</style>",
|
|
521
|
-
"</head><body>",
|
|
522
|
-
f"<h1>Benchmark Results: {benchmark_name}</h1>",
|
|
523
|
-
"<div class='summary'>",
|
|
524
|
-
f"<p><strong>Platform:</strong> {platform_type}</p>",
|
|
525
|
-
f"<p><strong>Scale Factor:</strong> {scale_factor}</p>",
|
|
526
|
-
f"<p><strong>Execution ID:</strong> {execution_id}</p>",
|
|
527
|
-
]
|
|
528
|
-
|
|
529
|
-
if "summary" in results:
|
|
530
|
-
summary = results["summary"]
|
|
531
|
-
total_queries = esc(str(summary.get("total_queries", "N/A")))
|
|
532
|
-
total_runtime = esc(str(summary.get("total_runtime_ms", "N/A")))
|
|
533
|
-
html_parts.append(f"<p><strong>Total Queries:</strong> {total_queries}</p>")
|
|
534
|
-
html_parts.append(f"<p><strong>Total Runtime:</strong> {total_runtime} ms</p>")
|
|
535
|
-
|
|
536
|
-
html_parts.append("</div>")
|
|
537
|
-
|
|
538
|
-
# Query results table
|
|
539
|
-
queries = results.get("queries", [])
|
|
540
|
-
if queries:
|
|
541
|
-
html_parts.extend(
|
|
542
|
-
[
|
|
543
|
-
"<h2>Query Results</h2>",
|
|
544
|
-
"<table>",
|
|
545
|
-
"<tr><th>Query</th><th>Phase</th><th>Runtime (ms)</th><th>Status</th></tr>",
|
|
546
|
-
]
|
|
547
|
-
)
|
|
548
|
-
for q in queries:
|
|
549
|
-
q_id = esc(str(q.get("query_id", "")))
|
|
550
|
-
q_phase = esc(str(q.get("phase", "")))
|
|
551
|
-
q_runtime = esc(str(q.get("runtime_ms", "")))
|
|
552
|
-
q_status = esc(str(q.get("status", "")))
|
|
553
|
-
html_parts.append(
|
|
554
|
-
f"<tr><td>{q_id}</td><td>{q_phase}</td><td>{q_runtime}</td><td>{q_status}</td></tr>"
|
|
555
|
-
)
|
|
556
|
-
html_parts.append("</table>")
|
|
557
|
-
|
|
558
|
-
html_parts.extend(["</body></html>"])
|
|
559
|
-
content = "\n".join(html_parts)
|
|
560
|
-
|
|
561
|
-
# Write to file if output_path provided
|
|
562
|
-
if output_path:
|
|
563
|
-
# Validate output path (prevent path traversal)
|
|
564
|
-
# First: simple string checks
|
|
565
|
-
if ".." in output_path or output_path.startswith("/"):
|
|
264
|
+
output_file = DEFAULT_RESULTS_DIR / output_path
|
|
265
|
+
try:
|
|
266
|
+
results_dir_resolved = DEFAULT_RESULTS_DIR.resolve()
|
|
267
|
+
output_file_resolved = output_file.resolve()
|
|
268
|
+
if not str(output_file_resolved).startswith(str(results_dir_resolved)):
|
|
566
269
|
return make_error(
|
|
567
270
|
ErrorCode.VALIDATION_ERROR,
|
|
568
|
-
"
|
|
271
|
+
"Output path escapes allowed directory",
|
|
569
272
|
details={"path": output_path},
|
|
570
|
-
suggestion="Use a relative path without '..' components",
|
|
571
273
|
)
|
|
274
|
+
except Exception:
|
|
275
|
+
pass
|
|
572
276
|
|
|
573
|
-
|
|
574
|
-
output_file =
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
try:
|
|
590
|
-
output_file.parent.mkdir(parents=True, exist_ok=True)
|
|
591
|
-
output_file.write_text(content)
|
|
592
|
-
return {
|
|
593
|
-
"status": "exported",
|
|
594
|
-
"format": format_lower,
|
|
595
|
-
"source_file": result_file,
|
|
596
|
-
"output_path": str(output_file),
|
|
597
|
-
"size_bytes": len(content),
|
|
598
|
-
}
|
|
599
|
-
except Exception as e:
|
|
600
|
-
return make_error(
|
|
601
|
-
ErrorCode.INTERNAL_ERROR,
|
|
602
|
-
f"Failed to write output file: {e}",
|
|
603
|
-
details={"output_path": output_path, "exception_type": type(e).__name__},
|
|
604
|
-
)
|
|
277
|
+
try:
|
|
278
|
+
output_file.parent.mkdir(parents=True, exist_ok=True)
|
|
279
|
+
output_file.write_text(content)
|
|
280
|
+
return {
|
|
281
|
+
"status": "exported",
|
|
282
|
+
"format": format,
|
|
283
|
+
"source_file": result_file,
|
|
284
|
+
"output_path": str(output_file),
|
|
285
|
+
"size_bytes": len(content),
|
|
286
|
+
}
|
|
287
|
+
except Exception as e:
|
|
288
|
+
return make_error(
|
|
289
|
+
ErrorCode.INTERNAL_ERROR,
|
|
290
|
+
f"Failed to write output file: {e}",
|
|
291
|
+
details={"output_path": output_path, "exception_type": type(e).__name__},
|
|
292
|
+
)
|
|
605
293
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
294
|
+
return {
|
|
295
|
+
"status": "exported",
|
|
296
|
+
"format": format,
|
|
297
|
+
"source_file": result_file,
|
|
298
|
+
"content": content if len(content) < 50000 else content[:50000] + "\n... (truncated)",
|
|
299
|
+
"size_bytes": len(content),
|
|
300
|
+
"truncated": len(content) >= 50000,
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
def _generate_html_report(results: dict[str, Any]) -> str:
|
|
305
|
+
"""Generate HTML report with XSS prevention."""
|
|
306
|
+
esc = html.escape
|
|
307
|
+
benchmark = results.get("benchmark", {})
|
|
308
|
+
platform_type = esc(str(results.get("platform", {}).get("name", "Unknown")))
|
|
309
|
+
benchmark_name = esc(str(benchmark.get("name") or benchmark.get("id") or "Unknown"))
|
|
310
|
+
scale_factor = esc(str(benchmark.get("scale_factor", "Unknown")))
|
|
311
|
+
execution_id = esc(str(results.get("run", {}).get("id", "Unknown")))
|
|
312
|
+
|
|
313
|
+
html_parts = [
|
|
314
|
+
"<!DOCTYPE html>",
|
|
315
|
+
"<html><head>",
|
|
316
|
+
f"<title>Benchmark Results: {benchmark_name}</title>",
|
|
317
|
+
"<style>",
|
|
318
|
+
"body { font-family: -apple-system, BlinkMacSystemFont, sans-serif; margin: 40px; }",
|
|
319
|
+
"h1 { color: #333; }",
|
|
320
|
+
"table { border-collapse: collapse; width: 100%; margin-top: 20px; }",
|
|
321
|
+
"th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }",
|
|
322
|
+
"th { background-color: #4CAF50; color: white; }",
|
|
323
|
+
"tr:nth-child(even) { background-color: #f2f2f2; }",
|
|
324
|
+
".summary { background: #f8f9fa; padding: 15px; border-radius: 5px; margin: 20px 0; }",
|
|
325
|
+
"</style>",
|
|
326
|
+
"</head><body>",
|
|
327
|
+
f"<h1>Benchmark Results: {benchmark_name}</h1>",
|
|
328
|
+
"<div class='summary'>",
|
|
329
|
+
f"<p><strong>Platform:</strong> {platform_type}</p>",
|
|
330
|
+
f"<p><strong>Scale Factor:</strong> {scale_factor}</p>",
|
|
331
|
+
f"<p><strong>Execution ID:</strong> {execution_id}</p>",
|
|
332
|
+
]
|
|
333
|
+
|
|
334
|
+
if "summary" in results:
|
|
335
|
+
summary = results["summary"]
|
|
336
|
+
queries_summary = summary.get("queries", {})
|
|
337
|
+
timing = summary.get("timing", {})
|
|
338
|
+
total_queries = esc(str(queries_summary.get("total", "N/A")))
|
|
339
|
+
total_runtime = esc(str(timing.get("total_ms", "N/A")))
|
|
340
|
+
html_parts.append(f"<p><strong>Total Queries:</strong> {total_queries}</p>")
|
|
341
|
+
html_parts.append(f"<p><strong>Total Runtime:</strong> {total_runtime} ms</p>")
|
|
342
|
+
|
|
343
|
+
html_parts.append("</div>")
|
|
344
|
+
|
|
345
|
+
queries = results.get("queries", [])
|
|
346
|
+
if queries:
|
|
347
|
+
html_parts.extend(
|
|
348
|
+
[
|
|
349
|
+
"<h2>Query Results</h2>",
|
|
350
|
+
"<table>",
|
|
351
|
+
"<tr><th>Query</th><th>Runtime (ms)</th><th>Status</th></tr>",
|
|
352
|
+
]
|
|
353
|
+
)
|
|
354
|
+
for q in queries:
|
|
355
|
+
q_id = esc(str(q.get("id", "")))
|
|
356
|
+
q_runtime = esc(str(q.get("ms", "")))
|
|
357
|
+
q_status = esc(str(q.get("status", "")))
|
|
358
|
+
html_parts.append(f"<tr><td>{q_id}</td><td>{q_runtime}</td><td>{q_status}</td></tr>")
|
|
359
|
+
html_parts.append("</table>")
|
|
360
|
+
|
|
361
|
+
html_parts.extend(["</body></html>"])
|
|
362
|
+
return "\n".join(html_parts)
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
def _export_summary_impl(results: dict[str, Any], format: str) -> dict[str, Any]:
|
|
366
|
+
"""Export formatted summary of benchmark results."""
|
|
367
|
+
lines = []
|
|
368
|
+
|
|
369
|
+
if format == "markdown":
|
|
370
|
+
benchmark = results.get("benchmark", {})
|
|
371
|
+
benchmark_name = benchmark.get("name") or benchmark.get("id") or "Unknown"
|
|
372
|
+
lines.append(f"# Benchmark Results: {benchmark_name}")
|
|
373
|
+
lines.append("")
|
|
374
|
+
lines.append(f"**Platform**: {results.get('platform', {}).get('name', 'Unknown')}")
|
|
375
|
+
lines.append(f"**Scale Factor**: {benchmark.get('scale_factor', 'Unknown')}")
|
|
376
|
+
lines.append(f"**Execution ID**: {results.get('run', {}).get('id', 'Unknown')}")
|
|
377
|
+
lines.append("")
|
|
378
|
+
|
|
379
|
+
if "summary" in results:
|
|
380
|
+
summary = results["summary"]
|
|
381
|
+
queries = summary.get("queries", {})
|
|
382
|
+
timing = summary.get("timing", {})
|
|
383
|
+
lines.append("## Summary")
|
|
384
|
+
lines.append("")
|
|
385
|
+
lines.append(f"- Total Queries: {queries.get('total', 'N/A')}")
|
|
386
|
+
lines.append(f"- Total Runtime: {timing.get('total_ms', 'N/A')} ms")
|
|
387
|
+
lines.append("")
|
|
388
|
+
|
|
389
|
+
if "queries" in results:
|
|
390
|
+
lines.append("## Query Results")
|
|
391
|
+
lines.append("")
|
|
392
|
+
lines.append("| Query | Runtime (ms) | Status |")
|
|
393
|
+
lines.append("|-------|-------------|--------|")
|
|
394
|
+
for q in results.get("queries", [])[:20]:
|
|
395
|
+
lines.append(f"| {q.get('id', 'N/A')} | {q.get('ms', 'N/A')} | {q.get('status', 'N/A')} |")
|
|
396
|
+
else:
|
|
397
|
+
# Plain text format
|
|
398
|
+
benchmark = results.get("benchmark", {})
|
|
399
|
+
benchmark_name = benchmark.get("name") or benchmark.get("id") or "Unknown"
|
|
400
|
+
lines.append(f"Benchmark Results: {benchmark_name}")
|
|
401
|
+
lines.append(f"Platform: {results.get('platform', {}).get('name', 'Unknown')}")
|
|
402
|
+
lines.append(f"Scale Factor: {benchmark.get('scale_factor', 'Unknown')}")
|
|
403
|
+
lines.append("")
|
|
404
|
+
|
|
405
|
+
if "summary" in results:
|
|
406
|
+
summary = results["summary"]
|
|
407
|
+
queries = summary.get("queries", {})
|
|
408
|
+
timing = summary.get("timing", {})
|
|
409
|
+
lines.append("Summary:")
|
|
410
|
+
lines.append(f" Total Queries: {queries.get('total', 'N/A')}")
|
|
411
|
+
lines.append(f" Total Runtime: {timing.get('total_ms', 'N/A')} ms")
|
|
412
|
+
|
|
413
|
+
return {"format": format, "content": "\n".join(lines)}
|