Class RequestProfiler
java.lang.Object
com.google.cloud.bigquery.storage.v1.RequestProfiler
A profiler that would periodically generate a report for the past period with the latency report
for the slowest requests. This is used for debugging only. A request id would be generated for
each request at runtime. Certain part of the code would be wrapped with startOperation(...) and
endOperation(...) to measure the latency of operations of individual request.
The report will contain the execution details of the TOP_K slowest requests, one example:
INFO: During the last 60000 milliseconds at system time 1720825020138, in total 2 requests finished. Total dropped request is 0. The top 10 long latency requests details report:
-----------------------------
Request uuid: request_1 with total time 1000 milliseconds
Operation name json_to_proto_conversion starts at: 1720566109971, ends at: 1720566109971, total time: 200 milliseconds
Operation name backend_latency starts at: 1720566109971, ends at: 1720566109971, total time: 800 milliseconds
-----------------------------
Request uuid: request_2 with total time 500 milliseconds
Operation name json_to_proto_conversion starts at: 1720566109971, ends at: 1720566109971, total time: 250 milliseconds
Operation name backend_latency starts at: 1720566109971, ends at: 1720566109971, total time: 250 milliseconds
...
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidsetReportPeriod(Duration flushPeriod) static voidsetTopKRequestsToLog(int topK)
-
Constructor Details
-
RequestProfiler
public RequestProfiler()
-
-
Method Details
-
setTopKRequestsToLog
public static void setTopKRequestsToLog(int topK) -
setReportPeriod
-
disableAndResetProfiler
public static void disableAndResetProfiler()
-