Small refactoring

This commit is contained in:
2023-11-30 13:37:51 +01:00
parent acf1cf2bf4
commit 9326923b72
2 changed files with 32 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ let sent = 0;
let success = 0;
let failed = 0;
const sendTimer = new NanoTimer();
const metricManager = new MetricManager(options);
function startInterval(session, sessionLogger, metrics) {
if (!metrics.progress && options.bars === true) {
@@ -95,8 +96,6 @@ function startInterval(session, sessionLogger, metrics) {
);
}
const metricManager = new MetricManager(options);
for (let i = 0; i < options.sessions; i++) {
const sessionLogger = createSessionLogger(options, i);
sessionLogger.info(`Connecting to ${options.host}:${options.port}...`);