@rawsql-ts/ztd-cli 0.20.0 → 0.20.2
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.
- package/LICENSE +21 -0
- package/dist/commands/agents.d.ts +2 -0
- package/dist/commands/agents.js +68 -0
- package/dist/commands/agents.js.map +1 -0
- package/dist/commands/checkContract.d.ts +46 -0
- package/dist/commands/checkContract.js +359 -0
- package/dist/commands/checkContract.js.map +1 -0
- package/dist/commands/connectionOptions.d.ts +12 -0
- package/dist/commands/connectionOptions.js +22 -0
- package/dist/commands/connectionOptions.js.map +1 -0
- package/dist/commands/ddl.d.ts +7 -0
- package/dist/commands/ddl.js +145 -0
- package/dist/commands/ddl.js.map +1 -0
- package/dist/commands/describe.d.ts +23 -0
- package/dist/commands/describe.js +399 -0
- package/dist/commands/describe.js.map +1 -0
- package/dist/commands/diff.d.ts +24 -0
- package/dist/commands/diff.js +73 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/genEntities.d.ts +14 -0
- package/dist/commands/genEntities.js +58 -0
- package/dist/commands/genEntities.js.map +1 -0
- package/dist/commands/init.d.ts +104 -0
- package/dist/commands/init.js +1480 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/lint.d.ts +89 -0
- package/dist/commands/lint.js +501 -0
- package/dist/commands/lint.js.map +1 -0
- package/dist/commands/modelGen.d.ts +60 -0
- package/dist/commands/modelGen.js +572 -0
- package/dist/commands/modelGen.js.map +1 -0
- package/dist/commands/options.d.ts +9 -0
- package/dist/commands/options.js +48 -0
- package/dist/commands/options.js.map +1 -0
- package/dist/commands/perf.d.ts +9 -0
- package/dist/commands/perf.js +374 -0
- package/dist/commands/perf.js.map +1 -0
- package/dist/commands/pull.d.ts +21 -0
- package/dist/commands/pull.js +115 -0
- package/dist/commands/pull.js.map +1 -0
- package/dist/commands/query.d.ts +9 -0
- package/dist/commands/query.js +377 -0
- package/dist/commands/query.js.map +1 -0
- package/dist/commands/testEvidence.d.ts +237 -0
- package/dist/commands/testEvidence.js +1220 -0
- package/dist/commands/testEvidence.js.map +1 -0
- package/dist/commands/ztdConfig.d.ts +30 -0
- package/dist/commands/ztdConfig.js +224 -0
- package/dist/commands/ztdConfig.js.map +1 -0
- package/dist/commands/ztdConfigCommand.d.ts +18 -0
- package/dist/commands/ztdConfigCommand.js +268 -0
- package/dist/commands/ztdConfigCommand.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -0
- package/dist/perf/benchmark.d.ts +277 -0
- package/dist/perf/benchmark.js +2186 -0
- package/dist/perf/benchmark.js.map +1 -0
- package/dist/perf/sandbox.d.ts +73 -0
- package/dist/perf/sandbox.js +492 -0
- package/dist/perf/sandbox.js.map +1 -0
- package/dist/query/analysis.d.ts +20 -0
- package/dist/query/analysis.js +192 -0
- package/dist/query/analysis.js.map +1 -0
- package/dist/query/analyzeColumnUsage.d.ts +10 -0
- package/dist/query/analyzeColumnUsage.js +451 -0
- package/dist/query/analyzeColumnUsage.js.map +1 -0
- package/dist/query/analyzeTableUsage.d.ts +10 -0
- package/dist/query/analyzeTableUsage.js +318 -0
- package/dist/query/analyzeTableUsage.js.map +1 -0
- package/dist/query/execute.d.ts +40 -0
- package/dist/query/execute.js +784 -0
- package/dist/query/execute.js.map +1 -0
- package/dist/query/format.d.ts +1 -0
- package/dist/query/format.js +9 -0
- package/dist/query/format.js.map +1 -0
- package/dist/query/lint.d.ts +29 -0
- package/dist/query/lint.js +340 -0
- package/dist/query/lint.js.map +1 -0
- package/dist/query/location.d.ts +18 -0
- package/dist/query/location.js +204 -0
- package/dist/query/location.js.map +1 -0
- package/dist/query/patch.d.ts +21 -0
- package/dist/query/patch.js +151 -0
- package/dist/query/patch.js.map +1 -0
- package/dist/query/planner.d.ts +31 -0
- package/dist/query/planner.js +134 -0
- package/dist/query/planner.js.map +1 -0
- package/dist/query/report.d.ts +7 -0
- package/dist/query/report.js +19 -0
- package/dist/query/report.js.map +1 -0
- package/dist/query/scalarFilterAnalysis.d.ts +6 -0
- package/dist/query/scalarFilterAnalysis.js +212 -0
- package/dist/query/scalarFilterAnalysis.js.map +1 -0
- package/dist/query/slice.d.ts +17 -0
- package/dist/query/slice.js +204 -0
- package/dist/query/slice.js.map +1 -0
- package/dist/query/structure.d.ts +24 -0
- package/dist/query/structure.js +135 -0
- package/dist/query/structure.js.map +1 -0
- package/dist/query/targets.d.ts +2 -0
- package/dist/query/targets.js +6 -0
- package/dist/query/targets.js.map +1 -0
- package/dist/query/types.d.ts +97 -0
- package/dist/query/types.js +3 -0
- package/dist/query/types.js.map +1 -0
- package/dist/specs/sql/activeOrders.catalog.d.ts +12 -0
- package/dist/specs/sql/activeOrders.catalog.js +36 -0
- package/dist/specs/sql/activeOrders.catalog.js.map +1 -0
- package/dist/specs/sql/usersList.catalog.d.ts +8 -0
- package/dist/specs/sql/usersList.catalog.js +14 -0
- package/dist/specs/sql/usersList.catalog.js.map +1 -0
- package/dist/specs/sqlCatalogDefinition.d.ts +20 -0
- package/dist/specs/sqlCatalogDefinition.js +10 -0
- package/dist/specs/sqlCatalogDefinition.js.map +1 -0
- package/dist/utils/agentCli.d.ts +23 -0
- package/dist/utils/agentCli.js +84 -0
- package/dist/utils/agentCli.js.map +1 -0
- package/dist/utils/agentSafety.d.ts +4 -0
- package/dist/utils/agentSafety.js +50 -0
- package/dist/utils/agentSafety.js.map +1 -0
- package/dist/utils/agents.d.ts +31 -0
- package/dist/utils/agents.js +362 -0
- package/dist/utils/agents.js.map +1 -0
- package/dist/utils/collectSqlFiles.d.ts +9 -0
- package/dist/utils/collectSqlFiles.js +58 -0
- package/dist/utils/collectSqlFiles.js.map +1 -0
- package/dist/utils/connectionSummary.d.ts +3 -0
- package/dist/utils/connectionSummary.js +29 -0
- package/dist/utils/connectionSummary.js.map +1 -0
- package/dist/utils/dbConnection.d.ts +31 -0
- package/dist/utils/dbConnection.js +151 -0
- package/dist/utils/dbConnection.js.map +1 -0
- package/dist/utils/fs.d.ts +1 -0
- package/dist/utils/fs.js +12 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/modelGenBinder.d.ts +8 -0
- package/dist/utils/modelGenBinder.js +31 -0
- package/dist/utils/modelGenBinder.js.map +1 -0
- package/dist/utils/modelGenRender.d.ts +29 -0
- package/dist/utils/modelGenRender.js +158 -0
- package/dist/utils/modelGenRender.js.map +1 -0
- package/dist/utils/modelGenScanner.d.ts +24 -0
- package/dist/utils/modelGenScanner.js +196 -0
- package/dist/utils/modelGenScanner.js.map +1 -0
- package/dist/utils/modelProbe.d.ts +14 -0
- package/dist/utils/modelProbe.js +121 -0
- package/dist/utils/modelProbe.js.map +1 -0
- package/dist/utils/normalizePulledSchema.d.ts +12 -0
- package/dist/utils/normalizePulledSchema.js +213 -0
- package/dist/utils/normalizePulledSchema.js.map +1 -0
- package/dist/utils/optionalDependencies.d.ts +43 -0
- package/dist/utils/optionalDependencies.js +134 -0
- package/dist/utils/optionalDependencies.js.map +1 -0
- package/dist/utils/pgDump.d.ts +12 -0
- package/dist/utils/pgDump.js +58 -0
- package/dist/utils/pgDump.js.map +1 -0
- package/dist/utils/queryFingerprint.d.ts +14 -0
- package/dist/utils/queryFingerprint.js +34 -0
- package/dist/utils/queryFingerprint.js.map +1 -0
- package/dist/utils/sqlCatalogDiscovery.d.ts +44 -0
- package/dist/utils/sqlCatalogDiscovery.js +166 -0
- package/dist/utils/sqlCatalogDiscovery.js.map +1 -0
- package/dist/utils/sqlCatalogStatements.d.ts +20 -0
- package/dist/utils/sqlCatalogStatements.js +23 -0
- package/dist/utils/sqlCatalogStatements.js.map +1 -0
- package/dist/utils/sqlLintHelpers.d.ts +18 -0
- package/dist/utils/sqlLintHelpers.js +270 -0
- package/dist/utils/sqlLintHelpers.js.map +1 -0
- package/dist/utils/telemetry.d.ts +71 -0
- package/dist/utils/telemetry.js +597 -0
- package/dist/utils/telemetry.js.map +1 -0
- package/dist/utils/typeMapper.d.ts +4 -0
- package/dist/utils/typeMapper.js +79 -0
- package/dist/utils/typeMapper.js.map +1 -0
- package/dist/utils/ztdProjectConfig.d.ts +41 -0
- package/dist/utils/ztdProjectConfig.js +182 -0
- package/dist/utils/ztdProjectConfig.js.map +1 -0
- package/package.json +19 -20
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { type PlaceholderMode } from '../utils/modelGenScanner';
|
|
2
|
+
import { type QueryPipelineStep } from '../query/planner';
|
|
3
|
+
import { type PerfDdlInventory, type PerfSeedConfig } from './sandbox';
|
|
4
|
+
export type PerfBenchmarkMode = 'auto' | 'latency' | 'completion';
|
|
5
|
+
export type PerfSelectedBenchmarkMode = 'latency' | 'completion';
|
|
6
|
+
export type PerfBenchmarkFormat = 'text' | 'json';
|
|
7
|
+
export type PerfExecutionStrategy = 'direct' | 'decomposed';
|
|
8
|
+
export type PerfStatementRole = 'materialize' | 'scalar-filter-bind' | 'final-query';
|
|
9
|
+
export type PerfRecommendedActionName = 'consider-pipeline-materialization' | 'review-index-coverage' | 'inspect-join-strategy' | 'stabilize-completion-run' | 'capture-perf-evidence' | 'increase-perf-fixture-scale' | 'consider-scalar-filter-binding';
|
|
10
|
+
export interface PerfRunOptions {
|
|
11
|
+
rootDir: string;
|
|
12
|
+
queryFile: string;
|
|
13
|
+
paramsFile?: string;
|
|
14
|
+
strategy: PerfExecutionStrategy;
|
|
15
|
+
material: string[];
|
|
16
|
+
mode: PerfBenchmarkMode;
|
|
17
|
+
repeat: number;
|
|
18
|
+
warmup: number;
|
|
19
|
+
classifyThresholdSeconds: number;
|
|
20
|
+
timeoutMinutes: number;
|
|
21
|
+
save: boolean;
|
|
22
|
+
dryRun: boolean;
|
|
23
|
+
label?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface PerfStatementReport {
|
|
26
|
+
seq: number;
|
|
27
|
+
role: PerfStatementRole;
|
|
28
|
+
target?: string;
|
|
29
|
+
sql: string;
|
|
30
|
+
bindings: unknown[] | Record<string, unknown> | undefined;
|
|
31
|
+
resolved_sql_preview?: string;
|
|
32
|
+
row_count?: number;
|
|
33
|
+
elapsed_ms?: number;
|
|
34
|
+
timed_out?: boolean;
|
|
35
|
+
plan_summary?: PerfPlanSummary | null;
|
|
36
|
+
sql_file?: string;
|
|
37
|
+
resolved_sql_preview_file?: string;
|
|
38
|
+
plan_file?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface PerfPlanSummary {
|
|
41
|
+
node_type?: string;
|
|
42
|
+
join_type?: string;
|
|
43
|
+
total_cost?: number;
|
|
44
|
+
plan_rows?: number;
|
|
45
|
+
actual_rows?: number;
|
|
46
|
+
actual_total_time?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface PerfStrategyMetadata {
|
|
49
|
+
materialized_ctes: string[];
|
|
50
|
+
scalar_filter_columns: string[];
|
|
51
|
+
planned_steps: Array<{
|
|
52
|
+
step: number;
|
|
53
|
+
kind: QueryPipelineStep['kind'];
|
|
54
|
+
target: string;
|
|
55
|
+
depends_on: string[];
|
|
56
|
+
}>;
|
|
57
|
+
}
|
|
58
|
+
export interface PerfPipelineCandidate {
|
|
59
|
+
name: string;
|
|
60
|
+
downstream_references: number;
|
|
61
|
+
reasons: string[];
|
|
62
|
+
}
|
|
63
|
+
export interface PerfPipelineAnalysis {
|
|
64
|
+
query_type: string;
|
|
65
|
+
cte_count: number;
|
|
66
|
+
should_consider_pipeline: boolean;
|
|
67
|
+
candidate_ctes: PerfPipelineCandidate[];
|
|
68
|
+
scalar_filter_candidates: string[];
|
|
69
|
+
notes: string[];
|
|
70
|
+
}
|
|
71
|
+
export interface PerfRecommendedAction {
|
|
72
|
+
action: PerfRecommendedActionName;
|
|
73
|
+
priority: 'high' | 'medium';
|
|
74
|
+
rationale: string;
|
|
75
|
+
}
|
|
76
|
+
export interface PerfClassificationProbe {
|
|
77
|
+
elapsed_ms: number;
|
|
78
|
+
timed_out: boolean;
|
|
79
|
+
row_count?: number;
|
|
80
|
+
reused_as_warmup?: boolean;
|
|
81
|
+
reused_as_measured_run?: boolean;
|
|
82
|
+
}
|
|
83
|
+
export interface PerfPlanDelta {
|
|
84
|
+
statement_id: string;
|
|
85
|
+
baseline_plan: string;
|
|
86
|
+
candidate_plan: string;
|
|
87
|
+
changed: boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface PerfStatementDelta {
|
|
90
|
+
statement_id: string;
|
|
91
|
+
role: PerfStatementRole;
|
|
92
|
+
baseline_elapsed_ms?: number;
|
|
93
|
+
candidate_elapsed_ms?: number;
|
|
94
|
+
elapsed_delta_ms?: number;
|
|
95
|
+
baseline_row_count?: number;
|
|
96
|
+
candidate_row_count?: number;
|
|
97
|
+
baseline_timed_out?: boolean;
|
|
98
|
+
candidate_timed_out?: boolean;
|
|
99
|
+
}
|
|
100
|
+
interface PerfPlanFacts {
|
|
101
|
+
observations: string[];
|
|
102
|
+
statement_summary: string;
|
|
103
|
+
hasCapturedPlan: boolean;
|
|
104
|
+
hasSequentialScan: boolean;
|
|
105
|
+
hasJoin: boolean;
|
|
106
|
+
}
|
|
107
|
+
export type PerfExpectedScale = 'tiny' | 'small' | 'medium' | 'large' | 'batch';
|
|
108
|
+
export type PerfReviewPolicy = 'none' | 'recommended' | 'strongly-recommended';
|
|
109
|
+
export type PerfEvidenceStatus = 'captured' | 'missing' | 'not-required';
|
|
110
|
+
export type PerfFixtureRowsStatus = 'sufficient' | 'undersized' | 'unknown';
|
|
111
|
+
export interface PerfQuerySpecGuidance {
|
|
112
|
+
spec_id: string;
|
|
113
|
+
spec_file: string;
|
|
114
|
+
expected_scale?: PerfExpectedScale;
|
|
115
|
+
expected_input_rows?: number;
|
|
116
|
+
expected_output_rows?: number;
|
|
117
|
+
review_policy: PerfReviewPolicy;
|
|
118
|
+
evidence_status: PerfEvidenceStatus;
|
|
119
|
+
fixture_rows_available?: number;
|
|
120
|
+
fixture_rows_status: PerfFixtureRowsStatus;
|
|
121
|
+
}
|
|
122
|
+
export interface PerfDdlInventorySummary {
|
|
123
|
+
ddl_files: number;
|
|
124
|
+
ddl_statement_count: number;
|
|
125
|
+
table_count: number;
|
|
126
|
+
index_count: number;
|
|
127
|
+
index_names: string[];
|
|
128
|
+
}
|
|
129
|
+
export type PerfTuningPrimaryPath = 'index' | 'pipeline' | 'capture-plan';
|
|
130
|
+
export interface PerfTuningBranchGuidance {
|
|
131
|
+
recommended: boolean;
|
|
132
|
+
rationale: string[];
|
|
133
|
+
next_steps: string[];
|
|
134
|
+
}
|
|
135
|
+
export interface PerfTuningGuidance {
|
|
136
|
+
primary_path: PerfTuningPrimaryPath;
|
|
137
|
+
requires_captured_plan: boolean;
|
|
138
|
+
index_branch: PerfTuningBranchGuidance;
|
|
139
|
+
pipeline_branch: PerfTuningBranchGuidance;
|
|
140
|
+
}
|
|
141
|
+
export interface PerfTuningSummary {
|
|
142
|
+
headline: string;
|
|
143
|
+
evidence: string[];
|
|
144
|
+
next_step: string;
|
|
145
|
+
}
|
|
146
|
+
export interface PerfBenchmarkReport {
|
|
147
|
+
schema_version: 1;
|
|
148
|
+
command: 'perf run';
|
|
149
|
+
run_id?: string;
|
|
150
|
+
label?: string;
|
|
151
|
+
query_file: string;
|
|
152
|
+
query_type: 'SELECT';
|
|
153
|
+
params_file?: string;
|
|
154
|
+
params_shape: PlaceholderMode;
|
|
155
|
+
ordered_param_names: string[];
|
|
156
|
+
source_sql_file: string;
|
|
157
|
+
source_sql: string;
|
|
158
|
+
bound_sql: string;
|
|
159
|
+
bindings: unknown[] | Record<string, unknown> | undefined;
|
|
160
|
+
strategy: PerfExecutionStrategy;
|
|
161
|
+
strategy_metadata?: PerfStrategyMetadata;
|
|
162
|
+
requested_mode: PerfBenchmarkMode;
|
|
163
|
+
selected_mode: PerfSelectedBenchmarkMode;
|
|
164
|
+
selection_reason: string;
|
|
165
|
+
classify_threshold_ms: number;
|
|
166
|
+
timeout_ms: number;
|
|
167
|
+
database_version?: string;
|
|
168
|
+
dry_run: boolean;
|
|
169
|
+
saved: boolean;
|
|
170
|
+
evidence_dir?: string;
|
|
171
|
+
classification_probe?: PerfClassificationProbe;
|
|
172
|
+
total_elapsed_ms?: number;
|
|
173
|
+
latency_metrics?: {
|
|
174
|
+
measured_runs: number;
|
|
175
|
+
warmup_runs: number;
|
|
176
|
+
min_ms: number;
|
|
177
|
+
max_ms: number;
|
|
178
|
+
avg_ms: number;
|
|
179
|
+
median_ms: number;
|
|
180
|
+
p95_ms: number;
|
|
181
|
+
};
|
|
182
|
+
completion_metrics?: {
|
|
183
|
+
completed: boolean;
|
|
184
|
+
timed_out: boolean;
|
|
185
|
+
wall_time_ms: number;
|
|
186
|
+
};
|
|
187
|
+
executed_statements: PerfStatementReport[];
|
|
188
|
+
plan_summary?: PerfPlanSummary | null;
|
|
189
|
+
plan_observations: string[];
|
|
190
|
+
recommended_actions: PerfRecommendedAction[];
|
|
191
|
+
pipeline_analysis: PerfPipelineAnalysis;
|
|
192
|
+
spec_guidance?: PerfQuerySpecGuidance;
|
|
193
|
+
ddl_inventory?: PerfDdlInventorySummary;
|
|
194
|
+
tuning_guidance?: PerfTuningGuidance;
|
|
195
|
+
tuning_summary?: PerfTuningSummary;
|
|
196
|
+
seed?: Pick<PerfSeedConfig, 'seed'>;
|
|
197
|
+
}
|
|
198
|
+
export interface PerfDiffReport {
|
|
199
|
+
schema_version: 1;
|
|
200
|
+
command: 'perf report diff';
|
|
201
|
+
baseline_run_id?: string;
|
|
202
|
+
candidate_run_id?: string;
|
|
203
|
+
baseline_mode: PerfSelectedBenchmarkMode;
|
|
204
|
+
candidate_mode: PerfSelectedBenchmarkMode;
|
|
205
|
+
baseline_strategy: PerfExecutionStrategy;
|
|
206
|
+
candidate_strategy: PerfExecutionStrategy;
|
|
207
|
+
primary_metric: {
|
|
208
|
+
name: 'p95_ms' | 'wall_time_ms' | 'total_elapsed_ms';
|
|
209
|
+
baseline: number;
|
|
210
|
+
candidate: number;
|
|
211
|
+
improvement_percent: number;
|
|
212
|
+
};
|
|
213
|
+
mode_changed: boolean;
|
|
214
|
+
strategy_changed: boolean;
|
|
215
|
+
statements_delta: number;
|
|
216
|
+
statement_deltas: PerfStatementDelta[];
|
|
217
|
+
plan_deltas: PerfPlanDelta[];
|
|
218
|
+
notes: string[];
|
|
219
|
+
}
|
|
220
|
+
interface StatementExecutionTrace {
|
|
221
|
+
role: PerfStatementRole;
|
|
222
|
+
target: string;
|
|
223
|
+
sql: string;
|
|
224
|
+
bindings: unknown[] | Record<string, unknown> | undefined;
|
|
225
|
+
resolvedSqlPreview?: string;
|
|
226
|
+
elapsedMs: number;
|
|
227
|
+
rowCount?: number;
|
|
228
|
+
timedOut: boolean;
|
|
229
|
+
planJson?: unknown | null;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Execute or plan a perf benchmark against the sandbox using either direct or decomposed execution.
|
|
233
|
+
*/
|
|
234
|
+
export declare function runPerfBenchmark(options: PerfRunOptions): Promise<PerfBenchmarkReport>;
|
|
235
|
+
export declare function toPerfPlannedSteps(steps: Array<{
|
|
236
|
+
kind: PerfStatementRole | QueryPipelineStep['kind'];
|
|
237
|
+
target: string;
|
|
238
|
+
}>): Array<{
|
|
239
|
+
kind: PerfStatementRole;
|
|
240
|
+
target: string;
|
|
241
|
+
}>;
|
|
242
|
+
export declare function mapPipelineStatements(statements: Array<{
|
|
243
|
+
sql: string;
|
|
244
|
+
bindings: unknown[] | Record<string, unknown> | undefined;
|
|
245
|
+
resolvedSqlPreview?: string;
|
|
246
|
+
elapsedMs: number;
|
|
247
|
+
rowCount?: number;
|
|
248
|
+
timedOut: boolean;
|
|
249
|
+
planJson?: unknown | null;
|
|
250
|
+
}>, plannedSteps?: Array<{
|
|
251
|
+
kind: PerfStatementRole;
|
|
252
|
+
target: string;
|
|
253
|
+
}>): StatementExecutionTrace[];
|
|
254
|
+
/**
|
|
255
|
+
* Compare two saved benchmark evidence directories for AI-friendly tuning decisions.
|
|
256
|
+
*/
|
|
257
|
+
export declare function diffPerfBenchmarkReports(baselineDir: string, candidateDir: string): PerfDiffReport;
|
|
258
|
+
/**
|
|
259
|
+
* Render a benchmark report in either text or JSON for humans and agents.
|
|
260
|
+
*/
|
|
261
|
+
export declare function formatPerfBenchmarkReport(report: PerfBenchmarkReport, format: PerfBenchmarkFormat): string;
|
|
262
|
+
export declare function formatPerfDiffReport(report: PerfDiffReport, format: PerfBenchmarkFormat): string;
|
|
263
|
+
export declare function buildPerfPipelineAnalysis(sqlFile: string): PerfPipelineAnalysis;
|
|
264
|
+
/**
|
|
265
|
+
* Load a saved benchmark report from summary.json.
|
|
266
|
+
*/
|
|
267
|
+
export declare function summarizePerfDdlInventory(inventory: PerfDdlInventory): PerfDdlInventorySummary;
|
|
268
|
+
export declare function buildPerfTuningGuidance(pipelineAnalysis: PerfPipelineAnalysis, planFacts: PerfPlanFacts, specGuidance?: PerfQuerySpecGuidance): PerfTuningGuidance;
|
|
269
|
+
export declare function buildPerfTuningSummary(guidance: PerfTuningGuidance): PerfTuningSummary;
|
|
270
|
+
export declare function loadPerfBenchmarkReport(evidenceDir: string): PerfBenchmarkReport;
|
|
271
|
+
export declare const PERF_BENCHMARK_DEFAULTS: {
|
|
272
|
+
readonly repeat: 10;
|
|
273
|
+
readonly warmup: 3;
|
|
274
|
+
readonly classifyThresholdSeconds: 60;
|
|
275
|
+
readonly timeoutMinutes: 5;
|
|
276
|
+
};
|
|
277
|
+
export {};
|