Skip to content

Commit

Permalink
Introduced metrics to opensearch-py client
Browse files Browse the repository at this point in the history
Signed-off-by: saimedhi <[email protected]>
  • Loading branch information
saimedhi committed Mar 18, 2024
1 parent 14e7ba0 commit e5c550d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion opensearchpy/metrics.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# SPDX-License-Identifier: Apache-2.0
#
# The OpenSearch Contributors require contributions made to
# this file be licensed under the Apache-2.0 license or a
# compatible open source license.
#
# Modifications Copyright OpenSearch Contributors. See
# GitHub history for details.

import time
from abc import ABC, abstractmethod

Expand Down Expand Up @@ -53,4 +62,4 @@ def request_end(self) -> None:

def _on_request_end(self) -> None:
self._end_time = time.perf_counter()
self._service_time = self._end_time - self._start_time
self._service_time = self._end_time - self._start_time

0 comments on commit e5c550d

Please sign in to comment.