-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
We should avoid calling the middleware's action (e.g. UploadAction) if there are no samples in the profile.
app_profiler/lib/app_profiler/middleware.rb
Lines 41 to 45 in 80df44c
| action.call( | |
| profile, | |
| response: response, | |
| autoredirect: params.autoredirect, | |
| ) |
When a request returns quickly during a profiling session, there is a possibility in which the profiler could not sample anything in time. There won't be any samples for those profiles, and speedscope won't recognize them either. We should drop such profiles.
One way to do so would be to return nil if the value for samples is 0 whenever profiling results are retrieved:
app_profiler/lib/app_profiler/profiler.rb
Line 30 in 80df44c
| return unless stackprof_profile |
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers