Open Drache91 opened 7 years ago
@Drache91 If you have a solution that fixes this issue. Make a pull request and I can merge it in.
In regards to your snakeviz queries question, check your SILKY_META
setting. It might be set to true.
Ok, I made a pull request.
Also, the problem with snakeviz remains even with SILKY_META
set to False
.
But I guess that's a problem with snakeviz.
KCacheGrind (or QCacheGrind for my system) shows the correct data.
@Drache91 Glad there are alternatives for visualizing the profiler besides snakeviz. Will keep an internal note about them.
When generating binary profiles with
and revcieving multiple requests at once, the generated profiles for all the requests are the same. It's allways the profile of the request that finished first.
So, as an example, I get 3 request in a very fast fashion (only about 10ms apart). Request 2 finishes first, then request 3 and request 1 finishes last. The profiles of these request will all be the profile of request 2.
This could be because the profiler within DataCollector is not saved in the threat local storage.
So I modified all lines with
self.pythonprofiler
toself.local.pythonprofiler
and addedself.local.pythonprofiler = None
to_configure
, so it looks like this:And the other modified functions:
Below i copied the conent of the file /silk/views/collector.py where i fixed it, so the requests now generate their own profiles. Problem now is that snakeviz is not visualitzing the correct part of it. It seems like it's vizualizing from
num_queries = len(self.silk_queries)
indef _record_meta_profiling(self):
The profile itself contains everything it should containg though.Everything was tested and modified in commit a062fa723cf37d7d102a7d393d52507971d9657f Testing machine runs Windows 10.