dankgrinder 7.75.0 → 7.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/grinder.js +6 -2
- package/package.json +1 -1
package/lib/grinder.js
CHANGED
|
@@ -129,6 +129,8 @@ let API_URL = '';
|
|
|
129
129
|
let REDIS_URL = process.env.REDIS_URL || '';
|
|
130
130
|
let redis = null;
|
|
131
131
|
let workers = [];
|
|
132
|
+
let startTime = 0;
|
|
133
|
+
let shutdownCalled = false;
|
|
132
134
|
|
|
133
135
|
// ── Cluster Mode Config ──────────────────────────────────────
|
|
134
136
|
// NODE_ID uniquely identifies this process in a multi-node cluster.
|
|
@@ -2739,6 +2741,7 @@ async function start(apiKey, apiUrl, opts = {}) {
|
|
|
2739
2741
|
API_KEY = apiKey;
|
|
2740
2742
|
API_URL = apiUrl || process.env.DANKGRINDER_URL || 'http://localhost:3000';
|
|
2741
2743
|
const CLOUD_MODE = opts.cloud === true;
|
|
2744
|
+
startTime = Date.now();
|
|
2742
2745
|
|
|
2743
2746
|
if (CLOUD_MODE) {
|
|
2744
2747
|
// In cloud mode, API_KEY is the CLOUD_ADMIN_KEY — not used for user auth.
|
|
@@ -3049,9 +3052,10 @@ async function start(apiKey, apiUrl, opts = {}) {
|
|
|
3049
3052
|
sigintHandled = true;
|
|
3050
3053
|
shutdownCalled = true;
|
|
3051
3054
|
setDashboardActive(false);
|
|
3052
|
-
process.stdout.write(
|
|
3055
|
+
process.stdout.write('\x1b[?25h'); // show cursor
|
|
3053
3056
|
|
|
3054
|
-
const
|
|
3057
|
+
const tw = process.stdout.columns || 80;
|
|
3058
|
+
const sepBar = rgb(139, 92, 246) + c.bold + '─'.repeat(tw - 4) + c.reset;
|
|
3055
3059
|
console.log('');
|
|
3056
3060
|
console.log(` ${rgb(251, 191, 36)}${c.bold}Session Summary${c.reset}`);
|
|
3057
3061
|
console.log(sepBar);
|