Skip to main content
Monitoring & Collection/Profiling
GETProfilingSince 1.0SynchronousAuth Required

GetTopFunctions

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

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Path Parameters

Query Parameters

Request Inputs

Path Parameters

  • sessionIdStringRequired

    Session identifier to retrieve top functions for.

Query Parameters

  • nInteger

    Maximum number of top functions to return.

    Example: 0

Responses

200 OK

On success, this API returns the following response structure.

  • itemsList

    List of top functions ordered by CPU usage.

    Example: (nested array)

    • funcNameString

      Fully-qualified function name including package path.

      Example: runtime.gcBgMarkWorker

    • packageString

      Go package that contains this function.

      Example: runtime

    • selfPctLong

      Percentage of samples attributed solely to this function.

      Example: 12.5

    • cumulativePctLong

      Percentage of samples including callees of this function.

      Example: 18.3

    • sampleCountString

      Absolute number of profiling samples collected for this function.

      Example: 4200

Endpoint

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

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

Operation ID

GetTopFunctions

Permalink

Request Example

curl -X GET '{host}/api/v1/profiling/flame/{sessionId}/top' -H 'Authorization: Bearer {token}'

Response Example

200
{
  "items": [
    {}
  ]
}

Change History

This API has no change history records yet.

View all change history