diff --git a/runner/lib/stats/run.js b/runner/lib/stats/run.js index f2d17c3..c1c2f08 100644 --- a/runner/lib/stats/run.js +++ b/runner/lib/stats/run.js @@ -190,6 +190,12 @@ export const makeRunStats = (data) => { savedData.endedAt && rounder(savedData.endedAt - savedData.startedAt); + const getChainBootstrapStartedAt = () => + stages[0] && stages[0].chainStartedAt; + const getChainBootstrapEndedAt = () => stages[0] && stages[0].chainReadyAt; + const getChainBootstrapDuration = () => + stages[0] && stages[0].chainInitDuration; + const getWalletDeployDuration = () => savedData.walletDeployStartedAt && savedData.walletDeployEndedAt && @@ -217,6 +223,9 @@ export const makeRunStats = (data) => { stages: () => stages, stageCount: getStageCount, duration: getDuration, + chainBootstrapStartedAt: getChainBootstrapStartedAt, + chainBootstrapEndedAt: getChainBootstrapEndedAt, + chainBootstrapDuration: getChainBootstrapDuration, walletDeployDuration: getWalletDeployDuration, loadgenDeployDuration: getLoadgenDeployDuration, }), diff --git a/runner/lib/stats/types.d.ts b/runner/lib/stats/types.d.ts index 283b734..dbfdb5a 100644 --- a/runner/lib/stats/types.d.ts +++ b/runner/lib/stats/types.d.ts @@ -171,6 +171,9 @@ export interface RunStats extends RunStatsInitData { readonly startedAt: TimeValueS | undefined; readonly endedAt: TimeValueS | undefined; readonly duration: number | undefined; + readonly chainBootstrapStartedAt: TimeValueS | undefined; + readonly chainBootstrapEndedAt: TimeValueS | undefined; + readonly chainBootstrapDuration: number | undefined; readonly walletDeployStartedAt: TimeValueS | undefined; readonly walletDeployEndedAt: TimeValueS | undefined; readonly walletDeployDuration: number | undefined; diff --git a/scripts/perf_to_stats_csv.jq b/scripts/perf_to_stats_csv.jq index 3628a28..acc0a6c 100755 --- a/scripts/perf_to_stats_csv.jq +++ b/scripts/perf_to_stats_csv.jq @@ -5,20 +5,22 @@ select(has("stats")) | .stats | { - sdkRevision: (.metadata.testData.sdkRevision | tostring), - sdkCommitTime: (.metadata.testData.sdkCommitTime | strftime("%Y-%m-%d %H:%M:%S")), + sdkRevision: (.metadata.testData.sdkRevision // "" | tostring), + sdkCommitTime: (.metadata.testData.sdkCommitTime | strftime("%Y-%m-%d %H:%M:%S")? // ""), success: (.duration != null), + chainBootstrapDuration: (.chainBootstrapDuration // .stages["0"].chainInitDuration), walletDeployDuration: .walletDeployDuration, loadgenDeployDuration: .loadgenDeployDuration, - cycleAvgDuration: .cyclesSummary.avgDuration, cycleSuccessRate: .cyclesSummary.cycleSuccessRate, + cycleAvgDuration: .cyclesSummary.avgDuration, } + (.stages | with_entries( - (.key | tonumber) as $stageIndex | + .value.stageConfig as $stageConfig | ("stage" + .key + "_") as $stagePrefix | - if ($stageIndex > 0 and $stageIndex < 5) then - { key: ($stagePrefix + "cycleAvgDuration"), value: .value.cyclesSummaries.all.avgDuration }, + if ($stageConfig["chainOnly"] != true and $stageConfig["durationConfig"] != 0) then { key: ($stagePrefix + "cycleSuccessRate"), value: .value.cyclesSummaries.all.cycleSuccessRate }, + { key: ($stagePrefix + "cycleAvgDuration"), value: .value.cyclesSummaries.all.avgDuration }, { key: ($stagePrefix + "avgSwingsetBlockTime"), value: .value.blocksSummaries.onlyLive.avgSwingsetTime }, + { key: ($stagePrefix + "avgSwingsetPercentage"), value: .value.blocksSummaries.onlyLive.avgSwingsetPercentage }, empty else empty end ))