Skip to content

Commit

Permalink
Merge pull request #48 from janhq/feat/start-time
Browse files Browse the repository at this point in the history
feat: add load model start_time_
  • Loading branch information
vansangpfiev authored Jun 25, 2024
2 parents 4da5cc0 + ca2d410 commit c7703f1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <thread>
#include <trantor/utils/Logger.h>
#include <vector>
#include <chrono>

using json = nlohmann::json;
using namespace tensorrtllm;
Expand Down Expand Up @@ -346,7 +347,8 @@ void TensorrtllmEngine::LoadModel(std::shared_ptr<Json::Value> json_body, std::f
Json::Value status_resp;
status_resp["status_code"] = k200OK;
callback(std::move(status_resp), std::move(json_resp));
return;
start_time_ = std::chrono::system_clock::now().time_since_epoch() /
std::chrono::milliseconds(1);
};

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

0 comments on commit c7703f1

Please sign in to comment.