djmuted commited on
Commit
a9a4246
1 Parent(s): 3e7e8b4

Consistent time unit

Browse files
Files changed (1) hide show
  1. src/index.js +1 -1
src/index.js CHANGED
@@ -15,7 +15,7 @@ app.get('/', (req, res) => {
15
  uptime: (new Date() - started) / 1000,
16
  slacks: config.slacks.length || 0,
17
  prompts: stats.prompts.length || 0,
18
- avgTime: stats.prompts.reduce((acc, curr) => acc + curr.time, 0) / stats.prompts.length || 0,
19
  avgInputLength: stats.prompts.reduce((acc, curr) => acc + curr.inputLength, 0) / stats.prompts.length || 0,
20
  avgOutputLength: stats.prompts.reduce((acc, curr) => acc + curr.outputLength, 0) / stats.prompts.length || 0,
21
  });
 
15
  uptime: (new Date() - started) / 1000,
16
  slacks: config.slacks.length || 0,
17
  prompts: stats.prompts.length || 0,
18
+ avgTime: (stats.prompts.reduce((acc, curr) => acc + curr.time, 0) / stats.prompts.length || 0) / 1000,
19
  avgInputLength: stats.prompts.reduce((acc, curr) => acc + curr.inputLength, 0) / stats.prompts.length || 0,
20
  avgOutputLength: stats.prompts.reduce((acc, curr) => acc + curr.outputLength, 0) / stats.prompts.length || 0,
21
  });