modestbench 0.1.0 → 0.3.0
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/CHANGELOG.md +31 -0
- package/README.md +162 -57
- package/dist/bootstrap.cjs +10 -10
- package/dist/bootstrap.cjs.map +1 -1
- package/dist/bootstrap.d.cts.map +1 -1
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +5 -5
- package/dist/bootstrap.js.map +1 -1
- package/dist/cli/commands/analyze.cjs +60 -0
- package/dist/cli/commands/analyze.cjs.map +1 -0
- package/dist/cli/commands/analyze.d.cts +35 -0
- package/dist/cli/commands/analyze.d.cts.map +1 -0
- package/dist/cli/commands/analyze.d.ts +35 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +56 -0
- package/dist/cli/commands/analyze.js.map +1 -0
- package/dist/cli/commands/baseline.cjs +404 -0
- package/dist/cli/commands/baseline.cjs.map +1 -0
- package/dist/cli/commands/baseline.d.cts +72 -0
- package/dist/cli/commands/baseline.d.cts.map +1 -0
- package/dist/cli/commands/baseline.d.ts +72 -0
- package/dist/cli/commands/baseline.d.ts.map +1 -0
- package/dist/cli/commands/baseline.js +396 -0
- package/dist/cli/commands/baseline.js.map +1 -0
- package/dist/cli/commands/history.cjs +108 -266
- package/dist/cli/commands/history.cjs.map +1 -1
- package/dist/cli/commands/history.d.cts +75 -12
- package/dist/cli/commands/history.d.cts.map +1 -1
- package/dist/cli/commands/history.d.ts +75 -12
- package/dist/cli/commands/history.d.ts.map +1 -1
- package/dist/cli/commands/history.js +105 -268
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/init.cjs +88 -155
- package/dist/cli/commands/init.cjs.map +1 -1
- package/dist/cli/commands/init.d.cts +4 -4
- package/dist/cli/commands/init.d.cts.map +1 -1
- package/dist/cli/commands/init.d.ts +4 -4
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +88 -155
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/run.cjs +143 -112
- package/dist/cli/commands/run.cjs.map +1 -1
- package/dist/cli/commands/run.d.cts +17 -3
- package/dist/cli/commands/run.d.cts.map +1 -1
- package/dist/cli/commands/run.d.ts +17 -3
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +142 -78
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/index.cjs +671 -266
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +4 -16
- package/dist/cli/index.d.cts.map +1 -1
- package/dist/cli/index.d.ts +4 -16
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +664 -259
- package/dist/cli/index.js.map +1 -1
- package/dist/config/budget-schema.cjs +172 -0
- package/dist/config/budget-schema.cjs.map +1 -0
- package/dist/config/budget-schema.d.cts +59 -0
- package/dist/config/budget-schema.d.cts.map +1 -0
- package/dist/config/budget-schema.d.ts +59 -0
- package/dist/config/budget-schema.d.ts.map +1 -0
- package/dist/config/budget-schema.js +166 -0
- package/dist/config/budget-schema.js.map +1 -0
- package/dist/config/schema.cjs +182 -2
- package/dist/config/schema.cjs.map +1 -1
- package/dist/config/schema.d.cts +122 -3
- package/dist/config/schema.d.cts.map +1 -1
- package/dist/config/schema.d.ts +122 -3
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +180 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/constants.cjs +45 -2
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.cts +41 -0
- package/dist/constants.d.cts.map +1 -1
- package/dist/constants.d.ts +41 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +44 -1
- package/dist/constants.js.map +1 -1
- package/dist/core/engine.cjs +104 -15
- package/dist/core/engine.cjs.map +1 -1
- package/dist/core/engine.d.cts +7 -4
- package/dist/core/engine.d.cts.map +1 -1
- package/dist/core/engine.d.ts +7 -4
- package/dist/core/engine.d.ts.map +1 -1
- package/dist/core/engine.js +105 -16
- package/dist/core/engine.js.map +1 -1
- package/dist/core/output-path-resolver.cjs +41 -0
- package/dist/core/output-path-resolver.cjs.map +1 -0
- package/dist/core/output-path-resolver.d.cts +10 -0
- package/dist/core/output-path-resolver.d.cts.map +1 -0
- package/dist/core/output-path-resolver.d.ts +10 -0
- package/dist/core/output-path-resolver.d.ts.map +1 -0
- package/dist/core/output-path-resolver.js +37 -0
- package/dist/core/output-path-resolver.js.map +1 -0
- package/dist/errors/base.cjs +12 -3
- package/dist/errors/base.cjs.map +1 -1
- package/dist/errors/base.d.cts +7 -0
- package/dist/errors/base.d.cts.map +1 -1
- package/dist/errors/base.d.ts +7 -0
- package/dist/errors/base.d.ts.map +1 -1
- package/dist/errors/base.js +10 -2
- package/dist/errors/base.js.map +1 -1
- package/dist/errors/budget.cjs +37 -0
- package/dist/errors/budget.cjs.map +1 -0
- package/dist/errors/budget.d.cts +31 -0
- package/dist/errors/budget.d.cts.map +1 -0
- package/dist/errors/budget.d.ts +31 -0
- package/dist/errors/budget.d.ts.map +1 -0
- package/dist/errors/budget.js +33 -0
- package/dist/errors/budget.js.map +1 -0
- package/dist/errors/index.cjs +4 -1
- package/dist/errors/index.cjs.map +1 -1
- package/dist/errors/index.d.cts +1 -0
- package/dist/errors/index.d.cts.map +1 -1
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +2 -0
- package/dist/errors/index.js.map +1 -1
- package/dist/formatters/history/base.cjs +9 -0
- package/dist/formatters/history/base.cjs.map +1 -0
- package/dist/formatters/history/base.d.cts +26 -0
- package/dist/formatters/history/base.d.cts.map +1 -0
- package/dist/formatters/history/base.d.ts +26 -0
- package/dist/formatters/history/base.d.ts.map +1 -0
- package/dist/formatters/history/base.js +8 -0
- package/dist/formatters/history/base.js.map +1 -0
- package/dist/formatters/history/compare.cjs +127 -0
- package/dist/formatters/history/compare.cjs.map +1 -0
- package/dist/formatters/history/compare.d.cts +21 -0
- package/dist/formatters/history/compare.d.cts.map +1 -0
- package/dist/formatters/history/compare.d.ts +21 -0
- package/dist/formatters/history/compare.d.ts.map +1 -0
- package/dist/formatters/history/compare.js +123 -0
- package/dist/formatters/history/compare.js.map +1 -0
- package/dist/formatters/history/list.cjs +74 -0
- package/dist/formatters/history/list.cjs.map +1 -0
- package/dist/formatters/history/list.d.cts +25 -0
- package/dist/formatters/history/list.d.cts.map +1 -0
- package/dist/formatters/history/list.d.ts +25 -0
- package/dist/formatters/history/list.d.ts.map +1 -0
- package/dist/formatters/history/list.js +70 -0
- package/dist/formatters/history/list.js.map +1 -0
- package/dist/formatters/history/show.cjs +98 -0
- package/dist/formatters/history/show.cjs.map +1 -0
- package/dist/formatters/history/show.d.cts +21 -0
- package/dist/formatters/history/show.d.cts.map +1 -0
- package/dist/formatters/history/show.d.ts +21 -0
- package/dist/formatters/history/show.d.ts.map +1 -0
- package/dist/formatters/history/show.js +94 -0
- package/dist/formatters/history/show.js.map +1 -0
- package/dist/formatters/history/trends.cjs +194 -0
- package/dist/formatters/history/trends.cjs.map +1 -0
- package/dist/formatters/history/trends.d.cts +22 -0
- package/dist/formatters/history/trends.d.cts.map +1 -0
- package/dist/formatters/history/trends.d.ts +22 -0
- package/dist/formatters/history/trends.d.ts.map +1 -0
- package/dist/formatters/history/trends.js +190 -0
- package/dist/formatters/history/trends.js.map +1 -0
- package/dist/formatters/history/visualization.cjs +79 -0
- package/dist/formatters/history/visualization.cjs.map +1 -0
- package/dist/formatters/history/visualization.d.cts +24 -0
- package/dist/formatters/history/visualization.d.cts.map +1 -0
- package/dist/formatters/history/visualization.d.ts +24 -0
- package/dist/formatters/history/visualization.d.ts.map +1 -0
- package/dist/formatters/history/visualization.js +74 -0
- package/dist/formatters/history/visualization.js.map +1 -0
- package/dist/index.cjs +27 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -5
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +10 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -9
- package/dist/index.js.map +1 -1
- package/dist/reporters/csv.cjs +39 -19
- package/dist/reporters/csv.cjs.map +1 -1
- package/dist/reporters/csv.d.cts +4 -7
- package/dist/reporters/csv.d.cts.map +1 -1
- package/dist/reporters/csv.d.ts +4 -7
- package/dist/reporters/csv.d.ts.map +1 -1
- package/dist/reporters/csv.js +38 -18
- package/dist/reporters/csv.js.map +1 -1
- package/dist/reporters/human.cjs +87 -99
- package/dist/reporters/human.cjs.map +1 -1
- package/dist/reporters/human.d.cts +15 -14
- package/dist/reporters/human.d.cts.map +1 -1
- package/dist/reporters/human.d.ts +15 -14
- package/dist/reporters/human.d.ts.map +1 -1
- package/dist/reporters/human.js +68 -80
- package/dist/reporters/human.js.map +1 -1
- package/dist/reporters/json.cjs +25 -50
- package/dist/reporters/json.cjs.map +1 -1
- package/dist/reporters/json.d.cts +3 -29
- package/dist/reporters/json.d.cts.map +1 -1
- package/dist/reporters/json.d.ts +3 -29
- package/dist/reporters/json.d.ts.map +1 -1
- package/dist/reporters/json.js +26 -51
- package/dist/reporters/json.js.map +1 -1
- package/dist/reporters/profile-human.cjs +149 -0
- package/dist/reporters/profile-human.cjs.map +1 -0
- package/dist/reporters/profile-human.d.cts +44 -0
- package/dist/reporters/profile-human.d.cts.map +1 -0
- package/dist/reporters/profile-human.d.ts +44 -0
- package/dist/reporters/profile-human.d.ts.map +1 -0
- package/dist/reporters/profile-human.js +142 -0
- package/dist/reporters/profile-human.js.map +1 -0
- package/dist/reporters/simple.cjs +66 -46
- package/dist/reporters/simple.cjs.map +1 -1
- package/dist/reporters/simple.d.cts +15 -15
- package/dist/reporters/simple.d.cts.map +1 -1
- package/dist/reporters/simple.d.ts +15 -15
- package/dist/reporters/simple.d.ts.map +1 -1
- package/dist/reporters/simple.js +65 -45
- package/dist/reporters/simple.js.map +1 -1
- package/dist/schema/modestbench-config.schema.json +153 -0
- package/dist/services/baseline-storage.cjs +151 -0
- package/dist/services/baseline-storage.cjs.map +1 -0
- package/dist/services/baseline-storage.d.cts +55 -0
- package/dist/services/baseline-storage.d.cts.map +1 -0
- package/dist/services/baseline-storage.d.ts +55 -0
- package/dist/services/baseline-storage.d.ts.map +1 -0
- package/dist/services/baseline-storage.js +147 -0
- package/dist/services/baseline-storage.js.map +1 -0
- package/dist/services/budget-evaluator.cjs +146 -0
- package/dist/services/budget-evaluator.cjs.map +1 -0
- package/dist/services/budget-evaluator.d.cts +29 -0
- package/dist/services/budget-evaluator.d.cts.map +1 -0
- package/dist/services/budget-evaluator.d.ts +29 -0
- package/dist/services/budget-evaluator.d.ts.map +1 -0
- package/dist/services/budget-evaluator.js +142 -0
- package/dist/services/budget-evaluator.js.map +1 -0
- package/dist/{config/manager.cjs → services/config-manager.cjs} +25 -11
- package/dist/services/config-manager.cjs.map +1 -0
- package/dist/{config/manager.d.cts → services/config-manager.d.cts} +7 -2
- package/dist/services/config-manager.d.cts.map +1 -0
- package/dist/{config/manager.d.ts → services/config-manager.d.ts} +7 -2
- package/dist/services/config-manager.d.ts.map +1 -0
- package/dist/{config/manager.js → services/config-manager.js} +25 -11
- package/dist/services/config-manager.js.map +1 -0
- package/dist/{core/loader.cjs → services/file-loader.cjs} +5 -8
- package/dist/services/file-loader.cjs.map +1 -0
- package/dist/{core/loader.d.cts → services/file-loader.d.cts} +1 -1
- package/dist/services/file-loader.d.cts.map +1 -0
- package/dist/{core/loader.d.ts → services/file-loader.d.ts} +1 -1
- package/dist/services/file-loader.d.ts.map +1 -0
- package/dist/{core/loader.js → services/file-loader.js} +5 -8
- package/dist/services/file-loader.js.map +1 -0
- package/dist/services/history/comparison.cjs +124 -0
- package/dist/services/history/comparison.cjs.map +1 -0
- package/dist/services/history/comparison.d.cts +18 -0
- package/dist/services/history/comparison.d.cts.map +1 -0
- package/dist/services/history/comparison.d.ts +18 -0
- package/dist/services/history/comparison.d.ts.map +1 -0
- package/dist/services/history/comparison.js +120 -0
- package/dist/services/history/comparison.js.map +1 -0
- package/dist/services/history/models.cjs +9 -0
- package/dist/services/history/models.cjs.map +1 -0
- package/dist/services/history/models.d.cts +139 -0
- package/dist/services/history/models.d.cts.map +1 -0
- package/dist/services/history/models.d.ts +139 -0
- package/dist/services/history/models.d.ts.map +1 -0
- package/dist/services/history/models.js +8 -0
- package/dist/services/history/models.js.map +1 -0
- package/dist/services/history/query.cjs +97 -0
- package/dist/services/history/query.cjs.map +1 -0
- package/dist/services/history/query.d.cts +38 -0
- package/dist/services/history/query.d.cts.map +1 -0
- package/dist/services/history/query.d.ts +38 -0
- package/dist/services/history/query.d.ts.map +1 -0
- package/dist/services/history/query.js +92 -0
- package/dist/services/history/query.js.map +1 -0
- package/dist/services/history/trend-analysis.cjs +187 -0
- package/dist/services/history/trend-analysis.cjs.map +1 -0
- package/dist/services/history/trend-analysis.d.cts +34 -0
- package/dist/services/history/trend-analysis.d.cts.map +1 -0
- package/dist/services/history/trend-analysis.d.ts +34 -0
- package/dist/services/history/trend-analysis.d.ts.map +1 -0
- package/dist/services/history/trend-analysis.js +179 -0
- package/dist/services/history/trend-analysis.js.map +1 -0
- package/dist/{storage/history.cjs → services/history-storage.cjs} +1 -1
- package/dist/services/history-storage.cjs.map +1 -0
- package/dist/{storage/history.d.cts → services/history-storage.d.cts} +1 -1
- package/dist/services/history-storage.d.cts.map +1 -0
- package/dist/{storage/history.d.ts → services/history-storage.d.ts} +1 -1
- package/dist/services/history-storage.d.ts.map +1 -0
- package/dist/{storage/history.js → services/history-storage.js} +1 -1
- package/dist/services/history-storage.js.map +1 -0
- package/dist/services/profiler/profile-filter.cjs +113 -0
- package/dist/services/profiler/profile-filter.cjs.map +1 -0
- package/dist/services/profiler/profile-filter.d.cts +20 -0
- package/dist/services/profiler/profile-filter.d.cts.map +1 -0
- package/dist/services/profiler/profile-filter.d.ts +20 -0
- package/dist/services/profiler/profile-filter.d.ts.map +1 -0
- package/dist/services/profiler/profile-filter.js +109 -0
- package/dist/services/profiler/profile-filter.js.map +1 -0
- package/dist/services/profiler/profile-parser.cjs +139 -0
- package/dist/services/profiler/profile-parser.cjs.map +1 -0
- package/dist/services/profiler/profile-parser.d.cts +18 -0
- package/dist/services/profiler/profile-parser.d.cts.map +1 -0
- package/dist/services/profiler/profile-parser.d.ts +18 -0
- package/dist/services/profiler/profile-parser.d.ts.map +1 -0
- package/dist/services/profiler/profile-parser.js +132 -0
- package/dist/services/profiler/profile-parser.js.map +1 -0
- package/dist/services/profiler/profile-runner.cjs +90 -0
- package/dist/services/profiler/profile-runner.cjs.map +1 -0
- package/dist/services/profiler/profile-runner.d.cts +29 -0
- package/dist/services/profiler/profile-runner.d.cts.map +1 -0
- package/dist/services/profiler/profile-runner.d.ts +29 -0
- package/dist/services/profiler/profile-runner.d.ts.map +1 -0
- package/dist/services/profiler/profile-runner.js +86 -0
- package/dist/services/profiler/profile-runner.js.map +1 -0
- package/dist/{progress/manager.cjs → services/progress-manager.cjs} +1 -1
- package/dist/services/progress-manager.cjs.map +1 -0
- package/dist/{progress/manager.d.cts → services/progress-manager.d.cts} +1 -1
- package/dist/services/progress-manager.d.cts.map +1 -0
- package/dist/{progress/manager.d.ts → services/progress-manager.d.ts} +1 -1
- package/dist/services/progress-manager.d.ts.map +1 -0
- package/dist/{progress/manager.js → services/progress-manager.js} +1 -1
- package/dist/services/progress-manager.js.map +1 -0
- package/dist/{reporters/registry.cjs → services/reporter-registry.cjs} +19 -25
- package/dist/services/reporter-registry.cjs.map +1 -0
- package/dist/{reporters/registry.d.cts → services/reporter-registry.d.cts} +19 -41
- package/dist/services/reporter-registry.d.cts.map +1 -0
- package/dist/{reporters/registry.d.ts → services/reporter-registry.d.ts} +19 -41
- package/dist/services/reporter-registry.d.ts.map +1 -0
- package/dist/{reporters/registry.js → services/reporter-registry.js} +19 -25
- package/dist/services/reporter-registry.js.map +1 -0
- package/dist/types/budgets.cjs +8 -0
- package/dist/types/budgets.cjs.map +1 -0
- package/dist/types/budgets.d.cts +149 -0
- package/dist/types/budgets.d.cts.map +1 -0
- package/dist/types/budgets.d.ts +149 -0
- package/dist/types/budgets.d.ts.map +1 -0
- package/dist/types/budgets.js +7 -0
- package/dist/types/budgets.js.map +1 -0
- package/dist/types/cli.cjs +2 -11
- package/dist/types/cli.cjs.map +1 -1
- package/dist/types/cli.d.cts +3 -224
- package/dist/types/cli.d.cts.map +1 -1
- package/dist/types/cli.d.ts +3 -224
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/cli.js +2 -11
- package/dist/types/cli.js.map +1 -1
- package/dist/types/core.cjs +6 -1
- package/dist/types/core.cjs.map +1 -1
- package/dist/types/core.d.cts +13 -2
- package/dist/types/core.d.cts.map +1 -1
- package/dist/types/core.d.ts +13 -2
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/core.js +2 -1
- package/dist/types/core.js.map +1 -1
- package/dist/types/index.cjs +5 -0
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +2 -0
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/interfaces.d.cts +15 -8
- package/dist/types/interfaces.d.cts.map +1 -1
- package/dist/types/interfaces.d.ts +15 -8
- package/dist/types/interfaces.d.ts.map +1 -1
- package/dist/types/profiler.cjs +11 -0
- package/dist/types/profiler.cjs.map +1 -0
- package/dist/types/profiler.d.cts +100 -0
- package/dist/types/profiler.d.cts.map +1 -0
- package/dist/types/profiler.d.ts +100 -0
- package/dist/types/profiler.d.ts.map +1 -0
- package/dist/types/profiler.js +10 -0
- package/dist/types/profiler.js.map +1 -0
- package/dist/types/utility.cjs.map +1 -1
- package/dist/types/utility.d.cts +0 -8
- package/dist/types/utility.d.cts.map +1 -1
- package/dist/types/utility.d.ts +0 -8
- package/dist/types/utility.d.ts.map +1 -1
- package/dist/types/utility.js.map +1 -1
- package/dist/utils/ansi.cjs +61 -0
- package/dist/utils/ansi.cjs.map +1 -0
- package/dist/utils/ansi.d.cts +53 -0
- package/dist/utils/ansi.d.cts.map +1 -0
- package/dist/utils/ansi.d.ts +53 -0
- package/dist/utils/ansi.d.ts.map +1 -0
- package/dist/utils/ansi.js +57 -0
- package/dist/utils/ansi.js.map +1 -0
- package/dist/utils/identifiers.cjs +32 -0
- package/dist/utils/identifiers.cjs.map +1 -0
- package/dist/utils/identifiers.d.cts +32 -0
- package/dist/utils/identifiers.d.cts.map +1 -0
- package/dist/utils/identifiers.d.ts +32 -0
- package/dist/utils/identifiers.d.ts.map +1 -0
- package/dist/utils/identifiers.js +27 -0
- package/dist/utils/identifiers.js.map +1 -0
- package/dist/utils/package.cjs +40 -0
- package/dist/utils/package.cjs.map +1 -0
- package/dist/utils/package.d.cts +15 -0
- package/dist/utils/package.d.cts.map +1 -0
- package/dist/utils/package.d.ts +15 -0
- package/dist/utils/package.d.ts.map +1 -0
- package/dist/utils/package.js +33 -0
- package/dist/utils/package.js.map +1 -0
- package/dist/utils/type-guards.cjs +48 -0
- package/dist/utils/type-guards.cjs.map +1 -0
- package/dist/utils/type-guards.d.cts +22 -0
- package/dist/utils/type-guards.d.cts.map +1 -0
- package/dist/utils/type-guards.d.ts +22 -0
- package/dist/utils/type-guards.d.ts.map +1 -0
- package/dist/utils/type-guards.js +43 -0
- package/dist/utils/type-guards.js.map +1 -0
- package/package.json +14 -13
- package/src/bootstrap.ts +5 -5
- package/src/cli/commands/analyze.ts +101 -0
- package/src/cli/commands/baseline.ts +577 -0
- package/src/cli/commands/history.ts +194 -342
- package/src/cli/commands/init.ts +105 -183
- package/src/cli/commands/run.ts +186 -88
- package/src/cli/index.ts +731 -234
- package/src/config/budget-schema.ts +189 -0
- package/src/config/schema.ts +260 -1
- package/src/constants.ts +53 -1
- package/src/core/engine.ts +153 -14
- package/src/core/output-path-resolver.ts +46 -0
- package/src/errors/base.ts +11 -2
- package/src/errors/budget.ts +38 -0
- package/src/errors/index.ts +3 -0
- package/src/formatters/history/base.ts +28 -0
- package/src/formatters/history/compare.ts +186 -0
- package/src/formatters/history/list.ts +101 -0
- package/src/formatters/history/show.ts +155 -0
- package/src/formatters/history/trends.ts +281 -0
- package/src/formatters/history/visualization.ts +93 -0
- package/src/index.ts +17 -12
- package/src/reporters/csv.ts +55 -26
- package/src/reporters/human.ts +90 -89
- package/src/reporters/json.ts +27 -72
- package/src/reporters/profile-human.ts +204 -0
- package/src/reporters/simple.ts +85 -54
- package/src/services/baseline-storage.ts +199 -0
- package/src/services/budget-evaluator.ts +182 -0
- package/src/{config/manager.ts → services/config-manager.ts} +24 -9
- package/src/{core/loader.ts → services/file-loader.ts} +4 -7
- package/src/services/history/comparison.ts +130 -0
- package/src/services/history/models.ts +148 -0
- package/src/services/history/query.ts +116 -0
- package/src/services/history/trend-analysis.ts +238 -0
- package/src/services/profiler/profile-filter.ts +143 -0
- package/src/services/profiler/profile-parser.ts +194 -0
- package/src/services/profiler/profile-runner.ts +121 -0
- package/src/{reporters/registry.ts → services/reporter-registry.ts} +46 -81
- package/src/types/budgets.ts +180 -0
- package/src/types/cli.ts +5 -235
- package/src/types/core.ts +50 -10
- package/src/types/index.ts +5 -0
- package/src/types/interfaces.ts +16 -6
- package/src/types/profiler.ts +132 -0
- package/src/types/utility.ts +0 -10
- package/src/utils/ansi.ts +59 -0
- package/src/utils/identifiers.ts +58 -0
- package/src/utils/package.ts +35 -0
- package/src/utils/type-guards.ts +51 -0
- package/dist/config/manager.cjs.map +0 -1
- package/dist/config/manager.d.cts.map +0 -1
- package/dist/config/manager.d.ts.map +0 -1
- package/dist/config/manager.js.map +0 -1
- package/dist/core/loader.cjs.map +0 -1
- package/dist/core/loader.d.cts.map +0 -1
- package/dist/core/loader.d.ts.map +0 -1
- package/dist/core/loader.js.map +0 -1
- package/dist/progress/manager.cjs.map +0 -1
- package/dist/progress/manager.d.cts.map +0 -1
- package/dist/progress/manager.d.ts.map +0 -1
- package/dist/progress/manager.js.map +0 -1
- package/dist/reporters/registry.cjs.map +0 -1
- package/dist/reporters/registry.d.cts.map +0 -1
- package/dist/reporters/registry.d.ts.map +0 -1
- package/dist/reporters/registry.js.map +0 -1
- package/dist/storage/history.cjs.map +0 -1
- package/dist/storage/history.d.cts.map +0 -1
- package/dist/storage/history.d.ts.map +0 -1
- package/dist/storage/history.js.map +0 -1
- /package/src/{storage/history.ts → services/history-storage.ts} +0 -0
- /package/src/{progress/manager.ts → services/progress-manager.ts} +0 -0
package/dist/reporters/json.js
CHANGED
|
@@ -4,20 +4,39 @@
|
|
|
4
4
|
* Outputs benchmark results in structured JSON format. Suitable for machine
|
|
5
5
|
* processing, CI/CD integration, and data analysis.
|
|
6
6
|
*/
|
|
7
|
-
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
8
|
-
import { dirname } from 'node:path';
|
|
7
|
+
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
8
|
+
import { dirname, join } from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
9
10
|
import { ReporterOutputError } from "../errors/index.js";
|
|
10
|
-
import { BaseReporter } from "
|
|
11
|
+
import { BaseReporter } from "../services/reporter-registry.js";
|
|
12
|
+
/**
|
|
13
|
+
* Cache the package version at module load time
|
|
14
|
+
*
|
|
15
|
+
* NOTE: This relies on package.json being at the same relative path from both
|
|
16
|
+
* src/ and dist/ directories (../../package.json). If the build output
|
|
17
|
+
* structure changes, this will break.
|
|
18
|
+
*/
|
|
19
|
+
const cachedPackageVersion = (() => {
|
|
20
|
+
try {
|
|
21
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
22
|
+
const pkgPath = join(__dirname, '..', '..', 'package.json');
|
|
23
|
+
const pkgContent = readFileSync(pkgPath, 'utf8');
|
|
24
|
+
const pkg = JSON.parse(pkgContent);
|
|
25
|
+
return pkg.version;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// Fallback if package.json cannot be read (shouldn't happen in normal use)
|
|
29
|
+
return 'unknown';
|
|
30
|
+
}
|
|
31
|
+
})();
|
|
11
32
|
/**
|
|
12
33
|
* JSON reporter for structured output
|
|
13
34
|
*/
|
|
14
35
|
export class JsonReporter extends BaseReporter {
|
|
15
|
-
currentRun;
|
|
16
36
|
includeMetadata;
|
|
17
37
|
includeStatistics;
|
|
18
38
|
outputPath;
|
|
19
39
|
prettyPrint;
|
|
20
|
-
quiet;
|
|
21
40
|
statistics = {
|
|
22
41
|
taskCount: 0,
|
|
23
42
|
totalIterations: 0,
|
|
@@ -29,31 +48,6 @@ export class JsonReporter extends BaseReporter {
|
|
|
29
48
|
this.prettyPrint = options.prettyPrint ?? true;
|
|
30
49
|
this.includeStatistics = options.includeStatistics ?? true;
|
|
31
50
|
this.includeMetadata = options.includeMetadata ?? true;
|
|
32
|
-
this.quiet = options.quiet ?? false;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Check if statistics are included
|
|
36
|
-
*/
|
|
37
|
-
areStatisticsIncluded() {
|
|
38
|
-
return this.includeStatistics;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get the output path (if configured)
|
|
42
|
-
*/
|
|
43
|
-
getOutputPath() {
|
|
44
|
-
return this.outputPath;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Check if metadata is included
|
|
48
|
-
*/
|
|
49
|
-
isMetadataIncluded() {
|
|
50
|
-
return this.includeMetadata;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Check if pretty printing is enabled
|
|
54
|
-
*/
|
|
55
|
-
isPrettyPrintEnabled() {
|
|
56
|
-
return this.prettyPrint;
|
|
57
51
|
}
|
|
58
52
|
async onEnd(run) {
|
|
59
53
|
const output = this.buildJsonOutput(run);
|
|
@@ -69,33 +63,14 @@ export class JsonReporter extends BaseReporter {
|
|
|
69
63
|
// but we can also log to stderr for immediate feedback
|
|
70
64
|
console.error('JSON Reporter Error:', error.message);
|
|
71
65
|
}
|
|
72
|
-
|
|
73
|
-
// No-op for JSON reporter
|
|
74
|
-
}
|
|
75
|
-
onFileStart(_file) {
|
|
76
|
-
// No-op for JSON reporter
|
|
77
|
-
}
|
|
78
|
-
onProgress(_state) {
|
|
79
|
-
// No-op for JSON reporter - we don't output progress in JSON format
|
|
80
|
-
}
|
|
81
|
-
onStart(run) {
|
|
82
|
-
this.currentRun = run;
|
|
66
|
+
onStart(_run) {
|
|
83
67
|
this.resetStatistics();
|
|
84
68
|
}
|
|
85
|
-
onSuiteEnd(_result) {
|
|
86
|
-
// No-op for JSON reporter
|
|
87
|
-
}
|
|
88
|
-
onSuiteStart(_suite) {
|
|
89
|
-
// No-op for JSON reporter
|
|
90
|
-
}
|
|
91
69
|
onTaskResult(result) {
|
|
92
70
|
if (!result.error) {
|
|
93
71
|
this.updateStatistics(result);
|
|
94
72
|
}
|
|
95
73
|
}
|
|
96
|
-
onTaskStart(_task) {
|
|
97
|
-
// No-op for JSON reporter
|
|
98
|
-
}
|
|
99
74
|
/**
|
|
100
75
|
* Build the complete JSON output structure
|
|
101
76
|
*/
|
|
@@ -104,7 +79,7 @@ export class JsonReporter extends BaseReporter {
|
|
|
104
79
|
meta: {
|
|
105
80
|
format: 'modestbench-json',
|
|
106
81
|
timestamp: new Date().toISOString(),
|
|
107
|
-
version:
|
|
82
|
+
version: cachedPackageVersion,
|
|
108
83
|
},
|
|
109
84
|
run: this.includeMetadata ? run : this.sanitizeRun(run),
|
|
110
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/reporters/json.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/reporters/json.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,IAAI,EAA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C,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAC9G,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACK,aAAa,CAAC,MAAkB;QACtC,0DAA0D;QAC1D,0EAA0E;QAC1E,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW;YACjC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;YACjC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE3B,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC1B,CAAC;CACF"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Profile Human Reporter
|
|
4
|
+
*
|
|
5
|
+
* Human-readable reporter for profile command. Uses modestbench's synthwave
|
|
6
|
+
* ANSI theme to display profiled functions in an attractive, color-coded
|
|
7
|
+
* format.
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ProfileHumanReporter = void 0;
|
|
16
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
17
|
+
const ansi_js_1 = require("../utils/ansi.cjs");
|
|
18
|
+
/**
|
|
19
|
+
* Human-readable profile reporter
|
|
20
|
+
*/
|
|
21
|
+
class ProfileHumanReporter {
|
|
22
|
+
groupByFile;
|
|
23
|
+
useColor;
|
|
24
|
+
constructor(options = {}) {
|
|
25
|
+
this.useColor =
|
|
26
|
+
options.color ??
|
|
27
|
+
(process.stdout.isTTY &&
|
|
28
|
+
process.env.FORCE_COLOR !== '0' &&
|
|
29
|
+
process.env.NO_COLOR == null);
|
|
30
|
+
this.groupByFile = options.groupByFile ?? false;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Generate and print profile report
|
|
34
|
+
*/
|
|
35
|
+
report(data) {
|
|
36
|
+
this.printHeader(data);
|
|
37
|
+
this.printLine();
|
|
38
|
+
if (this.groupByFile && data.groupedByFile) {
|
|
39
|
+
this.printGroupedResults(data);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
this.printFlatResults(data);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
colorize(color, text) {
|
|
46
|
+
if (!this.useColor) {
|
|
47
|
+
return text;
|
|
48
|
+
}
|
|
49
|
+
return `${ansi_js_1.colors[color]}${text}${ansi_js_1.colors.reset}`;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Format file path - show relative path if within CWD, otherwise absolute
|
|
53
|
+
*/
|
|
54
|
+
formatPath(filePath) {
|
|
55
|
+
const cwd = process.cwd();
|
|
56
|
+
const absolutePath = node_path_1.default.resolve(filePath);
|
|
57
|
+
// Check if the file is within the current working directory
|
|
58
|
+
if (absolutePath.startsWith(cwd + node_path_1.default.sep) || absolutePath === cwd) {
|
|
59
|
+
return node_path_1.default.relative(cwd, absolutePath);
|
|
60
|
+
}
|
|
61
|
+
return absolutePath;
|
|
62
|
+
}
|
|
63
|
+
getPercentColor(percent) {
|
|
64
|
+
if (percent >= 10) {
|
|
65
|
+
return 'brightRed';
|
|
66
|
+
}
|
|
67
|
+
if (percent >= 5) {
|
|
68
|
+
return 'brightYellow';
|
|
69
|
+
}
|
|
70
|
+
if (percent >= 2) {
|
|
71
|
+
return 'brightCyan';
|
|
72
|
+
}
|
|
73
|
+
return 'white';
|
|
74
|
+
}
|
|
75
|
+
printFlatResults(data) {
|
|
76
|
+
const header = `${this.colorize('magenta', ansi_js_1.ansiChars.block.full.repeat(2))} ${this.colorize('brightWhite', this.colorize('bold', 'Benchmark Candidates'))}`;
|
|
77
|
+
this.printLine(header);
|
|
78
|
+
this.printLine();
|
|
79
|
+
this.printLine('Top functions by execution time:');
|
|
80
|
+
this.printLine();
|
|
81
|
+
for (const fn of data.functions) {
|
|
82
|
+
// Function name and percentage
|
|
83
|
+
const percentColor = this.getPercentColor(fn.percentage);
|
|
84
|
+
const percent = `${fn.percentage.toFixed(1)}%`;
|
|
85
|
+
const ticks = `(${fn.ticks.toLocaleString()} ticks)`;
|
|
86
|
+
this.printLine(` ${this.colorize('brightWhite', fn.name).padEnd(60)} ${this.colorize(percentColor, percent.padStart(6))} ${this.colorize('dim', ticks)}`);
|
|
87
|
+
// File and line
|
|
88
|
+
const displayPath = this.formatPath(fn.file);
|
|
89
|
+
const lineInfo = fn.line ? `:${fn.line}` : '';
|
|
90
|
+
this.printLine(` ${this.colorize('brightMagenta', this.colorize('bold', displayPath + lineInfo))}`);
|
|
91
|
+
this.printLine();
|
|
92
|
+
}
|
|
93
|
+
this.printSummary(data);
|
|
94
|
+
}
|
|
95
|
+
printGroupedResults(data) {
|
|
96
|
+
if (!data.groupedByFile) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const header = `${this.colorize('magenta', ansi_js_1.ansiChars.block.full.repeat(2))} ${this.colorize('brightWhite', this.colorize('bold', 'Grouped by File'))}`;
|
|
100
|
+
this.printLine(header);
|
|
101
|
+
this.printLine();
|
|
102
|
+
// Sort files by total percentage
|
|
103
|
+
const sortedFiles = Array.from(data.groupedByFile.entries()).sort((a, b) => {
|
|
104
|
+
const aTotal = a[1].reduce((sum, fn) => sum + fn.percentage, 0);
|
|
105
|
+
const bTotal = b[1].reduce((sum, fn) => sum + fn.percentage, 0);
|
|
106
|
+
return bTotal - aTotal;
|
|
107
|
+
});
|
|
108
|
+
for (const [file, functions] of sortedFiles) {
|
|
109
|
+
const totalPercent = functions.reduce((sum, fn) => sum + fn.percentage, 0);
|
|
110
|
+
const totalTicks = functions.reduce((sum, fn) => sum + fn.ticks, 0);
|
|
111
|
+
const percentColor = this.getPercentColor(totalPercent);
|
|
112
|
+
const percent = `${totalPercent.toFixed(1)}%`;
|
|
113
|
+
const ticks = `(${totalTicks.toLocaleString()} ticks)`;
|
|
114
|
+
// File header
|
|
115
|
+
const displayPath = this.formatPath(file);
|
|
116
|
+
this.printLine(`${this.colorize('magenta', ansi_js_1.ansiChars.block.dark)} ${this.colorize('brightMagenta', this.colorize('bold', displayPath)).padEnd(60)} ${this.colorize(percentColor, percent.padStart(6))} ${this.colorize('dim', ticks)}`);
|
|
117
|
+
// Functions in this file
|
|
118
|
+
for (const fn of functions) {
|
|
119
|
+
const fnPercent = `${fn.percentage.toFixed(1)}%`;
|
|
120
|
+
const fnTicks = `(${fn.ticks.toLocaleString()} ticks)`;
|
|
121
|
+
const lineInfo = fn.line ? `:${fn.line}` : '';
|
|
122
|
+
this.printLine(` ${this.colorize('magenta', ansi_js_1.ansiChars.smallSquare)} ${this.colorize('brightWhite', fn.name).padEnd(58)} ${this.colorize(this.getPercentColor(fn.percentage), fnPercent.padStart(6))} ${this.colorize('dim', fnTicks.padEnd(15))} ${this.colorize('dim', lineInfo)}`);
|
|
123
|
+
}
|
|
124
|
+
this.printLine();
|
|
125
|
+
}
|
|
126
|
+
this.printSummary(data);
|
|
127
|
+
}
|
|
128
|
+
printHeader(data) {
|
|
129
|
+
const header = `${this.colorize('magenta', ansi_js_1.ansiChars.block.full.repeat(2))} ${this.colorize('brightWhite', this.colorize('bold', 'Profile Analysis'))}`;
|
|
130
|
+
this.printLine(header);
|
|
131
|
+
this.printLine();
|
|
132
|
+
if (data.command) {
|
|
133
|
+
this.printLine(`Command: ${this.colorize('cyan', data.command)}`);
|
|
134
|
+
}
|
|
135
|
+
if (data.duration) {
|
|
136
|
+
const durationSec = (data.duration / 1000).toFixed(1);
|
|
137
|
+
this.printLine(`Duration: ${this.colorize('cyan', `${durationSec}s`)}`);
|
|
138
|
+
}
|
|
139
|
+
this.printLine(`Total Ticks: ${this.colorize('cyan', data.totalTicks.toLocaleString())}`);
|
|
140
|
+
}
|
|
141
|
+
printLine(text = '') {
|
|
142
|
+
console.log(text);
|
|
143
|
+
}
|
|
144
|
+
printSummary(data) {
|
|
145
|
+
this.printLine(`${this.colorize('dim', `... (showing top ${data.totalShown} of ${data.totalFiltered} user functions)`)}`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
exports.ProfileHumanReporter = ProfileHumanReporter;
|
|
149
|
+
//# sourceMappingURL=profile-human.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-human.js","sourceRoot":"","sources":["../../src/reporters/profile-human.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;AAEH,0DAA6B;AAI7B,+CAAqD;AAarD;;GAEG;AACH,MAAa,oBAAoB;IACd,WAAW,CAAU;IAErB,QAAQ,CAAU;IAEnC,YAAY,UAAkC,EAAE;QAC9C,IAAI,CAAC,QAAQ;YACX,OAAO,CAAC,KAAK;gBACb,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;oBACnB,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG;oBAC/B,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC;QAElC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,KAAK,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAyB;QAC9B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACvB,IAAI,CAAC,SAAS,EAAE,CAAC;QAEjB,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YAC3C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAEO,QAAQ,CAAC,KAA0B,EAAE,IAAY;QACvD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACn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1E,CAAC;QAED,IAAI,CAAC,SAAS,CACZ,gBAAgB,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,EAAE,CAC1E,CAAC;IACJ,CAAC;IAEO,SAAS,CAAC,IAAI,GAAG,EAAE;QACzB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAEO,YAAY,CAAC,IAAyB;QAC5C,IAAI,CAAC,SAAS,CACZ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,IAAI,CAAC,UAAU,OAAO,IAAI,CAAC,aAAa,kBAAkB,CAAC,EAAE,CAC1G,CAAC;IACJ,CAAC;CACF;AA7KD,oDA6KC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Human Reporter
|
|
3
|
+
*
|
|
4
|
+
* Human-readable reporter for profile command. Uses modestbench's synthwave
|
|
5
|
+
* ANSI theme to display profiled functions in an attractive, color-coded
|
|
6
|
+
* format.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import type { FilteredProfileData } from "../types/profiler.cjs";
|
|
11
|
+
/**
|
|
12
|
+
* Reporter options
|
|
13
|
+
*/
|
|
14
|
+
interface ProfileReporterOptions {
|
|
15
|
+
/** Enable color output */
|
|
16
|
+
color?: boolean;
|
|
17
|
+
/** Group by file */
|
|
18
|
+
groupByFile?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Human-readable profile reporter
|
|
22
|
+
*/
|
|
23
|
+
export declare class ProfileHumanReporter {
|
|
24
|
+
private readonly groupByFile;
|
|
25
|
+
private readonly useColor;
|
|
26
|
+
constructor(options?: ProfileReporterOptions);
|
|
27
|
+
/**
|
|
28
|
+
* Generate and print profile report
|
|
29
|
+
*/
|
|
30
|
+
report(data: FilteredProfileData): void;
|
|
31
|
+
private colorize;
|
|
32
|
+
/**
|
|
33
|
+
* Format file path - show relative path if within CWD, otherwise absolute
|
|
34
|
+
*/
|
|
35
|
+
private formatPath;
|
|
36
|
+
private getPercentColor;
|
|
37
|
+
private printFlatResults;
|
|
38
|
+
private printGroupedResults;
|
|
39
|
+
private printHeader;
|
|
40
|
+
private printLine;
|
|
41
|
+
private printSummary;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=profile-human.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-human.d.ts","sourceRoot":"","sources":["../../src/reporters/profile-human.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,8BAA6B;AAIhE;;GAEG;AACH,UAAU,sBAAsB;IAC9B,0BAA0B;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,oBAAoB;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAU;IAEtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;gBAEvB,OAAO,GAAE,sBAA2B;IAUhD;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI;IAWvC,OAAO,CAAC,QAAQ;IAOhB;;OAEG;IACH,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,gBAAgB;IA6BxB,OAAO,CAAC,mBAAmB;IAoD3B,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,YAAY;CAKrB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Human Reporter
|
|
3
|
+
*
|
|
4
|
+
* Human-readable reporter for profile command. Uses modestbench's synthwave
|
|
5
|
+
* ANSI theme to display profiled functions in an attractive, color-coded
|
|
6
|
+
* format.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import type { FilteredProfileData } from "../types/profiler.js";
|
|
11
|
+
/**
|
|
12
|
+
* Reporter options
|
|
13
|
+
*/
|
|
14
|
+
interface ProfileReporterOptions {
|
|
15
|
+
/** Enable color output */
|
|
16
|
+
color?: boolean;
|
|
17
|
+
/** Group by file */
|
|
18
|
+
groupByFile?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Human-readable profile reporter
|
|
22
|
+
*/
|
|
23
|
+
export declare class ProfileHumanReporter {
|
|
24
|
+
private readonly groupByFile;
|
|
25
|
+
private readonly useColor;
|
|
26
|
+
constructor(options?: ProfileReporterOptions);
|
|
27
|
+
/**
|
|
28
|
+
* Generate and print profile report
|
|
29
|
+
*/
|
|
30
|
+
report(data: FilteredProfileData): void;
|
|
31
|
+
private colorize;
|
|
32
|
+
/**
|
|
33
|
+
* Format file path - show relative path if within CWD, otherwise absolute
|
|
34
|
+
*/
|
|
35
|
+
private formatPath;
|
|
36
|
+
private getPercentColor;
|
|
37
|
+
private printFlatResults;
|
|
38
|
+
private printGroupedResults;
|
|
39
|
+
private printHeader;
|
|
40
|
+
private printLine;
|
|
41
|
+
private printSummary;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=profile-human.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-human.d.ts","sourceRoot":"","sources":["../../src/reporters/profile-human.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,6BAA6B;AAIhE;;GAEG;AACH,UAAU,sBAAsB;IAC9B,0BAA0B;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,oBAAoB;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAU;IAEtC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;gBAEvB,OAAO,GAAE,sBAA2B;IAUhD;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI;IAWvC,OAAO,CAAC,QAAQ;IAOhB;;OAEG;IACH,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,gBAAgB;IA6BxB,OAAO,CAAC,mBAAmB;IAoD3B,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,YAAY;CAKrB"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profile Human Reporter
|
|
3
|
+
*
|
|
4
|
+
* Human-readable reporter for profile command. Uses modestbench's synthwave
|
|
5
|
+
* ANSI theme to display profiled functions in an attractive, color-coded
|
|
6
|
+
* format.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
import { ansiChars, colors } from "../utils/ansi.js";
|
|
12
|
+
/**
|
|
13
|
+
* Human-readable profile reporter
|
|
14
|
+
*/
|
|
15
|
+
export class ProfileHumanReporter {
|
|
16
|
+
groupByFile;
|
|
17
|
+
useColor;
|
|
18
|
+
constructor(options = {}) {
|
|
19
|
+
this.useColor =
|
|
20
|
+
options.color ??
|
|
21
|
+
(process.stdout.isTTY &&
|
|
22
|
+
process.env.FORCE_COLOR !== '0' &&
|
|
23
|
+
process.env.NO_COLOR == null);
|
|
24
|
+
this.groupByFile = options.groupByFile ?? false;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Generate and print profile report
|
|
28
|
+
*/
|
|
29
|
+
report(data) {
|
|
30
|
+
this.printHeader(data);
|
|
31
|
+
this.printLine();
|
|
32
|
+
if (this.groupByFile && data.groupedByFile) {
|
|
33
|
+
this.printGroupedResults(data);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.printFlatResults(data);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
colorize(color, text) {
|
|
40
|
+
if (!this.useColor) {
|
|
41
|
+
return text;
|
|
42
|
+
}
|
|
43
|
+
return `${colors[color]}${text}${colors.reset}`;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Format file path - show relative path if within CWD, otherwise absolute
|
|
47
|
+
*/
|
|
48
|
+
formatPath(filePath) {
|
|
49
|
+
const cwd = process.cwd();
|
|
50
|
+
const absolutePath = path.resolve(filePath);
|
|
51
|
+
// Check if the file is within the current working directory
|
|
52
|
+
if (absolutePath.startsWith(cwd + path.sep) || absolutePath === cwd) {
|
|
53
|
+
return path.relative(cwd, absolutePath);
|
|
54
|
+
}
|
|
55
|
+
return absolutePath;
|
|
56
|
+
}
|
|
57
|
+
getPercentColor(percent) {
|
|
58
|
+
if (percent >= 10) {
|
|
59
|
+
return 'brightRed';
|
|
60
|
+
}
|
|
61
|
+
if (percent >= 5) {
|
|
62
|
+
return 'brightYellow';
|
|
63
|
+
}
|
|
64
|
+
if (percent >= 2) {
|
|
65
|
+
return 'brightCyan';
|
|
66
|
+
}
|
|
67
|
+
return 'white';
|
|
68
|
+
}
|
|
69
|
+
printFlatResults(data) {
|
|
70
|
+
const header = `${this.colorize('magenta', ansiChars.block.full.repeat(2))} ${this.colorize('brightWhite', this.colorize('bold', 'Benchmark Candidates'))}`;
|
|
71
|
+
this.printLine(header);
|
|
72
|
+
this.printLine();
|
|
73
|
+
this.printLine('Top functions by execution time:');
|
|
74
|
+
this.printLine();
|
|
75
|
+
for (const fn of data.functions) {
|
|
76
|
+
// Function name and percentage
|
|
77
|
+
const percentColor = this.getPercentColor(fn.percentage);
|
|
78
|
+
const percent = `${fn.percentage.toFixed(1)}%`;
|
|
79
|
+
const ticks = `(${fn.ticks.toLocaleString()} ticks)`;
|
|
80
|
+
this.printLine(` ${this.colorize('brightWhite', fn.name).padEnd(60)} ${this.colorize(percentColor, percent.padStart(6))} ${this.colorize('dim', ticks)}`);
|
|
81
|
+
// File and line
|
|
82
|
+
const displayPath = this.formatPath(fn.file);
|
|
83
|
+
const lineInfo = fn.line ? `:${fn.line}` : '';
|
|
84
|
+
this.printLine(` ${this.colorize('brightMagenta', this.colorize('bold', displayPath + lineInfo))}`);
|
|
85
|
+
this.printLine();
|
|
86
|
+
}
|
|
87
|
+
this.printSummary(data);
|
|
88
|
+
}
|
|
89
|
+
printGroupedResults(data) {
|
|
90
|
+
if (!data.groupedByFile) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const header = `${this.colorize('magenta', ansiChars.block.full.repeat(2))} ${this.colorize('brightWhite', this.colorize('bold', 'Grouped by File'))}`;
|
|
94
|
+
this.printLine(header);
|
|
95
|
+
this.printLine();
|
|
96
|
+
// Sort files by total percentage
|
|
97
|
+
const sortedFiles = Array.from(data.groupedByFile.entries()).sort((a, b) => {
|
|
98
|
+
const aTotal = a[1].reduce((sum, fn) => sum + fn.percentage, 0);
|
|
99
|
+
const bTotal = b[1].reduce((sum, fn) => sum + fn.percentage, 0);
|
|
100
|
+
return bTotal - aTotal;
|
|
101
|
+
});
|
|
102
|
+
for (const [file, functions] of sortedFiles) {
|
|
103
|
+
const totalPercent = functions.reduce((sum, fn) => sum + fn.percentage, 0);
|
|
104
|
+
const totalTicks = functions.reduce((sum, fn) => sum + fn.ticks, 0);
|
|
105
|
+
const percentColor = this.getPercentColor(totalPercent);
|
|
106
|
+
const percent = `${totalPercent.toFixed(1)}%`;
|
|
107
|
+
const ticks = `(${totalTicks.toLocaleString()} ticks)`;
|
|
108
|
+
// File header
|
|
109
|
+
const displayPath = this.formatPath(file);
|
|
110
|
+
this.printLine(`${this.colorize('magenta', ansiChars.block.dark)} ${this.colorize('brightMagenta', this.colorize('bold', displayPath)).padEnd(60)} ${this.colorize(percentColor, percent.padStart(6))} ${this.colorize('dim', ticks)}`);
|
|
111
|
+
// Functions in this file
|
|
112
|
+
for (const fn of functions) {
|
|
113
|
+
const fnPercent = `${fn.percentage.toFixed(1)}%`;
|
|
114
|
+
const fnTicks = `(${fn.ticks.toLocaleString()} ticks)`;
|
|
115
|
+
const lineInfo = fn.line ? `:${fn.line}` : '';
|
|
116
|
+
this.printLine(` ${this.colorize('magenta', ansiChars.smallSquare)} ${this.colorize('brightWhite', fn.name).padEnd(58)} ${this.colorize(this.getPercentColor(fn.percentage), fnPercent.padStart(6))} ${this.colorize('dim', fnTicks.padEnd(15))} ${this.colorize('dim', lineInfo)}`);
|
|
117
|
+
}
|
|
118
|
+
this.printLine();
|
|
119
|
+
}
|
|
120
|
+
this.printSummary(data);
|
|
121
|
+
}
|
|
122
|
+
printHeader(data) {
|
|
123
|
+
const header = `${this.colorize('magenta', ansiChars.block.full.repeat(2))} ${this.colorize('brightWhite', this.colorize('bold', 'Profile Analysis'))}`;
|
|
124
|
+
this.printLine(header);
|
|
125
|
+
this.printLine();
|
|
126
|
+
if (data.command) {
|
|
127
|
+
this.printLine(`Command: ${this.colorize('cyan', data.command)}`);
|
|
128
|
+
}
|
|
129
|
+
if (data.duration) {
|
|
130
|
+
const durationSec = (data.duration / 1000).toFixed(1);
|
|
131
|
+
this.printLine(`Duration: ${this.colorize('cyan', `${durationSec}s`)}`);
|
|
132
|
+
}
|
|
133
|
+
this.printLine(`Total Ticks: ${this.colorize('cyan', data.totalTicks.toLocaleString())}`);
|
|
134
|
+
}
|
|
135
|
+
printLine(text = '') {
|
|
136
|
+
console.log(text);
|
|
137
|
+
}
|
|
138
|
+
printSummary(data) {
|
|
139
|
+
this.printLine(`${this.colorize('dim', `... (showing top ${data.totalShown} of ${data.totalFiltered} user functions)`)}`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=profile-human.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-human.js","sourceRoot":"","sources":["../../src/reporters/profile-human.ts"],"names":[],"mappings":"AAAA;;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