Dries Van Schuylenbergh
03/04/2025, 1:41 PMMarvin
03/04/2025, 1:41 PMget_run_logger
to integrate logging within your tasks and flows. You can log the memory usage at various points using Python's standard libraries like psutil
.
2. Custom Profiling: Implement custom profiling by wrapping your task or flow logic with memory and time profiling tools. Libraries like memory_profiler
and time
can be used to measure memory usage and execution time respectively.
3. Prefect Artifacts: Prefect offers artifact creation functions like create_table_artifact
or create_markdown_artifact
that can be used to store and visualize profiling data. For example, you might log memory usage and execution time to a table or markdown artifact for later analysis.
You can explore Prefect's logging and artifact capabilities further:
- Prefect Logging
- Prefect Artifacts
These approaches should help you track and profile your tasks and flows effectively. If you need more specific examples or guidance, feel free to ask!Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by