Skip to main content
Monitoring & Collection/Profiling

GetTopFunctions

Get the top CPU-consuming functions from a profiling session.

GET/api/v1/profiling/flame/{sessionId}/top

Operation ID

GetTopFunctions

Since

1.0.0

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

Path Parameters

  • sessionId
    StringRequired

    Session identifier to retrieve top functions for.

Query Parameters

  • n
    Integer

    Maximum number of top functions to return.

    Example: 0

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • items
    List

    List of top functions ordered by CPU usage.

    Example: (nested array)

    • funcName
      String

      Fully-qualified function name including package path.

      Example: runtime.gcBgMarkWorker

    • package
      String

      Go package that contains this function.

      Example: runtime

    • selfPct
      Long

      Percentage of samples attributed solely to this function.

      Example: 12.5

    • cumulativePct
      Long

      Percentage of samples including callees of this function.

      Example: 18.3

    • sampleCount
      String

      Absolute number of profiling samples collected for this function.

      Example: 4200