Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
3cf1473a
Unverified
Commit
3cf1473a
authored
May 17, 2025
by
Lifu Huang
Committed by
GitHub
May 17, 2025
Browse files
Use monotonic clock for interval measurement (#6211)
Signed-off-by:
Lifu Huang
<
lifu.hlf@gmail.com
>
parent
27168308
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
test/srt/test_disaggregation_different_tp.py
test/srt/test_disaggregation_different_tp.py
+2
-2
No files found.
test/srt/test_disaggregation_different_tp.py
View file @
3cf1473a
...
@@ -102,7 +102,7 @@ class TestDisaggregationMooncakeDifferentTP(CustomTestCase):
...
@@ -102,7 +102,7 @@ class TestDisaggregationMooncakeDifferentTP(CustomTestCase):
@
classmethod
@
classmethod
def
wait_server_ready
(
cls
,
url
,
timeout
=
60
):
def
wait_server_ready
(
cls
,
url
,
timeout
=
60
):
start_time
=
time
.
time
()
start_time
=
time
.
perf_counter
()
while
True
:
while
True
:
try
:
try
:
response
=
requests
.
get
(
url
)
response
=
requests
.
get
(
url
)
...
@@ -112,7 +112,7 @@ class TestDisaggregationMooncakeDifferentTP(CustomTestCase):
...
@@ -112,7 +112,7 @@ class TestDisaggregationMooncakeDifferentTP(CustomTestCase):
except
Exception
:
except
Exception
:
pass
pass
if
time
.
time
()
-
start_time
>
timeout
:
if
time
.
perf_counter
()
-
start_time
>
timeout
:
raise
RuntimeError
(
f
"Server
{
url
}
failed to start in
{
timeout
}
s"
)
raise
RuntimeError
(
f
"Server
{
url
}
failed to start in
{
timeout
}
s"
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment