Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Chron's avatar
Level 6

How to test performance in Vue?

I'm trying to test the performance of a code block. I don't know if this is the "right way" of doing it.

var start;

const alert = computed(() => {
   start = performance.now()
   const test = {
      alertClass: props.alertClass,
   }
   return test
})

onMounted(() => {
   console.log(alert.value)
   var end = performance.now()
   console.log(end - start)
})
0 likes
1 reply

Please or to participate in this conversation.