Skip to content

Commit c7703f1

Browse files
authored
Merge pull request #48 from janhq/feat/start-time
feat: add load model start_time_
2 parents 4da5cc0 + ca2d410 commit c7703f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cpp/tensorrt_llm/cortex.tensorrt-llm/src/tensorrt-llm_engine.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <thread>
1717
#include <trantor/utils/Logger.h>
1818
#include <vector>
19+
#include <chrono>
1920

2021
using json = nlohmann::json;
2122
using namespace tensorrtllm;
@@ -346,7 +347,8 @@ void TensorrtllmEngine::LoadModel(std::shared_ptr<Json::Value> json_body, std::f
346347
Json::Value status_resp;
347348
status_resp["status_code"] = k200OK;
348349
callback(std::move(status_resp), std::move(json_resp));
349-
return;
350+
start_time_ = std::chrono::system_clock::now().time_since_epoch() /
351+
std::chrono::milliseconds(1);
350352
};
351353

352354
void TensorrtllmEngine::UnloadModel(std::shared_ptr<Json::Value> json_body, std::function<void(Json::Value&&, Json::Value&&)>&& callback) {

0 commit comments

Comments
 (0)