removing debug statements for PR review

This commit is contained in:
Scott Bell 2024-10-28 09:24:23 +01:00
parent 9ca489cf12
commit 55063a0045
3 changed files with 1 additions and 25 deletions

View File

@ -27,6 +27,7 @@ import {
import { expect, test } from '../../../../pluginFixtures.js'; import { expect, test } from '../../../../pluginFixtures.js';
test.describe('Comps', () => { test.describe('Comps', () => {
test.use({ failOnConsoleError: false });
test.beforeEach(async ({ page }) => { test.beforeEach(async ({ page }) => {
// Open a browser, navigate to the main page, and wait until all networkevents to resolve // Open a browser, navigate to the main page, and wait until all networkevents to resolve
await page.goto('./', { waitUntil: 'domcontentloaded' }); await page.goto('./', { waitUntil: 'domcontentloaded' });

View File

@ -115,10 +115,6 @@ export default class CompsManager extends EventEmitter {
const loadVersion = ++this.#loadVersion; const loadVersion = ++this.#loadVersion;
if (!_.isEqual(this.#telemetryOptions, telemetryOptions)) { if (!_.isEqual(this.#telemetryOptions, telemetryOptions)) {
console.debug(
`😩 Reloading comps manager ${this.#domainObject.name} due to telemetry options change.`,
telemetryOptions
);
this.#destroy(); this.#destroy();
} }
@ -131,9 +127,6 @@ export default class CompsManager extends EventEmitter {
await this.#loadComposition(); await this.#loadComposition();
// Check if a newer load has been initiated // Check if a newer load has been initiated
if (loadVersion !== this.#loadVersion) { if (loadVersion !== this.#loadVersion) {
console.debug(
`🔄 Reloading comps manager in composition wait ${this.#domainObject.name} due to newer load.`
);
await this.#currentLoadPromise; await this.#currentLoadPromise;
return; return;
} }
@ -145,16 +138,9 @@ export default class CompsManager extends EventEmitter {
await this.#startListeningToUnderlyingTelemetry(); await this.#startListeningToUnderlyingTelemetry();
// Check again for newer load // Check again for newer load
if (loadVersion !== this.#loadVersion) { if (loadVersion !== this.#loadVersion) {
console.debug(
`🔄 Reloading comps manager in telemetry wait ${this.#domainObject.name} due to newer load.`
);
await this.#currentLoadPromise; await this.#currentLoadPromise;
return; return;
} }
console.debug(
`✅ Comps manager ${this.#domainObject.name} is ready.`,
this.#telemetryCollections
);
this.#loaded = true; this.#loaded = true;
} }
})(); })();
@ -259,8 +245,6 @@ export default class CompsManager extends EventEmitter {
const imputedDatum = this.#getImputedDataUsingLOCF(fakeData, telemetryCollection); const imputedDatum = this.#getImputedDataUsingLOCF(fakeData, telemetryCollection);
if (imputedDatum) { if (imputedDatum) {
alignedValues.push(imputedDatum); alignedValues.push(imputedDatum);
} else {
console.debug(`🚨 Missing data for ${keyString} at ${timestamp}`);
} }
}); });

View File

@ -80,11 +80,6 @@ export default class CompsTelemetryProvider {
parameters, parameters,
callbackID callbackID
}; };
console.debug(
`📝 Requesting calculation for ${domainObject.name} with callback ID ${callbackID}:`,
options,
payload
);
this.#sharedWorker.port.postMessage(payload); this.#sharedWorker.port.postMessage(payload);
}); });
}); });
@ -130,9 +125,6 @@ export default class CompsTelemetryProvider {
size: 1 size: 1
}; };
specificCompsManager.load(telemetryOptions); specificCompsManager.load(telemetryOptions);
console.debug(
`📝 Starting subscription for ${domainObject.name} with callback ID ${callbackID}`
);
return () => { return () => {
delete this.#subscriptionCallbacks[callbackID]; delete this.#subscriptionCallbacks[callbackID];
specificCompsManager.stopListeningToUnderlyingTelemetry(); specificCompsManager.stopListeningToUnderlyingTelemetry();
@ -171,7 +163,6 @@ export default class CompsTelemetryProvider {
console.error('📝 Error calculating request:', event.data); console.error('📝 Error calculating request:', event.data);
this.#requestPromises[callbackID].resolve([]); this.#requestPromises[callbackID].resolve([]);
} else { } else {
console.debug(`🧮 Calculation request result for ${callbackID}:`, result);
this.#requestPromises[callbackID].resolve(result); this.#requestPromises[callbackID].resolve(result);
} }
delete this.#requestPromises[callbackID]; delete this.#requestPromises[callbackID];