Profile Action

Request

GET /api/profile GET /api/profile/text

Description

用于获取指定 query id 的 query profile 如果query_id不存在, 直接返回404 NOT FOUND错误 如果query_id存在,返回下列文本的profile:

  1. Query:
  2. Summary:
  3. - Query ID: a0a9259df9844029-845331577440a3bd
  4. - Start Time: 2020-06-15 14:10:05
  5. - End Time: 2020-06-15 14:10:05
  6. - Total: 8ms
  7. - Query Type: Query
  8. - Query State: EOF
  9. - Doris Version: trunk
  10. - User: root
  11. - Default Db: default_cluster:test
  12. - Sql Statement: select * from table1
  13. Execution Profile a0a9259df9844029-845331577440a3bd:(Active: 7.315ms, % non-child: 100.00%)
  14. Fragment 0:
  15. Instance a0a9259df9844029-845331577440a3be (host=TNetworkAddress(hostname:172.26.108.176, port:9560)):(Active: 1.523ms, % non-child: 0.24%)
  16. - MemoryLimit: 2.00 GB
  17. - PeakUsedReservation: 0.00
  18. - PeakMemoryUsage: 72.00 KB
  19. - RowsProduced: 5
  20. - AverageThreadTokens: 0.00
  21. - PeakReservation: 0.00
  22. BlockMgr:
  23. - BlocksCreated: 0
  24. - BlockWritesOutstanding: 0
  25. - BytesWritten: 0.00
  26. - TotalEncryptionTime: 0ns
  27. - BufferedPins: 0
  28. - TotalReadBlockTime: 0ns
  29. - TotalBufferWaitTime: 0ns
  30. - BlocksRecycled: 0
  31. - TotalIntegrityCheckTime: 0ns
  32. - MaxBlockSize: 8.00 MB
  33. DataBufferSender (dst_fragment_instance_id=a0a9259df9844029-845331577440a3be):
  34. - AppendBatchTime: 9.23us
  35. - ResultSendTime: 956ns
  36. - TupleConvertTime: 5.735us
  37. - NumSentRows: 5
  38. OLAP_SCAN_NODE (id=0):(Active: 1.506ms, % non-child: 20.59%)
  39. - TotalRawReadTime: 0ns
  40. - CompressedBytesRead: 6.47 KB
  41. - PeakMemoryUsage: 0.00
  42. - RowsPushedCondFiltered: 0
  43. - ScanRangesComplete: 0
  44. - ScanTime: 25.195us
  45. - BitmapIndexFilterTimer: 0ns
  46. - BitmapIndexFilterCount: 0
  47. - NumScanners: 65
  48. - RowsStatsFiltered: 0
  49. - VectorPredEvalTime: 0ns
  50. - BlockSeekTime: 1.299ms
  51. - RawRowsRead: 1.91K (1910)
  52. - ScannerThreadsVoluntaryContextSwitches: 0
  53. - RowsDelFiltered: 0
  54. - IndexLoadTime: 911.104us
  55. - NumDiskAccess: 1
  56. - ScannerThreadsTotalWallClockTime: 0ns
  57. - MaterializeTupleTime: 0ns
  58. - ScannerThreadsUserTime: 0ns
  59. - ScannerThreadsSysTime: 0ns
  60. - TotalPagesNum: 0
  61. - RowsReturnedRate: 3.319K /sec
  62. - BlockLoadTime: 539.289us
  63. - CachedPagesNum: 0
  64. - BlocksLoad: 384
  65. - UncompressedBytesRead: 0.00
  66. - RowsBloomFilterFiltered: 0
  67. - TabletCount : 1
  68. - RowsReturned: 5
  69. - ScannerThreadsInvoluntaryContextSwitches: 0
  70. - DecompressorTimer: 0ns
  71. - RowsVectorPredFiltered: 0
  72. - ReaderInitTime: 6.498ms
  73. - RowsRead: 5
  74. - PerReadThreadRawHdfsThroughput: 0.0 /sec
  75. - BlockFetchTime: 4.318ms
  76. - ShowHintsTime: 0ns
  77. - TotalReadThroughput: 0.0 /sec
  78. - IOTimer: 1.154ms
  79. - BytesRead: 48.49 KB
  80. - BlockConvertTime: 97.539us
  81. - BlockSeekCount: 0

如果为text接口,直接返回profile的纯文本内容

Path parameters

Query parameters

  • query_id

    指定的 query id

Request body

Response

  1. {
  2. "msg": "success",
  3. "code": 0,
  4. "data": {
  5. "profile": "query profile ..."
  6. },
  7. "count": 0
  8. }

Examples

  1. 获取指定 query_id 的 query profile

    1. GET /api/profile?query_id=f732084bc8e74f39-8313581c9c3c0b58
    2. Response:
    3. {
    4. "msg": "success",
    5. "code": 0,
    6. "data": {
    7. "profile": "query profile ..."
    8. },
    9. "count": 0
    10. }
  2. 获取指定 query_id 的 query profile 的纯文本

    1. GET /api/profile/text?query_id=f732084bc8e74f39-8313581c9c3c0b58
    2. Response:
    3. Summary:
    4. - Profile ID: 48bdf6d75dbb46c9-998b9c0368f4561f
    5. - Task Type: QUERY
    6. - Start Time: 2023-12-20 11:09:41
    7. - End Time: 2023-12-20 11:09:45
    8. - Total: 3s680ms
    9. - Task State: EOF
    10. - User: root
    11. - Default Db: tpcds
    12. - Sql Statement: with customer_total_return as
    13. select sr_customer_sk as ctr_customer_sk
    14. ,sr_store_sk as ctr_store_sk
    15. ,sum(SR_FEE) as ctr_total_return
    16. ...