René's URL Explorer Experiment


Title: improvement(billing): migrate hot path writes away from user_stats by icecrasher321 · Pull Request #4768 · simstudioai/sim · GitHub

Open Graph Title: improvement(billing): migrate hot path writes away from user_stats by icecrasher321 · Pull Request #4768 · simstudioai/sim

X Title: improvement(billing): migrate hot path writes away from user_stats by icecrasher321 · Pull Request #4768 · simstudioai/sim

Description: Summary Migrate billing away from hot path writes to user_stats table. Source of truth becomes usage logs. Type of Change Other: Performance Testing Tested manually Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary Migrate billing away from hot path writes to user_stats table. Source of truth becomes usage logs. Type of Change Other: Performance Testing Tested manually Checklist Code follows proj...

X Description: Summary Migrate billing away from hot path writes to user_stats table. Source of truth becomes usage logs. Type of Change Other: Performance Testing Tested manually Checklist Code follows proj...

Opengraph URL: https://github.com/simstudioai/sim/pull/4768

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0a1b0e43-2cb4-b01c-7e37-298cba52c915
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBC26:2B9F:50E08A:71BAAF:6AFB5E33
html-safe-nonce8c865c164839467ee48a46ee01cfcc72d2ad4e4c71e06b0e558a03ad733a2d73
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzI2OjJCOUY6NTBFMDhBOjcxQkFBRjo2QUZCNUUzMyIsInZpc2l0b3JfaWQiOiIxNTA3MTU4NzIyMzY5NzczMTA3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaccd46d678ba6b68fc06aec7a4ae73ebf9ae2a067407d86118849c50c0b8416cf2
hovercard-subject-tagpull_request:3761047231
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///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/4768/files
twitter:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
og:image:altSummary Migrate billing away from hot path writes to user_stats table. Source of truth becomes usage logs. Type of Change Other: Performance Testing Tested manually Checklist Code follows proj...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/4768/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F4768%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F4768%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/4768/files
Reloadhttps://github.com/simstudioai/sim/pull/4768/files
Reloadhttps://github.com/simstudioai/sim/pull/4768/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
icecrasher321https://github.com/icecrasher321
staginghttps://github.com/simstudioai/sim/tree/staging
improvement/billing-ledgehttps://github.com/simstudioai/sim/tree/improvement/billing-ledge
Conversation 17 https://github.com/simstudioai/sim/pull/4768
Commits 6 https://github.com/simstudioai/sim/pull/4768/commits
Checks 13 https://github.com/simstudioai/sim/pull/4768/checks
Files changed https://github.com/simstudioai/sim/pull/4768/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768/files
improvement(billing): migrate hot path writes away from user_stats https://github.com/simstudioai/sim/pull/4768/files#top
Show all changes 6 commits https://github.com/simstudioai/sim/pull/4768/files
5996a5e improvement(billing): migrate hot path writes away from user_stats May 28, 2026 https://github.com/simstudioai/sim/pull/4768/commits/5996a5e755359c4a4f600089d41f9e4d85c96400
05d3bab fix period start and end sot May 28, 2026 https://github.com/simstudioai/sim/pull/4768/commits/05d3babc5b339abb92face655e9533c0e8d8dedf
c8fa9b7 address comments May 28, 2026 https://github.com/simstudioai/sim/pull/4768/commits/c8fa9b7804ec375f532fa60844909f31354334a9
6656796 Remove stale billing migration May 28, 2026 https://github.com/simstudioai/sim/pull/4768/commits/6656796e1500f8daca5237774ed11d19b39920d9
fdd1da3 Merge remote-tracking branch 'origin/staging' into improvement/billin… May 28, 2026 https://github.com/simstudioai/sim/pull/4768/commits/fdd1da30434e3996138b6b75da661bf3a4f2f936
784fe70 regen migrations May 28, 2026 https://github.com/simstudioai/sim/pull/4768/commits/784fe7056d4b1fe845422787b9c7781ed1f08b32
Clear filters https://github.com/simstudioai/sim/pull/4768/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768/files
route.ts https://github.com/simstudioai/sim/pull/4768/files#diff-f3ec9e3eecbe194c2377f2e873f10be432af241ae9be88b693e9fec6699f335b
route.ts https://github.com/simstudioai/sim/pull/4768/files#diff-5b7748e8b2e0e1a3294a7478e3a854a0ea73cdf70ee0826ec8caf3f9b959f608
route.ts https://github.com/simstudioai/sim/pull/4768/files#diff-ccc69fabd0836100fb492649dc1fa5f9cc064e8803d32c5f4f39d79531f08ec2
route.ts https://github.com/simstudioai/sim/pull/4768/files#diff-08a223d8f6a719c90d783e4d077eddeddb4683e619d18ec27b8e7c9a214b0cc6
workflow-column-execution.ts https://github.com/simstudioai/sim/pull/4768/files#diff-c5198c5c9f8807fd2b09c3cbeef9a5198fa13be7955038f774921624198758e8
usage-monitor.ts https://github.com/simstudioai/sim/pull/4768/files#diff-952d682fdab349d4e9744b11be30f9f96f0396201f6f3c936e2054e387136537
billing-period.ts https://github.com/simstudioai/sim/pull/4768/files#diff-406a04ea2deeae552f72969f579322bab93ccef0fc4356ff62a0c09edd87c2d2
billing.ts https://github.com/simstudioai/sim/pull/4768/files#diff-8f738e7f1e712ec1d83df8990280101dbcade51209f4035b71d2e4ee805f9c81
organization.ts https://github.com/simstudioai/sim/pull/4768/files#diff-a1b396f498b6b82f29e213d9043f8b4903faaec9a50ee37b654298c510bbc77d
usage-log.test.ts https://github.com/simstudioai/sim/pull/4768/files#diff-4f1308a51ea50378ff81bd88b25b7ae18abbbab8272edcaa44de31c8b4ae19d9
usage-log.ts https://github.com/simstudioai/sim/pull/4768/files#diff-61e17bbb06140b8753417feb8b60df7a9170f3216b76d314f14d5210cb9e8431
usage.ts https://github.com/simstudioai/sim/pull/4768/files#diff-41305ed8be4067cf242cf6c6f01c4c2aa537836b1072141acf9adaef0e2a40e8
daily-refresh.ts https://github.com/simstudioai/sim/pull/4768/files#diff-8bf3828d314ee198de779b19aa5d48a88ec28efb76b2dcbb37f97d312e33fc2d
threshold-billing.test.ts https://github.com/simstudioai/sim/pull/4768/files#diff-0a556e94a761637cee781316dd74e4c28f780959e9bbc5c03273c92624f2d682
threshold-billing.ts https://github.com/simstudioai/sim/pull/4768/files#diff-de027d40991a5d3e2d625ad978e500cb0c4a9f25609073260419385cd5070d3a
invoices.test.ts https://github.com/simstudioai/sim/pull/4768/files#diff-c340dec878362883cadfd3a1950a7b6aecb3acfd9a571666173b67355684d2f4
invoices.ts https://github.com/simstudioai/sim/pull/4768/files#diff-cb16770e3a3f7d2310b9e577f462b86fa002021ebe8de3354280a114fdda92da
subscription.ts https://github.com/simstudioai/sim/pull/4768/files#diff-0914e886f10da17ee71ab4583530b28155ab3040cbd9a440c1949adf9e62bd9e
service.ts https://github.com/simstudioai/sim/pull/4768/files#diff-12adff6ec055d413ec20f1debed4ca207b994d23df6de9aa4ef79bf47f2857b2
logger.ts https://github.com/simstudioai/sim/pull/4768/files#diff-c93eef5145bbe011ec0c231c435952a4a5d8f1826332935030595b98b5980ee6
utils.ts https://github.com/simstudioai/sim/pull/4768/files#diff-7b029db7d808b99bfca86f62abe1091505e18af80043833381ad7f439966bf2d
0218_chubby_zzzax.sql https://github.com/simstudioai/sim/pull/4768/files#diff-fafdbe9bac4a6439e40a4fad80627158411ee01748081bbed74ef5872a13112b
0218_snapshot.json https://github.com/simstudioai/sim/pull/4768/files#diff-977ffcb5041a92752ded89e6e05c14285913825f28a559720c11b46d88d303e8
_journal.json https://github.com/simstudioai/sim/pull/4768/files#diff-37150cc65ad16ee6fbc5fa318fc096be7730e16d63eaf863e3df5521b7030649
schema.ts https://github.com/simstudioai/sim/pull/4768/files#diff-9a959e2ce3cb4c86957bbae021d06eae364f7b0cb18964f5873bab53220af928
apps/sim/app/api/billing/update-cost/route.tshttps://github.com/simstudioai/sim/pull/4768/files#diff-f3ec9e3eecbe194c2377f2e873f10be432af241ae9be88b693e9fec6699f335b
View file https://github.com/simstudioai/sim/blob/784fe7056d4b1fe845422787b9c7781ed1f08b32/apps/sim/app/api/billing/update-cost/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/4768/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/4768/files#diff-f3ec9e3eecbe194c2377f2e873f10be432af241ae9be88b693e9fec6699f335b
https://github.com/simstudioai/sim/pull/4768/files#diff-f3ec9e3eecbe194c2377f2e873f10be432af241ae9be88b693e9fec6699f335b
https://github.com/simstudioai/sim/pull/4768/files#diff-f3ec9e3eecbe194c2377f2e873f10be432af241ae9be88b693e9fec6699f335b
https://github.com/simstudioai/sim/pull/4768/files#diff-f3ec9e3eecbe194c2377f2e873f10be432af241ae9be88b693e9fec6699f335b
apps/sim/app/api/mcp/copilot/route.tshttps://github.com/simstudioai/sim/pull/4768/files#diff-5b7748e8b2e0e1a3294a7478e3a854a0ea73cdf70ee0826ec8caf3f9b959f608
View file https://github.com/simstudioai/sim/blob/784fe7056d4b1fe845422787b9c7781ed1f08b32/apps/sim/app/api/mcp/copilot/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/4768/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/4768/files#diff-5b7748e8b2e0e1a3294a7478e3a854a0ea73cdf70ee0826ec8caf3f9b959f608
https://github.com/simstudioai/sim/pull/4768/files#diff-5b7748e8b2e0e1a3294a7478e3a854a0ea73cdf70ee0826ec8caf3f9b959f608
https://github.com/simstudioai/sim/pull/4768/files#diff-5b7748e8b2e0e1a3294a7478e3a854a0ea73cdf70ee0826ec8caf3f9b959f608
https://github.com/simstudioai/sim/pull/4768/files#diff-5b7748e8b2e0e1a3294a7478e3a854a0ea73cdf70ee0826ec8caf3f9b959f608
https://github.com/simstudioai/sim/pull/4768/files#diff-5b7748e8b2e0e1a3294a7478e3a854a0ea73cdf70ee0826ec8caf3f9b959f608
https://github.com/simstudioai/sim/pull/4768/files#diff-5b7748e8b2e0e1a3294a7478e3a854a0ea73cdf70ee0826ec8caf3f9b959f608
apps/sim/app/api/speech/token/route.tshttps://github.com/simstudioai/sim/pull/4768/files#diff-ccc69fabd0836100fb492649dc1fa5f9cc064e8803d32c5f4f39d79531f08ec2
View file https://github.com/simstudioai/sim/blob/784fe7056d4b1fe845422787b9c7781ed1f08b32/apps/sim/app/api/speech/token/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/4768/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/4768/files#diff-ccc69fabd0836100fb492649dc1fa5f9cc064e8803d32c5f4f39d79531f08ec2
https://github.com/simstudioai/sim/pull/4768/files#diff-ccc69fabd0836100fb492649dc1fa5f9cc064e8803d32c5f4f39d79531f08ec2
https://github.com/simstudioai/sim/pull/4768/files#diff-ccc69fabd0836100fb492649dc1fa5f9cc064e8803d32c5f4f39d79531f08ec2
https://github.com/simstudioai/sim/pull/4768/files#diff-ccc69fabd0836100fb492649dc1fa5f9cc064e8803d32c5f4f39d79531f08ec2
https://github.com/simstudioai/sim/pull/4768/files#diff-ccc69fabd0836100fb492649dc1fa5f9cc064e8803d32c5f4f39d79531f08ec2
apps/sim/app/api/wand/route.tshttps://github.com/simstudioai/sim/pull/4768/files#diff-08a223d8f6a719c90d783e4d077eddeddb4683e619d18ec27b8e7c9a214b0cc6
View file https://github.com/simstudioai/sim/blob/784fe7056d4b1fe845422787b9c7781ed1f08b32/apps/sim/app/api/wand/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/4768/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/4768/files#diff-08a223d8f6a719c90d783e4d077eddeddb4683e619d18ec27b8e7c9a214b0cc6
https://github.com/simstudioai/sim/pull/4768/files#diff-08a223d8f6a719c90d783e4d077eddeddb4683e619d18ec27b8e7c9a214b0cc6
https://github.com/simstudioai/sim/pull/4768/files#diff-08a223d8f6a719c90d783e4d077eddeddb4683e619d18ec27b8e7c9a214b0cc6
https://github.com/simstudioai/sim/pull/4768/files#diff-08a223d8f6a719c90d783e4d077eddeddb4683e619d18ec27b8e7c9a214b0cc6
https://github.com/simstudioai/sim/pull/4768/files#diff-08a223d8f6a719c90d783e4d077eddeddb4683e619d18ec27b8e7c9a214b0cc6
apps/sim/background/workflow-column-execution.tshttps://github.com/simstudioai/sim/pull/4768/files#diff-c5198c5c9f8807fd2b09c3cbeef9a5198fa13be7955038f774921624198758e8
View file https://github.com/simstudioai/sim/blob/784fe7056d4b1fe845422787b9c7781ed1f08b32/apps/sim/background/workflow-column-execution.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/4768/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/4768/files#diff-c5198c5c9f8807fd2b09c3cbeef9a5198fa13be7955038f774921624198758e8
https://github.com/simstudioai/sim/pull/4768/files#diff-c5198c5c9f8807fd2b09c3cbeef9a5198fa13be7955038f774921624198758e8
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4768/files
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.