File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -130,13 +130,11 @@ picojson::object EngineMetrics::AsJSON() const {
130130 const TimeCost& item = time_list[i];
131131 if (item.count == 0 ) continue ;
132132 std::ostringstream label_mean;
133- label_mean << " mean"
134- << " {batch_size=" << i << " }" ;
133+ label_mean << " mean{batch_size=" << i << " }" ;
135134 double mean = item.sum / item.count ;
136135 result[label_mean.str ()] = picojson::value (mean);
137136 std::ostringstream label_count;
138- label_count << " count"
139- << " {batch_size=" << i << " }" ;
137+ label_count << " count{batch_size=" << i << " }" ;
140138 result[label_count.str ()] = picojson::value (item.count );
141139 }
142140 return picojson::value (result);
@@ -164,9 +162,12 @@ std::string EngineMetrics::AsUsageJSONStr() const {
164162void EngineMetrics::Reset () {
165163 engine_prefill_time_sum = 0.0 ;
166164 engine_decode_time_sum = 0.0 ;
165+ engine_jump_forward_time_sum = 0 ;
167166 prompt_tokens_sum = 0 ;
168- prefill_tokens_sum = 0 ;
169167 completion_tokens_sum = 0 ;
168+ prefill_tokens_sum = 0 ;
169+ decode_tokens_sum = 0 ;
170+ jump_forward_tokens_sum = 0 ;
170171 last_finished_request.Reset ();
171172 spec_decode.Reset ();
172173 decode_time_by_batch_size.clear ();
You can’t perform that action at this time.
0 commit comments