Why is wincachegrind giving me the wrong cumulative time for curl_exec?

84 views Asked by At

I was wracking my brains over this apparent discrepancy:

  • My page is taking about 8 seconds to load.
  • Wincachegrind says my page is only taking .8 seconds

I finally loaded the same cachegrind file in kcachegrind and got results inline with the actual page load.

So why is wincachegrind giving me an incorrect value for the curl call? It looks like all the values over 1 second are incorrectly reported by a factor of 10..?

https://i.stack.imgur.com/LgrzF.jpg

wincachegrind vs kcachegrind

1

There are 1 answers

0
rjdown On BEST ANSWER

I realise this is an old question, and you might have found the answer by now! But it came up fairly high in a Google search, so I thought I'd put an answer in for others.

There is a bug in some versions of Wincachegrind that means all times only show at 10% of their true value. This was fixed in Wincachegrind version 1.0.0.14, but somehow the fix got reverted and so it's still present in the most recent official version (1.1.0.16)

The project has been abandoned by the developer so it will likely never be fixed again. In fact, there is an open issue created in 2015 that remains unresolved.

Options are:

  • Put up with it and remember to multiply everything by 10
  • Switch to an older fixed version e.g. 1.0.0.14
  • Use a different tool e.g. KCachegrind, QCachegrind, Webgrind or an IDE-specific plugin