Skip to content

[local] Fix: Record end timestamp after function handler execution in Python on server - #354

Merged
mcopik merged 1 commit into
spcl:masterfrom
anveba:fix/local-python-timing
Nov 26, 2026
Merged

mcopik merged 1 commit into
spcl:masterfrom
anveba:fix/local-python-timing

Conversation

@syn-ce

@syn-ce syn-ce commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

The local Docker Python server measured only the time for a local import, without including the execution time of the function handler.

The other wrappers do measure the execution (as expected); For example, consider AWS or Nodejs

Summary by CodeRabbit

  • Bug Fixes
    • Request completion is now recorded after the request handler finishes, so processing time reflects the full request handling duration. This improves the accuracy of request timing measurements.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

process_request now records the end time after function.handler(request.json) returns. The # FIXME: measurements? comment was removed.

Changes: Request Timing

Layer / File(s) Summary
Handler timing
dockerfiles/local/python/server.py
process_request records the end time after the handler returns. The FIXME comment was removed.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: mcopik

Merge Risk: Minimal · up to 0a465

The local Python server now measures handler execution time, matching the other wrappers. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change that the diff makes: the end timestamp in the local Python server is now recorded after the function handler runs. The raw summary confirms process_request now calls functio…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change that the diff makes: the end timestamp in the local Python server is now recorded after the function handler runs. The raw summary confirms process_request now calls function.handler(request.json) before recording the end time. The PR objectives describe the same fix, which was to stop measuring only a local import and to include handler execution. The title is specific and matches the single-file change. It is slightly long at 86 characters, but that does not affect the verdict.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9ce19605-8ed1-4c07-a43a-946d9574422c
Commits

Reviewing files that changed from the base of the PR and between 089e5c6 and 0a4651c.

Files selected for processing: 1

  • dockerfiles/local/python/server.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@mcopik
mcopik merged commit a7181a5 into spcl:master Nov 26, 2026
@mcopik

mcopik commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

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.

2 participants