Class RpczZPageHandler
java.lang.Object
io.opencensus.contrib.zpages.ZPageHandler
io.opencensus.contrib.zpages.RpczZPageHandler
HTML page formatter for gRPC cumulative and interval stats.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleprivate static final com.google.common.collect.ImmutableList<View> private static final com.google.common.collect.ImmutableList<View> private static final com.google.common.collect.ImmutableList<View> private static final doubleprivate static final Stringprivate static final com.google.common.collect.ImmutableList<String> private static final Stringprivate static final doubleprivate static final doubleprivate static final Stringprivate static final com.google.common.collect.ImmutableList<View> private static final com.google.common.collect.ImmutableList<View> private static final com.google.common.collect.ImmutableList<View> private final ViewManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static RpczZPageHandlercreate(ViewManager viewManager) voidemitHtml(Map<String, String> queryMap, OutputStream outputStream) Emits the HTML generated page to theoutputStream.private voidemitHtmlBody(PrintWriter out) private static voidemitStyle(PrintWriter out) private voidemitSummaryTable(PrintWriter out, Formatter formatter, boolean isReceived) private static voidemitSummaryTableHeader(PrintWriter out, Formatter formatter) private static voidemitSummaryTableRows(PrintWriter out, Formatter formatter, RpczZPageHandler.StatsSnapshot snapshot, String method) private static doublegetDurationInSecs(ViewData.AggregationWindowData.CumulativeData cumulativeData) private static voidgetStats(RpczZPageHandler.StatsSnapshot snapshot, AggregationData data, View view, ViewData.AggregationWindowData windowData) private Map<String, RpczZPageHandler.StatsSnapshot> getStatsSnapshots(boolean isReceived) private voidgetStatsSnapshots(Map<String, RpczZPageHandler.StatsSnapshot> map, List<View> views) Returns the URL path that should be used to register this page.private static doubletoDoubleSeconds(Duration duration)
-
Field Details
-
viewManager
-
RPCZ_URL
- See Also:
-
SENT
- See Also:
-
RECEIVED
- See Also:
-
SECONDS_PER_MINUTE
private static final double SECONDS_PER_MINUTE- See Also:
-
SECONDS_PER_HOUR
private static final double SECONDS_PER_HOUR- See Also:
-
NANOS_PER_SECOND
private static final double NANOS_PER_SECOND- See Also:
-
BYTES_PER_KB
private static final double BYTES_PER_KB- See Also:
-
RPC_STATS_TYPES
-
CLIENT_RPC_CUMULATIVE_VIEWS
-
SERVER_RPC_CUMULATIVE_VIEWS
-
CLIENT_RPC_MINUTE_VIEWS
-
SERVER_RPC_MINUTE_VIEWS
-
CLIENT_RPC_HOUR_VIEWS
-
SERVER_RPC_HOUR_VIEWS
-
-
Constructor Details
-
RpczZPageHandler
-
-
Method Details
-
getUrlPath
Description copied from class:ZPageHandlerReturns the URL path that should be used to register this page.- Specified by:
getUrlPathin classZPageHandler- Returns:
- the URL path that should be used to register this page.
-
emitStyle
-
emitHtml
Description copied from class:ZPageHandlerEmits the HTML generated page to theoutputStream.- Specified by:
emitHtmlin classZPageHandler- Parameters:
queryMap- the query components map.outputStream- the outputOutputStream.
-
emitHtmlBody
-
emitSummaryTable
-
emitSummaryTableHeader
-
emitSummaryTableRows
private static void emitSummaryTableRows(PrintWriter out, Formatter formatter, RpczZPageHandler.StatsSnapshot snapshot, String method) -
getStatsSnapshots
-
getStatsSnapshots
-
getStats
private static void getStats(RpczZPageHandler.StatsSnapshot snapshot, AggregationData data, View view, ViewData.AggregationWindowData windowData) -
getDurationInSecs
private static double getDurationInSecs(ViewData.AggregationWindowData.CumulativeData cumulativeData) -
toDoubleSeconds
-
create
-