}
public storePerformanceStatistics(performanceStatistics: Statistics): void {
- const performanceJSONFilePath = path.join(path.resolve(__dirname, '../../../'), this.storageURI.pathname.replace(/^\/|\/$/g, ''));
+ const performanceJSONFilePath = path.join(path.resolve(__dirname, '../../../'), this.storageURI.pathname.replace(/(?:^\/)|(?:\/$)/g, ''));
fs.appendFile(performanceJSONFilePath, JSON.stringify(performanceStatistics, null, 2), 'utf8', (err) => {
if (err) {
FileUtils.handleFileException(this.logPrefix, 'Performance measurements', performanceJSONFilePath, err);