[
https://issues.apache.org/jira/browse/IMPALA-12535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Quanlong Huang resolved IMPALA-12535.
-------------------------------------
Fix Version/s: Impala 4.4.0
Resolution: Fixed
> Wrong unit of thread duration shown in the json result of
> /thread-group?all&json URL
> ------------------------------------------------------------------------------------
>
> Key: IMPALA-12535
> URL: https://issues.apache.org/jira/browse/IMPALA-12535
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Reporter: Quanlong Huang
> Assignee: Quanlong Huang
> Priority: Major
> Fix For: Impala 4.4.0
>
> Attachments: Selection_098.png
>
>
> Impalad returns the JSON results of thread statistics for URL
> "/thread-group?all&json", e.g. for a thread:
> {code:json}
> {
> name: "StatestoreSubscriber-0",
> id: 43136,
> user_ns: 26.94,
> kernel_ns: 10.18,
> iowait_ns: 0.01
> },
> {code}
> However, the unit is not ns. Instead, it's seconds. The html page shows the
> correct unit.
> !Selection_098.png|width=876,height=156!
> Looking into the code, we actually divided the duration by 1e9 so the unit
> should be second.
> {code:cpp}
> val.AddMember("user_ns", static_cast<double>(stats.user_ns) / 1e9,
> document->GetAllocator());
> val.AddMember("kernel_ns", static_cast<double>(stats.kernel_ns) / 1e9,
> document->GetAllocator());
> val.AddMember("iowait_ns", static_cast<double>(stats.iowait_ns) / 1e9,
> document->GetAllocator());
> {code}
> [https://github.com/apache/impala/blob/39adf42a30765208e51e970339e950aae8544848/be/src/util/thread.cc#L283-L288]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)