jonaswouters / XhprofBundle

XHProf bundle for Symfony 2
210 stars 49 forks source link

Add unexpected end of script support #71

Open JesusTheHun opened 9 years ago

JesusTheHun commented 9 years ago

Hello,

I've installed this bundle to figure some memory issues leading to out of memory errors, and I realized that the bundle store the data on kernel response event, which never occurs in case of unexpected end of the script. So here is my small PR, adding support for these cases. What do you think ?

JesusTheHun commented 9 years ago

I don't know how to deal with your tests stuff :/ EDIT : I've locally added the function calls in tests, but since it is in a register_shutdown_function() closure, it fails. I don't think it's supported by prophecy, is it ?

jonaswouters commented 9 years ago

@JesusTheHun Just add the IsCollecting should be call check to this test test_on_core_request_with_request_query_argument_configured_and_provided

JesusTheHun commented 9 years ago

I've pushed my local tests, but as you will see, it fails because as I said, the call is contained into a closure.