Skip to content

Commit 424475a

Browse files
committed
submit program to gather data from user submitted long_call.txt
* Analyzes the long_calls.txt file produced by obs-studio-node and helps identify which methods takes the longest. * Asana: https://app.asana.com/1/1083097041131/project/1207748235152476/task/1214564097102925
1 parent 7df3538 commit 424475a

7 files changed

Lines changed: 564 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ docs/
2727
streamlabs-build.app
2828

2929
tests/osn-tests/*-cache-local.zip
30+
31+
profile-long-calls/dist/
32+
!profile-long-calls/.vscode
33+
profile-long-calls/long_calls.db*
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Launch Program",
9+
"program": "long-calls-analyzer.ts",
10+
"request": "launch",
11+
"runtimeArgs": ["-r", "ts-node/register"],
12+
"skipFiles": [
13+
"<node_internals>/**"
14+
],
15+
"args": [
16+
"--age",
17+
"24h",
18+
],
19+
"type": "node"
20+
},
21+
{
22+
"name": "Attach to Process",
23+
"processId": "${command:PickProcess}",
24+
"request": "attach",
25+
"skipFiles": [
26+
"<node_internals>/**"
27+
],
28+
"type": "node"
29+
}
30+
]
31+
}

profile-long-calls/.yarnrc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
approvedGitRepositories:
2+
- "**"
3+
4+
enableScripts: true
5+
6+
nodeLinker: node-modules

profile-long-calls/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## About
2+
Analyzes the long_calls.txt file produced by obs-studio-node and helps identify which methods takes the longest.
3+
4+
## Detailed breakdown
5+
* Mass download hundreds of latest user caches from AWS bucket streamlabs-obs-user-cache
6+
* 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.
7+
* Run some basic statistics to identify which IPC calls cause the most trouble and are worth checking if we want to improve performance.
8+
9+
## Requirements
10+
Node 18, Access to AWS S3 bucket
11+
12+
## How to run
13+
```
14+
yarn install
15+
yarn build
16+
ts-node long-calls-analyzer.js --age 1w
17+
```

0 commit comments

Comments
 (0)