Skip to content

Commit

Permalink
Move queue-timeout setting to CE and remove dependency on waiting queue
Browse files Browse the repository at this point in the history
  • Loading branch information
KevLehman committed Sep 14, 2023
1 parent 7137a19 commit 4b066c6
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"start": "meteor",
"build:ci": "METEOR_DISABLE_OPTIMISTIC_CACHING=1 meteor build --server-only",
"dev": "meteor --exclude-archs \"web.browser.legacy, web.cordova\"",
"dev": "meteor --inspect --exclude-archs \"web.browser.legacy, web.cordova\"",
"dsv": "meteor npm run dev",
"ha": "meteor npm run ha:start",
"ms": "TRANSPORTER=${TRANSPORTER:-TCP} meteor npm run dev",
Expand Down
50 changes: 50 additions & 0 deletions stats.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env zx

console.log("Fetching stats...");

const files = await globby(["**/*.{js,jsx,ts,tsx}"], {
onlyFiles: true,
followSymbolicLinks: false,
gitignore: true,
});

const stats = { ts: { count: 0, loc: 0 }, js: { count: 0, loc: 0, big: [] } };

for (const file of files) {
switch (path.extname(file)) {
case '.js':
case '.jsx':
stats.js.count++;
stats.js.loc += (await fs.readFile(file, 'utf-8')).split('\n').filter(s => Boolean(s.trim())).length;
const stat = await fs.stat(file);

stats.js.big.unshift({ file, size: stat.size });

break;

case '.ts':
case '.tsx':
stats.ts.count++;
stats.ts.loc += (await fs.readFile(file, 'utf-8')).split('\n').filter(s => Boolean(s.trim())).length;
break;
}
}

console.log(" JavaScript files:", stats.js.count);
console.log(" TypeScript files:", stats.ts.count);
console.log(" Conversion:", (stats.ts.count / (stats.js.count + stats.ts.count) * 100).toFixed(2) + "%");

console.log();

console.log(" JavaScript LOCs:", stats.js.loc);
console.log(" TypeScript LOCs:", stats.ts.loc);
console.log(" Conversion:", (stats.ts.loc / (stats.js.loc + stats.ts.loc) * 100).toFixed(2) + "%");

console.log();

console.log(" JavaScript biggest files:");

stats.js.big.sort((a, b) => b.size - a.size).splice(10);
for (const { file, size } of stats.js.big) {
console.log(" ", file, "(" + (size / 1024).toFixed(2) + "kb)");
}

0 comments on commit 4b066c6

Please sign in to comment.