• EnglishEspañol日本語한국어Português
  • Log inStart now

Python runtime metrics

The Python agent records runtime metrics to allow you to analyze the performance of your Python processes and interpreter. This includes metrics related to CPU usage, memory usage, and garbage collection.

CPU usage

With CPU runtime metrics, you can monitor CPU usage by examining user and system CPU utilization, and also see time spent in different components of the CPU. The following CPU usage metrics are available:

  • CPU time: Track the amount of time being spent in different states of the CPU. This includes user (time running application code) and system (time spent in the operating system). This metric is represented as total elapsed time in seconds.
  • CPU utilization: Analyze the amount of processing resources being utilized over time by different components of the CPU. This includes the user component (for running application code) and system component (for running kernel code). This metric is reported as a percentage representing the time spent in the specified CPU component divided by total elapsed CPU time.

Memory usage

You can monitor your system’s overall memory consumption and utilization by process and host. The following memory usage metrics are available:

  • Total physical memory: Monitor the amount of total physical memory in megabytes being used by your system over time. This metric is also available for individual process IDs.
  • Memory utilization: Track memory utilization over time for your system and for individual processes. This metric is represented by the value of the total physical memory being used by your system (or a specific process) divided by the total amount of memory available.

Garbage collection


Garbage collection profiling is is disabled by default in the agent. To enable it, check out our documentation here.

The garbage collector finds unused data objects and reclaims that memory space so it can be used by another process. The Python agent provides the following garbage collection metrics:

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.