[
https://issues.apache.org/jira/browse/PHOENIX-5504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17031286#comment-17031286
]
Prashant Agrawal commented on PHOENIX-5504:
-------------------------------------------
Hello Team,
Does anyone have any thoughts for same?
> Metric calculation and understanding of these values in Phoenix
> ---------------------------------------------------------------
>
> Key: PHOENIX-5504
> URL: https://issues.apache.org/jira/browse/PHOENIX-5504
> Project: Phoenix
> Issue Type: Task
> Reporter: Prashant Agrawal
> Priority: Major
>
> Hi Team,
> We are using Phoenix for querying the data from Hbase and seeing a
> discrepancy in the metrics logged by the phoenix. So can someone please help
> to understand the same. Below is a use case for same:
> 1) I ran a query as select * from "db"."table" where "status" = "ACTIVE";
> 2) Now I added a normal java clock at start of query and at end of result
> extraction and metric extraction.
> 3) Metrics are extracted by:
> Map<MetricType, Long> overallQueryMetrics =
> PhoenixRuntime.getOverAllReadRequestMetricInfo(resultSet);
> Map<String, Map<MetricType, Long>> requestReadMetrics =
> PhoenixRuntime.getRequestReadMetricInfo(resultSet);
> 4) So a quick code snippet is like:
> {code:java}
> - Timer start to calculate duration
> - Perform the query and get resultset
> - Extract and read the resultset
> - Extract the getOverAllReadRequestMetricInfo and getRequestReadMetricInfo
> from resultSet
> - Stop the time and calculate the field as duration.{code}
> 5) After doing so the metrics are coming as:
> Sample 1: (all times in millis)
> {code:java}
> duration : 151
> WALL_CLOCK_TIME_MS : 292
> TASK_EXECUTION_TIME : 510
> TASK_END_TO_END_TIME : 514
> RESULT_SET_TIME_MS : 292
> TASK_EXECUTED_COUNTER: 5{code}
> Sample 2: (time is Milis)
> {code:java}
> duration 2,750
> RESULT_SET_TIME_MS 5,456
> TASK_END_TO_END_TIME 12
> TASK_EXECUTED_COUNTER 1
> TASK_EXECUTION_TIME 11
> TASK_QUEUE_WAIT_TIME 1
> TASK_REJECTED_COUNTER 0
> WALL_CLOCK_TIME_MS 5,456{code}
> So, can someone please let me know that which metrics should be referred as
> time taken by Phoenix to run the query. Because duration calculated by the
> timer is way less than WALL_CLOCK_TIME_MS and any other metrics in the
> response of phoenix.
>
> *PS: Sorry if it seems like a spam here but could not find any dedicated
> forum to ask hence created the same over here.*
--
This message was sent by Atlassian Jira
(v8.3.4#803005)