File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,6 +75,22 @@ est_applicability_json=""
7575est_confidence_json=" "
7676est_notes_json=" "
7777
78+ _bk_normalize_estimation_timestamp () {
79+ local raw=" ${1:- } "
80+
81+ if [[ -z " $raw " ]]; then
82+ echo " "
83+ return 0
84+ fi
85+
86+ if [[ " $raw " =~ ^[0-9]{8}_[0-9]{6}$ ]]; then
87+ echo " ${raw: 0: 4} -${raw: 4: 2} -${raw: 6: 2} ${raw: 9: 2} :${raw: 11: 2} :${raw: 13: 2} "
88+ return 0
89+ fi
90+
91+ echo " $raw "
92+ }
93+
7894# ---------------------------------------------------------------------------
7995# read_values — Read benchmark Result_JSON into global variables
8096#
@@ -101,6 +117,7 @@ read_values() {
101117 # Read server-assigned uuid and timestamp (written back by send_results.sh)
102118 est_uuid=$( jq -r ' ._server_uuid // empty' " $json_file " )
103119 est_timestamp=$( jq -r ' ._server_timestamp // empty' " $json_file " )
120+ est_timestamp=$( _bk_normalize_estimation_timestamp " $est_timestamp " )
104121
105122 # Fallback: read send_results manifest if the result JSON itself does not
106123 # carry the server-assigned metadata.
@@ -115,6 +132,7 @@ read_values() {
115132 fi
116133 if [[ -z " $est_timestamp " ]]; then
117134 est_timestamp=$( jq -r --arg file " $basename " ' .[$file].timestamp // empty' " $meta_file " )
135+ est_timestamp=$( _bk_normalize_estimation_timestamp " $est_timestamp " )
118136 fi
119137 fi
120138 fi
You can’t perform that action at this time.
0 commit comments