Source code for deephaven_enterprise.performance_overview

#
# Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
#
"""This module provides functions to retrieve performance data for Deephaven Enterprise workers and Persistent Queries.  The retrieved tables are stored in the global query scope, for easy access in a Code Studio."""

from typing import Optional

import jpy
from deephaven.dtypes import Instant
from deephaven.jcompat import wrap_j_object

from deephaven_enterprise import dh_globals

_JPerformanceOverview = jpy.get_type(
    "io.deephaven.enterprise.dnd.query.util.perf.PerformanceOverview"
)


[docs] def performance_overview( process_info_id: Optional[str] = None, worker_name: Optional[str] = None, host_name: Optional[str] = None, pq_name: Optional[str] = None, as_of_time: Optional[Instant] = None, # type: ignore as_of_time_string: Optional[str] = None, owner: Optional[str] = None, date: Optional[str] = None, is_intraday: bool = True, is_live: bool = True, ) -> None: """Constructs a Core+ PerformanceOverview builder, calling each setter w/ supplied or default values. The resultant tables and plots are then published globally. Args: process_info_id (str): the process info id, defaults to None worker_name (str): the worker name, defaults to None host_name (str): the host name, defaults to None pq_name (str): the pq name, defaults to None as_of_time (Instant): the as of time, defaults to None as_of_time_string (str): the as of time string, defaults to None owner (str): the owner, defaults to None date (str): the date, defaults to None is_intraday (bool): whether the performance overview is intraday, defaults to True is_live (bool): whether the performance overview is live, defaults to True """ result_map = ( _JPerformanceOverview() .partialProcessInfoId(process_info_id) .workerName(worker_name) .hostName(host_name) .pqName(pq_name) .asOfTime(as_of_time) .asOfTimeString(as_of_time_string) .owner(owner) .date(date) .isIntraday(is_intraday) .isLive(is_live) .get(dh_globals.jdb) ) it = result_map.entrySet().iterator() while it.hasNext(): pair = it.next() dh_globals.binding[pair.getKey()] = wrap_j_object(pair.getValue())