polars.Config.enable_monitoring
-
Enable runtime monitoring of query execution.
Query metrics are collected and sent to Polars Cloud, letting you inspect the performance of your queries from the dashboard. This requires:
- A Polars Cloud account. Sign up at https://cloud.pola.rs/ (calling this method triggers a browser-based login if you are not already authenticated).
- The
polars-cloudpackage installed in this environment (pip install polars-cloud).
Monitoring is supported by the in-memory and streaming engines, but only the streaming engine collects per-node metrics. Enabling monitoring therefore also sets the engine affinity to
"streaming". Disabling it does not restore the previous engine affinity.- Parameters:
-
- active
-
Enable monitoring when True (the default), disable it when False.
Examples
>>> pl.Config.enable_monitoring()
Enable monitoring temporarily with
Config; the previous monitoring state and engine affinity are restored on exit:>>> with pl.Config(enable_monitoring=True): ... lf.collect()
classmethod Config.enable_monitoring(
active: bool | None = True,
) → type[Config]
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/api/polars.Config.enable_monitoring.html