mirror of
https://github.com/vale981/ray
synced 2025-03-06 18:41:40 -05:00
[serve] Remove more Counter.record()
s (#14628)
This commit is contained in:
parent
4c1df378bb
commit
8e778d6f42
1 changed files with 3 additions and 3 deletions
|
@ -259,7 +259,7 @@ class RayServeReplica:
|
||||||
"replica": self.replica_tag
|
"replica": self.replica_tag
|
||||||
})
|
})
|
||||||
|
|
||||||
self.restart_counter.record(1)
|
self.restart_counter.inc()
|
||||||
|
|
||||||
ray_logger = logging.getLogger("ray")
|
ray_logger = logging.getLogger("ray")
|
||||||
for handler in ray_logger.handlers:
|
for handler in ray_logger.handlers:
|
||||||
|
@ -328,7 +328,7 @@ class RayServeReplica:
|
||||||
if "RAY_PDB" in os.environ:
|
if "RAY_PDB" in os.environ:
|
||||||
ray.util.pdb.post_mortem()
|
ray.util.pdb.post_mortem()
|
||||||
result = wrap_to_ray_error(method_to_call.__name__, e)
|
result = wrap_to_ray_error(method_to_call.__name__, e)
|
||||||
self.error_counter.record(1)
|
self.error_counter.inc()
|
||||||
|
|
||||||
latency_ms = (time.time() - start) * 1000
|
latency_ms = (time.time() - start) * 1000
|
||||||
self.processing_latency_tracker.record(
|
self.processing_latency_tracker.record(
|
||||||
|
@ -384,7 +384,7 @@ class RayServeReplica:
|
||||||
self.ensure_serializable_response(result))
|
self.ensure_serializable_response(result))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
wrapped_exception = wrap_to_ray_error(call_method.__name__, e)
|
wrapped_exception = wrap_to_ray_error(call_method.__name__, e)
|
||||||
self.error_counter.record(1)
|
self.error_counter.inc()
|
||||||
result_list = [wrapped_exception for _ in range(batch_size)]
|
result_list = [wrapped_exception for _ in range(batch_size)]
|
||||||
|
|
||||||
latency_ms = (time.time() - timing_start) * 1000
|
latency_ms = (time.time() - timing_start) * 1000
|
||||||
|
|
Loading…
Add table
Reference in a new issue