Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-12535

Wrong unit of thread duration shown in the json result of /thread-group?all&json URL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.4.0
    • Backend
    • None
    • ghx-label-2

    Description

      Impalad returns the JSON results of thread statistics for URL "/thread-group?all&json", e.g. for a thread:

      {
        name: "StatestoreSubscriber-0",
        id: 43136,
        user_ns: 26.94,
        kernel_ns: 10.18,
        iowait_ns: 0.01
      },
      

      However, the unit is not ns. Instead, it's seconds. The html page shows the correct unit.

      Looking into the code, we actually divided the duration by 1e9 so the unit should be second.

              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());
      

      https://github.com/apache/impala/blob/39adf42a30765208e51e970339e950aae8544848/be/src/util/thread.cc#L283-L288

      Attachments

        1. Selection_098.png
          43 kB
          Quanlong Huang

        Activity

          People

            stigahuang Quanlong Huang
            stigahuang Quanlong Huang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: