0

When I enable xdebug profiler, open a page in admin, it generates two cachegrind files with almost identical name

cachegrind.out.1498219635_761795.crown__minilio_wp-admin_edit_php
cachegrind.out.1498219639_141988.crown__minilio_wp-admin_edit_php

The output name is defined as

xdebug.profiler_output_name = "cachegrind.out.%u.%H_%R"

I tried another page, got the same result.

Why is that? Which file should I analysis?

0

@Edward,

You've configured the Xdebug profiler output filename in such a way that it overwrites the output file, each time, you run the process.

%u, %H, %R - you mentioned in the output name are called format specifiers.

There are couple of ways to figure out which file you may want to analyze.

  • Use %t (timestamp) format specifier in your output filename so you may know which file to analyze based on the timestamp value.
  • Instead of enabling the profiler throughout, you could trigger the profiler by passing a query arg as described here. This way you will only generate the Xdebug profiler output for the intended page. (Recommended)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.