Package io.opencensus.contrib.zpages
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 double
private 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 double
private static final String
private static final com.google.common.collect.ImmutableList
<String> private static final String
private static final double
private static final double
private static final String
private 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 RpczZPageHandler
create
(ViewManager viewManager) void
emitHtml
(Map<String, String> queryMap, OutputStream outputStream) Emits the HTML generated page to theoutputStream
.private void
emitHtmlBody
(PrintWriter out) private static void
emitStyle
(PrintWriter out) private void
emitSummaryTable
(PrintWriter out, Formatter formatter, boolean isReceived) private static void
emitSummaryTableHeader
(PrintWriter out, Formatter formatter) private static void
emitSummaryTableRows
(PrintWriter out, Formatter formatter, RpczZPageHandler.StatsSnapshot snapshot, String method) private static double
getDurationInSecs
(ViewData.AggregationWindowData.CumulativeData cumulativeData) private static void
getStats
(RpczZPageHandler.StatsSnapshot snapshot, AggregationData data, View view, ViewData.AggregationWindowData windowData) private Map
<String, RpczZPageHandler.StatsSnapshot> getStatsSnapshots
(boolean isReceived) private void
getStatsSnapshots
(Map<String, RpczZPageHandler.StatsSnapshot> map, List<View> views) Returns the URL path that should be used to register this page.private static double
toDoubleSeconds
(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:ZPageHandler
Returns the URL path that should be used to register this page.- Specified by:
getUrlPath
in classZPageHandler
- Returns:
- the URL path that should be used to register this page.
-
emitStyle
-
emitHtml
Description copied from class:ZPageHandler
Emits the HTML generated page to theoutputStream
.- Specified by:
emitHtml
in 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
-