Skip to content

Commit 35a1c1f

Browse files
authored
perf: vLLM metrics optimization (#379)
1 parent d84bb57 commit 35a1c1f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/metric.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ Metric::SendCreateMetricRequest()
167167
void
168168
Metric::SendIncrementRequest(const double& value)
169169
{
170+
py::gil_scoped_release release;
170171
try {
171172
CheckIfCleared();
172173
std::unique_ptr<Stub>& stub = Stub::GetOrCreateInstance();
@@ -204,6 +205,7 @@ Metric::SendSetValueRequest(const double& value)
204205
void
205206
Metric::SendObserveRequest(const double& value)
206207
{
208+
py::gil_scoped_release release;
207209
try {
208210
CheckIfCleared();
209211
std::unique_ptr<Stub>& stub = Stub::GetOrCreateInstance();

0 commit comments

Comments
 (0)