Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ docs/
streamlabs-build.app

tests/osn-tests/*-cache-local.zip

profile-long-calls/dist/
!profile-long-calls/.vscode
profile-long-calls/long_calls.db*
31 changes: 31 additions & 0 deletions profile-long-calls/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Program",
"program": "long-calls-analyzer.ts",
"request": "launch",
"runtimeArgs": ["-r", "ts-node/register"],
"skipFiles": [
"<node_internals>/**"
],
"args": [
"--age",
"24h",
],
"type": "node"
},
{
"name": "Attach to Process",
"processId": "${command:PickProcess}",
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
}
]
}
6 changes: 6 additions & 0 deletions profile-long-calls/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
approvedGitRepositories:
- "**"

enableScripts: true

nodeLinker: node-modules
17 changes: 17 additions & 0 deletions profile-long-calls/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## About
Analyzes the long_calls.txt file produced by obs-studio-node and helps identify which methods take the longest.

## Detailed breakdown
* Mass download hundreds of latest user caches from AWS bucket streamlabs-obs-user-cache
* Extracts long_calls.txt and load its data into a database, with minimal filtering; for example, avoiding counting files from the same user multiple times.
* Run some basic statistics to identify which IPC calls cause the most trouble and are worth checking if we want to improve performance.

## Requirements
Node 22, Access to AWS S3 bucket

## How to run
```
yarn install
yarn build
node dist/long-calls-analyzer.js --age 1w
```
Loading
Loading