ludofleury / GuzzleBundle

Debug your API Calls with a Symfony web profiler for guzzle
http://ludofleury.github.io/GuzzleBundle/
MIT License
82 stars 21 forks source link

With multiple sub-request, calls count is invalid #1

Closed BenoitLeveque closed 11 years ago

BenoitLeveque commented 11 years ago

With multiple sub-request, calls count is invalid we need to reset data for each symfony request.

ludofleury commented 11 years ago

hey, thanks for your PR, just a word about the misbehavior and the new behavior: you mean before this PR, you had the whole metrics for all subrequest or you had only the metrics for lastest call ?

BenoitLeveque commented 11 years ago

Before this PR i saw 30 calls instead of 10 calls (with 1 request and 2 subrequest)

ludofleury commented 11 years ago

I had to investigate on it and.... to add test. Seriously. thanks much for your contribution.

ludofleury commented 11 years ago

I assume that a sub request re-use the same profiler collectors (this make sense since it's handled with the same kernel)and the collect() method is called on the master and on the sub request. Yet, I will go deeper in the few days about the "collect()" call in a sub request scope to see if any weird behavior could occurs. i'll keep in touch with you.

ludofleury commented 11 years ago

Ok, I'll get it and tried to fix this with DIC scope but the solution is not really handy. So for you're PR do the job about sub request (forward & sub rendering), A cool feature may be to split the http calls by Symfony request (master/sub). What do you think about this ?

BenoitLeveque commented 11 years ago

Sound good

ludofleury commented 9 years ago

@BenoitLeveque PR tagged as stable in the version 1.1.0