Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/peek
AgeCommit message (Collapse)Author
2019-08-03Only track Redis calls if Peek is enabledStan Hu
In dev environments, Sidekiq was encountering the message: Circular dependency detected while autoloading constant Gitlab::Profiler This saves some overhead during normal usage.
2019-08-01Fix SystemStackError when Peek bar is active with Rugged callsStan Hu
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
2019-07-30Remove line profiler from performance barSean McGivern
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.
2019-07-26Replace peek-pg with our own implementationSean McGivern
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.
2019-07-24Use a base class for Peek viewsStan Hu
Introduce a `DetailedView` base class, which is inherited by the Gitaly, Redis, and Rugged views. This reduces code duplication.
2019-07-24Hide Rugged data if it doesn't existStan Hu
2019-07-24Add Rugged calls to performance barStan Hu
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.
2019-07-18Fix inconsistency in Redis performance bar statsStan Hu
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
2019-07-09Perform more redactions in Redis performance bar tracesStan Hu
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
2019-07-03Add Redis call details in Peek performance barStan Hu
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.).
2019-04-18Migrate correlation and tracing code to LabKitAndrew Newdigate
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.
2019-02-08Provide a performance bar link to the Jaeger UIAndrew Newdigate
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.
2018-11-20Fix bug where ID is not setZeger-Jan van de Weg
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.
2018-10-15Merge branch '52421-show-canary-no-canary-in-the-performance-bar' into 'master'Sean McGivern
Resolve "Show canary / no-canary in the performance bar" Closes #52421 See merge request gitlab-org/gitlab-ce!22222
2018-10-12Show if the host is a canary host in the perf barSean McGivern
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.
2018-10-08Enable even more frozen string in lib/**/*.rbgfyoung
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.
2018-06-14Resolve "Performance bar Gitaly modal is hard to read"Annabel Gray
2018-05-30Fix UI broken in line profiling modal due to Bootstrap 4Takuya Noguchi
2018-03-19Show Ajax requests in performance barSean McGivern
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.
2018-03-13Capture Gitaly calls that don't go through `migrate`Sean McGivern
2018-03-13Add Gitaly call details to the performance barSean McGivern
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.
2017-10-23Add Gitaly data to the Peek performance barZeger-Jan van de Weg
2017-07-06Improve & fix the performance bar UI and behaviorRémy Coutable
2017-06-09DRYed peek-pg/mysql2 views and update peek-rblineprof monkey-patch fileRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-09Fix Rubocop offenses, improve SQL duration format and changelog entryRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-09Fix replacement of Pygments with RougeRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-09Don't use Pygment,rb, use Rouge instead, and put peek-pg in the :postgres groupRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>