-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the "query_stats" option and disable it
Likely fixes: * airbrake/airbrake#994 (Memory usage) * airbrake/airbrake#990 (CPU and Average Response increased after version 7) The SQL query collection feature is still in alpha and we display it only for certain accounts. Therefore, the vast majority of our customers cannot even see what airbrake-ruby collects. Since the feature is still in alpha, it is currently buggy (in a sense that it consumes too much memory & CPU power). I profiled a Rails app on a certain route with `memory_profiler` for Rack Mini Profiler and I can see a significant increase of memory usage. === performance_stats = false ``` Total allocated: 12434583 bytes (145711 objects) Total retained: 508023 bytes (3346 objects) allocated memory by gem 264 airbrake/lib ``` === performance_stats = true && query_stats = false ``` Total allocated: 12461685 bytes (146002 objects) Total retained: 508431 bytes (3353 objects) allocated memory by gem 3816 airbrake/lib ``` === performance_stats = true && query_stats = true ``` Total allocated: 186535107 bytes (1447037 objects) Total retained: 35810972 bytes (349882 objects) allocated memory by gem 709720 airbrake/lib ``` According to these reports memory usage ramped up by 700% compared to the route stats feature. The route stats feature itself is already quite expensive and the query collection feature is just too much.
- Loading branch information
Showing
6 changed files
with
98 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters