> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Execution duration statistics

> Retrieve execution time statistics showing how long applications took to process requests.
Results are aggregated by the specified time interval and can be filtered by app and network.



## OpenAPI

````yaml /api-reference/services_documented/fastedge_api.yaml get /fastedge/v1/stats/app_duration
openapi: 3.1.0
info:
  title: Gcore OpenAPI – FastEdge API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-14T07:00:22.640261+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - description: Application templates
    name: FastEdge Templates
    x-displayName: Templates
  - description: Client-level settings and limits
    name: FastEdge Clients
    x-displayName: Clients
  - description: >-
      Apps are descriptions of edge apps, that reference the binary and may
      contain app-specific settings, such as environment variables.
    name: Apps
    x-displayName: Apps
  - description: >-
      Binaries are WebAssembly executables that are actually executed when app
      is ran.
    name: Binaries
    x-displayName: Binaries
  - description: Statistics of edge app use
    name: Stats
    x-displayName: Stats
  - description: Secret values that can be used in apps
    name: FastEdge Secrets
    x-displayName: Secrets
  - description: Key-value edge storage for apps
    name: Edge Storage
    x-displayName: Edge Storage
paths:
  /fastedge/v1/stats/app_duration:
    get:
      tags:
        - Stats
      summary: Execution duration statistics
      description: >-
        Retrieve execution time statistics showing how long applications took to
        process requests.

        Results are aggregated by the specified time interval and can be
        filtered by app and network.
      operationId: StatsDuration
      parameters:
        - description: Filter statistics by specific application ID
          in: query
          name: id
          schema:
            type: integer
            format: int64
        - description: Reporting period start time in RFC3339 format
          example: '2026-01-01T00:00:00Z'
          in: query
          name: from
          required: true
          schema:
            format: date-time
            type: string
        - description: Reporting period end time in RFC3339 format (exclusive)
          example: '2026-01-31T23:59:59Z'
          in: query
          name: to
          required: true
          schema:
            format: date-time
            type: string
        - description: >-
            Reporting time granularity in seconds. Common values are 60 (1
            minute), 300 (5 minutes), 3600 (1 hour).
          example: 300
          in: query
          name: step
          required: true
          schema:
            default: 60
            type: integer
        - description: Filter statistics by edge network name
          example: gcore
          in: query
          name: network
          schema:
            format: string
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  stats:
                    items:
                      $ref: '#/components/schemas/duration_stats'
                    type: array
                required:
                  - stats
                type: object
          description: Returns execution duration statistics for the specified time period
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
          description: Bad request
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from datetime import datetime
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            response = client.fastedge.statistics.get_duration_series(
                from_=datetime.fromisoformat("2019-12-27T18:11:19.117"),
                step=0,
                to=datetime.fromisoformat("2019-12-27T18:11:19.117"),
            )
            print(response.stats)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/fastedge\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Fastedge.Statistics.GetDurationSeries(context.TODO(), fastedge.StatisticGetDurationSeriesParams{\n\t\tFrom: time.Now(),\n\t\tStep: 0,\n\t\tTo:   time.Now(),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Stats)\n}\n"
components:
  schemas:
    duration_stats:
      type: object
      description: Edge app execution duration statistics
      required:
        - time
        - min
        - max
        - avg
        - median
        - perc75
        - perc90
      properties:
        time:
          type: string
          format: date-time
          description: Beginning of reporting slot
        min:
          type: integer
          format: int64
          description: Min duration in usec
        max:
          type: integer
          format: int64
          description: Max duration in usec
        avg:
          type: integer
          format: int64
          description: Average duration in usec
        median:
          type: integer
          format: int64
          description: Median (50% percentile) duration in usec
        perc75:
          type: integer
          format: int64
          description: 75% percentile duration in usec
        perc90:
          type: integer
          format: int64
          description: 90% percentile duration in usec
    error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````