summaryrefslogtreecommitdiff
path: root/lib/peek
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2022-09-061-1/+5
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2022-03-171-8/+0
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2022-02-241-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-09-211-6/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-08-061-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-07-281-2/+11
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-06-041-3/+16
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-05-261-0/+76
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-05-111-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-03-241-9/+21
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-03-051-8/+12
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-02-101-2/+6
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-01-291-8/+18
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2021-01-221-0/+87
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-10-051-7/+18
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-09-301-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-07-151-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-06-161-1/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-06-041-0/+4
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-05-281-0/+47
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-05-221-0/+47
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-05-211-6/+0
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-242-39/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-272-2/+2
|
* Fix performance bar thresholdsfix-performance-bar-thresholdsSean McGivern2019-09-032-9/+9
| | | | | These were written in seconds but are supposed to be in milliseconds. The total Gitaly time was wrong for the same reason.
* Merge branch 'fix-peek-on-puma' into 'master'Rémy Coutable2019-09-022-6/+2
|\ | | | | | | | | | | | | Fix Peek on Puma Closes #66528 See merge request gitlab-org/gitlab-ce!32213
| * Make performance bar enabled checks consistentSean McGivern2019-08-282-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we called the `peek_enabled?` method like so: prepend_before_action :set_peek_request_id, if: :peek_enabled? Now we don't have a `set_peek_request_id` method, so we don't need that line. However, the `peek_enabled?` part had a side-effect: it would also populate the request store cache for whether the performance bar was enabled for the current request or not. This commit makes that side-effect explicit, and replaces all uses of `peek_enabled?` with the more explicit `Gitlab::PerformanceBar.enabled_for_request?`. There is one spec that still sets `SafeRequestStore[:peek_enabled]` directly, because it is contrasting behaviour with and without a request store enabled. The upshot is: 1. We still set the value in one place. We make it more explicit that that's what we're doing. 2. Reading that value uses a consistent method so it's easier to find in future.
* | Return warnings for performance bar from backendSean McGivern2019-08-284-12/+71
|/ | | | | | | | | | | For each DetailedView subclass, we add a `warnings` array to: 1. The top-level response. 2. Each individual call under the `details` key. We use the `.thresholds` hash on the DetailedView to determine what's a warning. If that hash is empty (the default), then the warnings array will always be empty.
* Only track Redis calls if Peek is enabledsh-disable-redis-peekStan Hu2019-08-021-0/+5
| | | | | | | | In dev environments, Sidekiq was encountering the message: Circular dependency detected while autoloading constant Gitlab::Profiler This saves some overhead during normal usage.
* Fix SystemStackError when Peek bar is active with Rugged callssh-fix-infite-loop-peek-barStan Hu2019-07-311-2/+6
| | | | | | | | | | | | | | | | Peek attempts to serialize results with `to_json`, which calls `ActiveSupport::JSON`. If an object is passed to `to_json` that contains instance variables, `ActiveSupport` will attempt to recursively traverse all variables. The problem is that we can get into an infinite loop if the instance references to an instance that references to something else that points back to the same instance. To avoid this mess, we just call `to_s` on the object. It appears only `Gitlab::Git::Repository` and `::Repository` are the culprits here. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65404
* Remove line profiler from performance barSean McGivern2019-07-302-125/+1
| | | | | | | | | 1. The output isn't great. It can be hard to find hotspots and, even when you do find them, to find why those are hotspots. 2. It uses some jQuery-specific frontend code which we can remove now that we don't have this any more. 3. It's only possible to profile the initial request, not any subsequent AJAX requests.
* Replace peek-pg with our own implementationremove-peek-pgSean McGivern2019-07-265-26/+36
| | | | | | | | | | This uses an ActiveRecord subscriber to get queries and calculate the total query time from that. This means that the total will always be consistent with the queries in the table. It does however mean that we could potentially miss some queries that don't go through ActiveRecord. Making this change also allows us to unify the response JSON a little bit, making the frontend slightly simpler as a result.
* Use a base class for Peek viewssh-peek-cleanupStan Hu2019-07-244-69/+65
| | | | | Introduce a `DetailedView` base class, which is inherited by the Gitaly, Redis, and Rugged views. This reduces code duplication.
* Hide Rugged data if it doesn't existStan Hu2019-07-231-0/+2
|
* Add Rugged calls to performance barStan Hu2019-07-231-0/+56
| | | | | | This will help diagnose the source of excessive I/O from Rugged calls. To implement this, we need to obtain the full list of arguments sent to each request method.
* Fix inconsistency in Redis performance bar statssh-fix-redis-performance-barStan Hu2019-07-171-15/+33
| | | | | | | | | | | | | | | | peek-redis resets its counters at the start of an ActionController notification (`start_processing.action_controller`), which causes it to miss some Redis queries that precede it, such as the database load balancer and Rack Attack queries. This produces inconsistencies in the performance bar between the number of calls and their durations with the actual calls in the detailed view. We fix this by getting rid of peek-redis in favor of consolidating all logic into the `RedisDetailed` view, which tracks Redis queries using `RequestStore`. This has the nice property of removing thread-specific counters as well. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64707
* Perform more redactions in Redis performance bar tracesStan Hu2019-07-091-2/+6
| | | | | | | HMSET and AUTH commands were not properly redacted. This commit does that and adds a test. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64309
* Add Redis call details in Peek performance barsh-improve-redis-peekStan Hu2019-07-021-0/+82
| | | | | | | | | | | | Since Redis timings appear to be increasing in production, this change makes it easier to see what exactly which queries are being called and where. This is done by prepending modules in peek-redis to store the call details. This commit redact values for all SET commands (e.g. HMSET, GETSET, etc.).
* Migrate correlation and tracing code to LabKitan-use-labkitAndrew Newdigate2019-04-181-3/+3
| | | | | | | | | | | | | | | This change is a fairly straightforward refactor to extract the tracing and correlation-id code from the gitlab rails codebase into the new LabKit-Ruby project. The corresponding import into LabKit-Ruby was in https://gitlab.com/gitlab-org/labkit-ruby/merge_requests/1 The code itself remains very similar for now. Extracting it allows us to reuse it in other projects, such as Gitaly-Ruby. This will give us the advantages of correlation-ids and distributed tracing in that project too.
* Provide a performance bar link to the Jaeger UIan-peek-jaegerAndrew Newdigate2019-02-081-0/+13
| | | | | | | | | | Jaeger is a distributed tracing tool. This change adds a "Tracing" link to the performance bar to directly link to a current request in Jaeger. This is useful for two reasons: 1 - it provides affordance to developers that the distributed tracing tool is available, so that it can quickly be discovered. 2 - it allows developers to quickly find a specific trace without having to manually navigate to a second user-interface.
* Fix bug where ID is not setrevert-fd6e3781Zeger-Jan van de Weg2018-11-201-1/+0
| | | | | On HEAD~ we remove the ID from the class, which created a bug. Given we don't need the ID anymore, it has been removed and simplified.
* Merge branch '52421-show-canary-no-canary-in-the-performance-bar' into 'master'Sean McGivern2018-10-151-1/+4
|\ | | | | | | | | | | | | Resolve "Show canary / no-canary in the performance bar" Closes #52421 See merge request gitlab-org/gitlab-ce!22222
| * Show if the host is a canary host in the perf barSean McGivern2018-10-121-1/+4
| | | | | | | | | | | | | | | | If the request came from a canary host, show this in the performance bar by: 1. Adding a bird emoji. 2. Colouring the hostname yellow.
* | Enable even more frozen string in lib/**/*.rbgfyoung2018-10-083-2/+8
|/ | | | | | | | | | | | | | | | | | | | Enables frozen string for the following files: * lib/generators/**/*.rb * lib/gitaly/**/*.rb * lib/google_api/**/*.rb * lib/haml_lint/**/*.rb * lib/json_web_token/**/*.rb * lib/mattermost/**/*.rb * lib/microsoft_teams/**/*.rb * lib/object_storage/**/*.rb * lib/omni_auth/**/*.rb * lib/peek/**/*.rb * lib/rouge/**/*.rb * lib/rspec_flaky/**/*.rb * lib/system_check/**/*.rb Partially addresses #47424.
* Resolve "Performance bar Gitaly modal is hard to read"Annabel Gray2018-06-141-1/+1
|
* Fix UI broken in line profiling modal due to Bootstrap 4Takuya Noguchi2018-05-311-2/+2
|
* Show Ajax requests in performance barSean McGivern2018-03-191-0/+9
| | | | | | | | | | | | | | | | | But first, rewrite the performance bar in Vue: 1. Remove the peek-host gem and replace it with existing code. This also allows us to include the host in the JSON response, rather than in the page HTML. 2. Leave the line profiler parts as here-be-dragons: nicer would be a separate endpoint for these, so we could use them on Ajax requests too. 3. The performance bar is too fiddly to rewrite right now, so apply the same logic to that. Then, add features! All requests made through Axios are able to be tracked. To keep a lid on memory usage, only the first two requests for a given URL are tracked, though. Each request that's tracked has the same data as the initial page load, with the exception of the performance bar and the line profiler, as explained above.
* Capture Gitaly calls that don't go through `migrate`Sean McGivern2018-03-131-3/+4
|
* Add Gitaly call details to the performance barSean McGivern2018-03-131-1/+18
| | | | | The same as the SQL queries, show the details of Gitaly calls in the performance bar, as a modal that can be opened in the same way.
* Add Gitaly data to the Peek performance barZeger-Jan van de Weg2017-10-231-0/+34
|