Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

📝 Tweak middleware code sampletime.time() totime.perf_counter()#11957

Merged
estebanx64 merged 4 commits intofastapi:masterfrom
domdent:docs/edit-timer-in-middleware
Aug 31, 2024
Merged

📝 Tweak middleware code sampletime.time() totime.perf_counter()#11957
estebanx64 merged 4 commits intofastapi:masterfrom
domdent:docs/edit-timer-in-middleware

Conversation

@domdent
Copy link
Contributor

Changetime.time()time.perf_counter()

Given the performance of FastAPI,time.perf_counter offers a more accurate way to time short durations: "clock with the highest available resolution to measure a short duration".

@github-actions
Copy link
Contributor

📝 Docs preview for commit7ff5da8 at:https://c67f77ea.fastapitiangolo.pages.dev

@alejsdevalejsdev added the docsDocumentation about how to use FastAPI labelAug 6, 2024
@github-actions
Copy link
Contributor

📝 Docs preview for commitead4f8c at:https://05caad5c.fastapitiangolo.pages.dev

@estebanx64estebanx64 self-assigned thisAug 17, 2024
@github-actions
Copy link
Contributor

📝 Docs preview for commit866c698 at:https://07e36968.fastapitiangolo.pages.dev

@github-actions
Copy link
Contributor

📝 Docs preview for commit6ca7b8c at:https://b84f71cf.fastapitiangolo.pages.dev

@estebanx64
Copy link
Contributor

Hi@domdent 👋

Thanks for your interest in helping us to improve the docs. 🙇

It seems the perf_counter is better for this scenario since it provides a high-resolution time counter for measuring short durations.

It's gonna be merged now. 🚀

domdent reacted with thumbs up emoji

@estebanx64estebanx64 merged commit1b5984b intofastapi:masterAug 31, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

docsDocumentation about how to use FastAPI

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@domdent@estebanx64@alejsdev@tiangolo

Comments


[8]ページ先頭

©2009-2026 Movatter.jp