Profiling JavaScript Code
What type of profiling setup does this code implement?
// Production profiling setup
if (process.env.ENABLE_MONITORING) {
const data = {};
performance.observe('measure', (list) => {
list.getEntries().forEach(entry => {
data[entry.name] = (data[entry.name] || []).concat(entry.duration);
});
});
}