Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions common/metric_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from common.metric_config import MetricConfig, MetricLabelKey, MetricLabels
from common.metrics_handler import MetricsHandler

MAX_RETRIES = 2
MAX_RETRIES = 3


class WebSocketMetric(BaseMetric):
Expand Down Expand Up @@ -66,8 +66,6 @@ async def collect_metric(self) -> None:
if data is not None:
latency = self.process_data(data)
self.update_metric_value(latency)
# if latency > self.config.max_latency:
# raise ValueError(f"Invalid latency: {latency}s")
self.mark_success()
return
raise ValueError("No data in response")
Expand Down Expand Up @@ -102,8 +100,6 @@ async def collect_metric(self) -> None:
if data is not None:
latency = self.process_data(data)
self.update_metric_value(latency)
# if latency > self.config.max_latency:
# raise ValueError(f"Invalid latency: {latency}s")
self.mark_success()
return
raise ValueError("No data in response")
Expand Down
7 changes: 4 additions & 3 deletions metrics/solana_landing_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ async def _confirm_transaction(
client.confirm_transaction(
signature,
commitment=MetricsServiceConfig.SOLANA_CONFIRMATION_LEVEL,
sleep_seconds=0.3,
# We don't use response time in visualizations,
# let's decrease number of polling requests.
sleep_seconds=5,
)
)
confirmation = await asyncio.wait_for(confirmation_task, timeout=timeout)
Expand Down Expand Up @@ -125,7 +127,6 @@ async def _check_health(self, client: AsyncClient) -> None:
if not response:
raise ValueError(response)
except Exception as e:
# raise ValueError(f"Health check failed: {e!s}")
logging.warning(f"Node health check failed: {e!s}")

async def fetch_data(self) -> Optional[float]:
Expand All @@ -137,7 +138,7 @@ async def fetch_data(self) -> Optional[float]:
client = None
try:
client = await self._create_client()
await self._check_health(client)
# await self._check_health(client)
tx = await self._prepare_memo_transaction(client)

start_slot = await self._get_slot(client)
Expand Down