Skip to content

build: add performance profiling pipeline#1835

Open
hallvictoria wants to merge 9 commits intodevfrom
hallvictoria/performance-profiling
Open

build: add performance profiling pipeline#1835
hallvictoria wants to merge 9 commits intodevfrom
hallvictoria/performance-profiling

Conversation

@hallvictoria
Copy link
Contributor

@hallvictoria hallvictoria commented Mar 10, 2026

Description

Added a complete performance profiling infrastructure that:

  • Automatic Profiling: Instruments all _handle_* methods in dispatcher.py
  • Nested Call Tracking: Captures timing for inner methods (reload_library_worker, prioritize_customer_dependencies, etc.)
  • Statistical Analysis: Calculates mean, min, max, and total execution times
  • Baseline Comparison: Automatically compares PR performance against dev branch
  • Regression Detection: Warns on performance regressions >10% slower
  • CI Integration: Runs automatically on every build for Python >= 3.13

Example output:

Pipeline output:
https://dev.azure.com/azfunc/public/_build/results?buildId=264960&view=logs&j=1ab298d2-9fba-578e-3762-94a54e48f7b8&t=a0292494-8c4d-56b7-a15b-b3535aa39dc7

Detailed file output:
https://dev.azure.com/azfunc/public/_build/results?buildId=264960&view=artifacts&pathAsName=false&type=publishedArtifacts

Fixes #


Pull Request Checklist

Host-Worker Contract

  • Does this PR impact the host-worker contract (e.g., gRPC messages, shared interfaces)?
    • If yes, have the changes been applied to:
      • azure_functions_worker (Python <= 3.12)
      • proxy_worker (Python >= 3.13)
    • If no, please explain why:

Worker Execution Logic

  • Does this PR affect worker execution logic (e.g., function invocation, bindings, lifecycle)?
    If yes, please answer the following:

Python Version Coverage

  • Does this change apply to both Python <=3.12 and 3.13+?
  • If yes, have the changes been made to:
    • azure_functions_worker (Python <= 3.12)
    • runtimes/v1 / runtimes/v2 (Python >= 3.13)
  • If no, please explain why:

Programming Model Compatibility (for Python 3.13+)

  • Does this change apply to both:
    • V1 programming model (runtimes/v1)?
    • V2 programming model (runtimes/v2)?
  • Explanation (if limited to one model):

@hallvictoria hallvictoria marked this pull request as ready for review March 11, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant