René's URL Explorer Experiment


Title: Expose measured duration on Timer context manager by vokracko · Pull Request #1166 · prometheus/client_python · GitHub

Open Graph Title: Expose measured duration on Timer context manager by vokracko · Pull Request #1166 · prometheus/client_python

X Title: Expose measured duration on Timer context manager by vokracko · Pull Request #1166 · prometheus/client_python

Description: Prometheus instrumentation library for Python applications - Expose measured duration on Timer context manager by vokracko · Pull Request #1166 · prometheus/client_python

Open Graph Description: Motivation When you use .time() as a context manager, the duration is already computed internally but thrown away — if you want to log or reuse it, you end up measuring twice: start = time.monotoni...

X Description: Motivation When you use .time() as a context manager, the duration is already computed internally but thrown away — if you want to log or reuse it, you end up measuring twice: start = time.monotoni...

Opengraph URL: https://github.com/prometheus/client_python/pull/1166

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:e5beb8e9-6047-056e-328f-ef35f48bfd6a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id89B0:1FCD98:1E0898B:27D103C:6A51E204
html-safe-noncecdf3df0c2226b04a1936e8835eb45fa8ded0dbe26ed9c8781049328687d2cd7f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUIwOjFGQ0Q5ODoxRTA4OThCOjI3RDEwM0M6NkE1MUUyMDQiLCJ2aXNpdG9yX2lkIjoiNzA5MDYxMTc3OTA0NzM4MzU1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb9d83e10f8afdc607c0654f3759d7a79a42b347a0d523080cd9b446bc38f6959
hovercard-subject-tagpull_request:3571751103
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/prometheus/client_python/1166/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/69ce3b44c73355de0355a2131cfe2c8501f02f77b9d5fa41eea69b6395778648/prometheus/client_python/pull/1166
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/69ce3b44c73355de0355a2131cfe2c8501f02f77b9d5fa41eea69b6395778648/prometheus/client_python/pull/1166
og:image:altMotivation When you use .time() as a context manager, the duration is already computed internally but thrown away — if you want to log or reuse it, you end up measuring twice: start = time.monotoni...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevokracko
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-cache
go-importgithub.com/prometheus/client_python git https://github.com/prometheus/client_python.git
octolytics-dimension-user_id3380462
octolytics-dimension-user_loginprometheus
octolytics-dimension-repository_id30618733
octolytics-dimension-repository_nwoprometheus/client_python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id30618733
octolytics-dimension-repository_network_root_nwoprometheus/client_python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/prometheus/client_python/pull/1166#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fprometheus%2Fclient_python%2Fpull%2F1166
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fprometheus%2Fclient_python%2Fpull%2F1166
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=prometheus%2Fclient_python
Reloadhttps://github.com/prometheus/client_python/pull/1166
Reloadhttps://github.com/prometheus/client_python/pull/1166
Reloadhttps://github.com/prometheus/client_python/pull/1166
Please reload this pagehttps://github.com/prometheus/client_python/pull/1166
prometheus https://github.com/prometheus
client_pythonhttps://github.com/prometheus/client_python
Notifications https://github.com/login?return_to=%2Fprometheus%2Fclient_python
Fork 864 https://github.com/login?return_to=%2Fprometheus%2Fclient_python
Star 4.3k https://github.com/login?return_to=%2Fprometheus%2Fclient_python
Code https://github.com/prometheus/client_python
Issues 104 https://github.com/prometheus/client_python/issues
Pull requests 39 https://github.com/prometheus/client_python/pulls
Discussions https://github.com/prometheus/client_python/discussions
Actions https://github.com/prometheus/client_python/actions
Projects https://github.com/prometheus/client_python/projects
Wiki https://github.com/prometheus/client_python/wiki
Security and quality 0 https://github.com/prometheus/client_python/security
Insights https://github.com/prometheus/client_python/pulse
Code https://github.com/prometheus/client_python
Issues https://github.com/prometheus/client_python/issues
Pull requests https://github.com/prometheus/client_python/pulls
Discussions https://github.com/prometheus/client_python/discussions
Actions https://github.com/prometheus/client_python/actions
Projects https://github.com/prometheus/client_python/projects
Wiki https://github.com/prometheus/client_python/wiki
Security and quality https://github.com/prometheus/client_python/security
Insights https://github.com/prometheus/client_python/pulse
csmarchbankshttps://github.com/csmarchbanks
prometheus:masterhttps://github.com/prometheus/client_python/tree/master
vokracko:expose-timer-durationhttps://github.com/vokracko/client_python/tree/expose-timer-duration
Conversationhttps://github.com/prometheus/client_python/pull/1166
Commits4 (4)https://github.com/prometheus/client_python/pull/1166/commits
Checkshttps://github.com/prometheus/client_python/pull/1166/checks
Files changedhttps://github.com/prometheus/client_python/pull/1166/files
Expose measured duration on Timer context managerhttps://github.com/prometheus/client_python/pull/1166#top
csmarchbankshttps://github.com/csmarchbanks
prometheus:masterhttps://github.com/prometheus/client_python/tree/master
vokracko:expose-timer-durationhttps://github.com/vokracko/client_python/tree/expose-timer-duration
https://github.com/vokracko
vokrackohttps://github.com/vokracko
Apr 23, 2026https://github.com/prometheus/client_python/pull/1166#issue-4314347817
Please reload this pagehttps://github.com/prometheus/client_python/pull/1166
https://github.com/vokracko
Expose measured duration on Timer context managerhttps://github.com/prometheus/client_python/pull/1166/commits/b26a859a76f357a7f11c6c9ed9e2e301ce1ba083
b26a859https://github.com/prometheus/client_python/pull/1166/commits/b26a859a76f357a7f11c6c9ed9e2e301ce1ba083
https://github.com/vokracko
vokrackohttps://github.com/vokracko
force-pushedhttps://github.com/prometheus/client_python/compare/0ced9a5bfdf21cd1142e0eaa7354d2f4cd84d99e..b26a859a76f357a7f11c6c9ed9e2e301ce1ba083
0ced9a5https://github.com/prometheus/client_python/commit/0ced9a5bfdf21cd1142e0eaa7354d2f4cd84d99e
b26a859https://github.com/prometheus/client_python/commit/b26a859a76f357a7f11c6c9ed9e2e301ce1ba083
Compare https://github.com/prometheus/client_python/compare/0ced9a5bfdf21cd1142e0eaa7354d2f4cd84d99e..b26a859a76f357a7f11c6c9ed9e2e301ce1ba083
April 23, 2026 07:46https://github.com/prometheus/client_python/pull/1166#event-24786426805
https://github.com/csmarchbanks
csmarchbankshttps://github.com/csmarchbanks
Apr 23, 2026 https://github.com/prometheus/client_python/pull/1166#pullrequestreview-4165933642
View reviewed changes https://github.com/prometheus/client_python/pull/1166/files/b26a859a76f357a7f11c6c9ed9e2e301ce1ba083
csmarchbankshttps://github.com/csmarchbanks
https://github.com/prometheus/client_python/pull/1166#pullrequestreview-4165933642
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/prometheus/client_python/pull/1166
docs/content/instrumenting/gauge.mdhttps://github.com/prometheus/client_python/pull/1166/files/b26a859a76f357a7f11c6c9ed9e2e301ce1ba083#diff-3091d57b858faa7382834caa9385a7cce2036b7c22dcfa446d34e3f1035e8c4e
Please reload this pagehttps://github.com/prometheus/client_python/pull/1166
https://github.com/vokracko
vokrackohttps://github.com/vokracko
Apr 24, 2026 https://github.com/prometheus/client_python/pull/1166#pullrequestreview-4168027529
View reviewed changes https://github.com/prometheus/client_python/pull/1166/files/b26a859a76f357a7f11c6c9ed9e2e301ce1ba083
docs/content/instrumenting/summary.mdhttps://github.com/prometheus/client_python/pull/1166/files/b26a859a76f357a7f11c6c9ed9e2e301ce1ba083#diff-3c705431e5067db2154da484dff6ef5c36f13a2974cf9965f0cee02bed6bdf78
Please reload this pagehttps://github.com/prometheus/client_python/pull/1166
docs/content/instrumenting/histogram.mdhttps://github.com/prometheus/client_python/pull/1166/files/b26a859a76f357a7f11c6c9ed9e2e301ce1ba083#diff-6bdb5ce056adb7d441a25594376c9d5e9cda814833256fbcb72972ec4795eb5d
Please reload this pagehttps://github.com/prometheus/client_python/pull/1166
vokrackohttps://github.com/vokracko
April 24, 2026 07:18https://github.com/prometheus/client_python/pull/1166#commits-pushed-b941deb
https://github.com/vokracko
Update docs/content/instrumenting/summary.mdhttps://github.com/prometheus/client_python/pull/1166/commits/b941deb297ee2856b963112f887dd347c05f1fdf
b941debhttps://github.com/prometheus/client_python/pull/1166/commits/b941deb297ee2856b963112f887dd347c05f1fdf
https://github.com/vokracko
Update docs/content/instrumenting/histogram.mdhttps://github.com/prometheus/client_python/pull/1166/commits/76edfd5d24058234eeb66b04fbc666137cd0de01
76edfd5https://github.com/prometheus/client_python/pull/1166/commits/76edfd5d24058234eeb66b04fbc666137cd0de01
https://github.com/vokracko
https://github.com/csmarchbanks
Update docs/content/instrumenting/gauge.mdhttps://github.com/prometheus/client_python/pull/1166/commits/0897499c7e892f89b0ac9f4b96941ba1ae3fcf2e
0897499https://github.com/prometheus/client_python/pull/1166/commits/0897499c7e892f89b0ac9f4b96941ba1ae3fcf2e
https://github.com/vokracko
vokrackohttps://github.com/vokracko
csmarchbankshttps://github.com/csmarchbanks
April 24, 2026 05:18https://github.com/prometheus/client_python/pull/1166#event-24824077561
https://github.com/csmarchbanks
csmarchbankshttps://github.com/csmarchbanks
Apr 24, 2026 https://github.com/prometheus/client_python/pull/1166#pullrequestreview-4173396019
View reviewed changes https://github.com/prometheus/client_python/pull/1166/files/0897499c7e892f89b0ac9f4b96941ba1ae3fcf2e
csmarchbankshttps://github.com/csmarchbanks
https://github.com/prometheus/client_python/pull/1166#pullrequestreview-4173396019
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/prometheus/client_python/pull/1166
https://github.com/csmarchbanks
csmarchbankshttps://github.com/csmarchbanks
e75a74fhttps://github.com/prometheus/client_python/commit/e75a74f7a9000f414ddacefd6797d560d4bb6731
Apr 24, 2026https://github.com/prometheus/client_python/pull/1166#event-24852573437
Please reload this pagehttps://github.com/prometheus/client_python/pull/1166
https://github.co/hiddenchars
https://github.com/prometheus/client_python/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fprometheus%2Fclient_python%2Fpull%2F1166
https://github.com/csmarchbanks
csmarchbanks https://github.com/csmarchbanks
https://github.com/prometheus/client_python/pull/1166/files/0897499c7e892f89b0ac9f4b96941ba1ae3fcf2e
Please reload this pagehttps://github.com/prometheus/client_python/pull/1166
https://github.com/vokracko
https://github.com/csmarchbanks
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.