Skip to content

Commit 302ffbf

Browse files
feat: add dump processing on server restart (#124)
* refactor it ut framework * mockable firehose/dynamo interfaces
1 parent 7a5a1d3 commit 302ffbf

File tree

86 files changed

+11560
-7848
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+11560
-7848
lines changed

bin/extract.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
// aws s3 cp s3://rtcstats-server-bucket/023e3641-6e68-46c0-8c79-5b436b0e41bc.gz - | gunzip | ./bin/extract.js /dev/stdin
55
const { EOL } = require('os');
66

7-
const FeatureExtractor = require('../src/features/FeatureExtractor');
7+
const { extractDumpIdFromPath } = require('../src/test/jest/test-utils');
8+
const DumpFileProcessor = require('../src/worker-pool/DumpFileProcessor');
9+
810

911
const dumpMeta = {
10-
dumpPath: process.argv[2]
12+
dumpPath: process.argv[2],
13+
clientId: extractDumpIdFromPath(process.argv[2])
1114
};
1215

13-
new FeatureExtractor(dumpMeta).extract()
16+
const dumpFileProcessor = new DumpFileProcessor(dumpMeta);
17+
18+
dumpFileProcessor.processStatsFile()
1419
.then(results => process.stdout.write(`${JSON.stringify(results)}${EOL}`));

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rtcstats-server",
3-
"version": "2.24.9",
3+
"version": "2.25.4",
44
"description": "The rtcstats-server represents the server side component of the rtcstats ecosystem, the client side being https://github.com/jitsi/rtcstats which collects and sends WebRTC related statistics.",
55
"main": "websocket.js",
66
"private": true,

0 commit comments

Comments
 (0)