inner_performance 0.1.4 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -9
  3. data/Rakefile +5 -5
  4. data/app/controllers/inner_performance/dashboard_controller.rb +5 -5
  5. data/app/controllers/inner_performance/events_controller.rb +21 -4
  6. data/app/controllers/inner_performance/frontends_controller.rb +32 -0
  7. data/app/frontend/inner_performance/vendor/bootstrap.min.css +5 -0
  8. data/app/helpers/inner_performance/application_helper.rb +2 -4
  9. data/app/jobs/inner_performance/cleanup_job.rb +7 -2
  10. data/app/jobs/inner_performance/save_event_job.rb +13 -3
  11. data/app/mailers/inner_performance/application_mailer.rb +2 -2
  12. data/app/models/inner_performance/event.rb +3 -1
  13. data/app/models/inner_performance/trace.rb +7 -0
  14. data/app/models/inner_performance/traces/db.rb +22 -0
  15. data/app/models/inner_performance/traces/view.rb +22 -0
  16. data/app/services/inner_performance/trace_for_insert_initializer.rb +19 -0
  17. data/app/views/inner_performance/events/_event.html.erb +1 -1
  18. data/app/views/inner_performance/events/index.html.erb +24 -5
  19. data/app/views/inner_performance/events/show.html.erb +32 -0
  20. data/app/views/inner_performance/traces/dbs/_db.html.erb +10 -0
  21. data/app/views/inner_performance/traces/views/_view.html.erb +9 -0
  22. data/app/views/layouts/inner_performance/application.html.erb +1 -3
  23. data/config/routes.rb +6 -2
  24. data/db/migrate/20241123121600_create_inner_performance_events.rb +8 -8
  25. data/db/migrate/20241124111458_add_type_to_inner_performance_events.rb +1 -1
  26. data/db/migrate/20241218082041_remove_default_value_from_inner_performance_events_properties.rb +5 -0
  27. data/db/migrate/20250214162622_create_inner_performance_traces.rb +13 -0
  28. data/lib/inner_performance/configuration.rb +19 -5
  29. data/lib/inner_performance/current_request.rb +37 -0
  30. data/lib/inner_performance/engine.rb +7 -2
  31. data/lib/inner_performance/version.rb +1 -1
  32. data/lib/inner_performance.rb +46 -10
  33. metadata +17 -24
  34. data/app/assets/config/inner_performance_manifest.js +0 -1
  35. data/app/assets/stylesheets/inner_performance/application.css +0 -15
@@ -2,16 +2,26 @@
2
2
 
3
3
  module InnerPerformance
4
4
  class SaveEventJob < ApplicationJob
5
- def perform(type:, created_at:, event:, name:, duration:, db_runtime:, properties: {})
6
- InnerPerformance::Event.create(
5
+ def perform(type:, created_at:, event:, name:, duration:, db_runtime:, properties: {}, traces: [])
6
+ event = InnerPerformance::Event.create(
7
7
  type: type,
8
8
  created_at: created_at,
9
9
  event: event,
10
10
  name: name,
11
11
  duration: duration,
12
12
  db_runtime: db_runtime,
13
- properties: properties
13
+ properties: properties,
14
14
  )
15
+
16
+ if InnerPerformance.configuration.traces_enabled && traces.any?
17
+ InnerPerformance::Trace.insert_all(
18
+ traces.map do |trace|
19
+ InnerPerformance::TraceForInsertInitializer.new(trace: trace, event: event)
20
+ end,
21
+ )
22
+ end
23
+
24
+ InnerPerformance::CleanupJob.perform_later if InnerPerformance.configuration.cleanup_immediately
15
25
  end
16
26
  end
17
27
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module InnerPerformance
4
4
  class ApplicationMailer < ActionMailer::Base
5
- default from: 'from@example.com'
6
- layout 'mailer'
5
+ default from: "from@example.com"
6
+ layout "mailer"
7
7
  end
8
8
  end
@@ -2,10 +2,12 @@
2
2
 
3
3
  module InnerPerformance
4
4
  class Event < ApplicationRecord
5
+ has_many :traces, dependent: :destroy
6
+
5
7
  serialize :properties, coder: JSON
6
8
 
7
9
  def self.ransackable_attributes(_auth_object = nil)
8
- %w[created_at db_runtime duration event format id name]
10
+ ["created_at", "db_runtime", "duration", "event", "format", "id", "name"]
9
11
  end
10
12
 
11
13
  def self.ransackable_associations(_auth_object = nil)
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module InnerPerformance
4
+ class Trace < ApplicationRecord
5
+ belongs_to :event
6
+ end
7
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module InnerPerformance
4
+ module Traces
5
+ class Db < InnerPerformance::Trace
6
+ store :payload, accessors: [:sql, :name], coder: JSON, prefix: true
7
+
8
+ class << self
9
+ def initialize_for_insert(trace:, event:)
10
+ {
11
+ type: name,
12
+ name: trace[:name],
13
+ payload: trace[:payload].to_json,
14
+ duration: trace[:duration],
15
+ created_at: trace[:time],
16
+ event_id: event.id,
17
+ }
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module InnerPerformance
4
+ module Traces
5
+ class View < InnerPerformance::Trace
6
+ store :payload, accessors: [:identifier], coder: JSON, prefix: true
7
+
8
+ class << self
9
+ def initialize_for_insert(trace:, event:)
10
+ {
11
+ type: name,
12
+ name: trace[:name],
13
+ payload: trace[:payload].to_json,
14
+ duration: trace[:duration],
15
+ created_at: Time.at(trace[:time]),
16
+ event_id: event.id,
17
+ }
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module InnerPerformance
4
+ class TraceForInsertInitializer
5
+ class << self
6
+ def new(trace:, event:)
7
+ class_from_group(trace).initialize_for_insert(trace: trace, event: event)
8
+ end
9
+
10
+ def class_from_group(trace)
11
+ case trace[:group]
12
+ when :db then InnerPerformance::Traces::Db
13
+ when :view then InnerPerformance::Traces::View
14
+ else raise ArgumentError, "Invalid trace group: #{trace[:group]}"
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  <tr>
2
- <td><%= link_to event.name, events_path(q: { name_eq: event.name }) %></td>
2
+ <td><%= link_to event.name, event_path(event) %></td>
3
3
  <td class="<%= row_class_from_duration(event.duration) %>">
4
4
  <%= number_to_human(event.duration, units: { unit: 'ms' }) %>
5
5
  </td>
@@ -1,10 +1,21 @@
1
1
  <%= search_form_for @q, class: 'mb-4' do |f| %>
2
2
  <div class="row align-items-end">
3
3
  <div class="col-10">
4
- <%= f.label :name_eq, class: 'form-label' %>
5
- <%= f.select :name_eq, options_for_select(InnerPerformance::Event.all.pluck(:name).uniq, f.object.name_eq),
6
- { include_blank: true },
7
- { class: 'form-select' } %>
4
+ <div class="d-flex gap-4">
5
+ <div>
6
+ <%= f.label :name_eq, class: 'form-label' %>
7
+ <%= f.select :name_eq, options_for_select(InnerPerformance::Event.all.pluck(:name).uniq, f.object.name_eq),
8
+ { include_blank: true },
9
+ { class: 'form-select' } %>
10
+ </div>
11
+
12
+ <div>
13
+ <%= f.label :event_eq, class: 'form-label' %>
14
+ <%= f.select :event_eq, options_for_select(InnerPerformance::Event.all.pluck(:event).uniq, f.object.event_eq),
15
+ { include_blank: true },
16
+ { class: 'form-select' } %>
17
+ </div>
18
+ </div>
8
19
  </div>
9
20
 
10
21
  <div class="col-2 text-end">
@@ -25,4 +36,12 @@
25
36
  </tbody>
26
37
  </table>
27
38
 
28
- <%== pagy_nav(@pagy) if @pagy.pages > 1 %>
39
+ <div style="text-align: center;">
40
+ <% if @current_page > 1 %>
41
+ <%= link_to "Prev Page", params.to_unsafe_h(page: @current_page - 1), style: "margin-right: 20px;" %>
42
+ <% end %>
43
+
44
+ <% if @events.size == InnerPerformance::EventsController::RESULTS_PER_PAGE %>
45
+ <%= link_to "Next Page", params.to_unsafe_h(page: @current_page + 1) %>
46
+ <% end %>
47
+ </div>
@@ -0,0 +1,32 @@
1
+ <div class="row mb-5">
2
+ <div class="col-lg-6 col-12 mb-4 mb-lg-0">
3
+ <h1 class="h3"><%= @event.name %></h1>
4
+ <div class="text-secondary">
5
+ <%= @event.created_at %> • <code><%= @event.event %></code>
6
+ </div>
7
+ </div>
8
+
9
+ <div class="col-lg-auto col-12 d-flex ms-auto gap-5">
10
+ <div>
11
+ <div class="text-uppercase small text-secondary">Duration</div>
12
+ <span><%= number_to_human(@event.duration, units: { unit: 'ms' }) %></span>
13
+ </div>
14
+
15
+ <div>
16
+ <div class="text-uppercase small text-secondary">Db Runtime</div>
17
+ <span><%= number_to_human(@event.db_runtime, units: { unit: 'ms' }) %></span>
18
+ </div>
19
+ </div>
20
+ </div>
21
+
22
+ <% if InnerPerformance.configuration.traces_enabled %>
23
+ <h4 class="mb-3"><%= pluralize(@traces.count, 'trace') %></h4>
24
+ <% @traces.each do |trace| %>
25
+ <%= render trace, trace: trace %>
26
+ <% end %>
27
+ <% else %>
28
+ <h4 class="mb-3">Traces</h4>
29
+ <div class="card">
30
+ <div class="card-body bg-light text-center text-secondary">Traces tracking is currently disabled.</div>
31
+ </div>
32
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <div class="card mb-3">
2
+ <div class="card-header d-flex">
3
+ <code><%= trace.name %></code>
4
+ <div class="ms-auto font-monospace small text-muted"><%= trace.duration %> ms</div>
5
+ </div>
6
+ <div class="card-body">
7
+ <div class="fw-semibold mb-1"><%= trace.payload_name %></div>
8
+ <div class="text-muted font-monospace small"><%= trace.payload_sql %></div>
9
+ </div>
10
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="card mb-3">
2
+ <div class="card-header d-flex">
3
+ <code><%= trace.name %></code>
4
+ <div class="ms-auto font-monospace small text-muted"><%= trace.duration %> ms</div>
5
+ </div>
6
+ <div class="card-body">
7
+ <div class="text-muted font-monospace small"><%= trace.payload_identifier %></div>
8
+ </div>
9
+ </div>
@@ -5,9 +5,7 @@
5
5
  <%= csrf_meta_tags %>
6
6
  <%= csp_meta_tag %>
7
7
 
8
- <%= stylesheet_link_tag "inner_performance/application", media: "all" %>
9
-
10
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
8
+ <%= tag.link rel: "stylesheet", href: frontend_static_path(:bootstrap, format: :css), nonce: content_security_policy_nonce %>
11
9
  </head>
12
10
  <body>
13
11
 
data/config/routes.rb CHANGED
@@ -1,7 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  InnerPerformance::Engine.routes.draw do
4
- resources :events, only: [:index]
4
+ resources :events, only: [:index, :show]
5
5
 
6
- root to: 'dashboard#index'
6
+ root to: "dashboard#index"
7
+
8
+ scope :frontend, controller: :frontends, defaults: { version: InnerPerformance::VERSION.tr(".", "-") } do
9
+ get "static/:version/:stem", action: :static, as: :frontend_static
10
+ end
7
11
  end
@@ -2,14 +2,14 @@
2
2
 
3
3
  class CreateInnerPerformanceEvents < ActiveRecord::Migration[7.1]
4
4
  def change
5
- create_table :inner_performance_events, force: :cascade do |t|
6
- t.string 'event'
7
- t.string 'name'
8
- t.decimal 'duration'
9
- t.decimal 'db_runtime'
10
- t.datetime 'created_at', null: false
11
- t.datetime 'updated_at', null: false
12
- t.text 'properties', default: '{}'
5
+ create_table(:inner_performance_events, force: :cascade) do |t|
6
+ t.string("event")
7
+ t.string("name")
8
+ t.decimal("duration")
9
+ t.decimal("db_runtime")
10
+ t.datetime("created_at", null: false)
11
+ t.datetime("updated_at", null: false)
12
+ t.text("properties", default: "{}")
13
13
  end
14
14
  end
15
15
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  class AddTypeToInnerPerformanceEvents < ActiveRecord::Migration[7.1]
4
4
  def change
5
- add_column :inner_performance_events, :type, :string
5
+ add_column(:inner_performance_events, :type, :string)
6
6
  end
7
7
  end
@@ -0,0 +1,5 @@
1
+ class RemoveDefaultValueFromInnerPerformanceEventsProperties < ActiveRecord::Migration[7.1]
2
+ def change
3
+ change_column_default(:inner_performance_events, :properties, nil)
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ class CreateInnerPerformanceTraces < ActiveRecord::Migration[7.1]
2
+ def change
3
+ create_table(:inner_performance_traces) do |t|
4
+ t.references(:event, type: :bigint, null: false, foreign_key: { to_table: :inner_performance_events })
5
+ t.string(:name)
6
+ t.string(:type)
7
+ t.json(:payload)
8
+ t.decimal(:duration)
9
+
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -2,18 +2,32 @@
2
2
 
3
3
  module InnerPerformance
4
4
  class Configuration
5
- attr_accessor :sample_rates, :events_retention, :medium_duration_range, :ignore_rules
5
+ attr_accessor :sample_rates,
6
+ :events_retention,
7
+ :medium_duration_range,
8
+ :ignore_rules,
9
+ :cleanup_immediately,
10
+ :traces_enabled,
11
+ :ignored_event_names
6
12
 
7
13
  def initialize
8
14
  @sample_rates = {
9
- 'process_action.action_controller' => 2,
10
- 'perform.active_job' => 100
15
+ "process_action.action_controller" => 2,
16
+ "perform.active_job" => 100,
11
17
  }
12
18
  @events_retention = 1.week
13
19
  @medium_duration_range = [200, 999]
14
20
  @ignore_rules = [
15
- proc { |event| rand(100) > InnerPerformance.configuration.sample_rates[event.name.to_s] },
16
- proc { |event| (event.payload[:job]&.class&.name || '').include?('InnerPerformance') }
21
+ proc { |event| rand(100_000.0) > (InnerPerformance.configuration.sample_rates[event.name.to_s] * 1000) },
22
+ proc { |event| (event.payload[:job]&.class&.name || "").include?("InnerPerformance") },
23
+ ]
24
+ @cleanup_immediately = false
25
+ @traces_enabled = false
26
+ @ignored_event_names = [
27
+ "SCHEMA",
28
+ "TRANSACTION",
29
+ "ActiveRecord::InternalMetadata Load",
30
+ "ActiveRecord::SchemaMigration Load",
17
31
  ]
18
32
  end
19
33
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Heavily based on RailsPerformance implementation:
4
+ # https://github.com/igorkasyanchuk/rails_performance/blob/master/lib/rails_performance/thread/current_request.rb
5
+ module InnerPerformance
6
+ class CurrentRequest
7
+ attr_reader :request_id, :traces, :ignore
8
+ attr_accessor :data
9
+ attr_accessor :record
10
+
11
+ class << self
12
+ def init
13
+ Thread.current[:ip_current_request] ||= CurrentRequest.new(SecureRandom.hex(16))
14
+ end
15
+
16
+ def current
17
+ CurrentRequest.init
18
+ end
19
+
20
+ def cleanup
21
+ Thread.current[:ip_current_request] = nil
22
+ end
23
+ end
24
+
25
+ def initialize(request_id)
26
+ @request_id = request_id
27
+ @traces = []
28
+ @ignore = Set.new
29
+ @data = nil
30
+ @record = nil
31
+ end
32
+
33
+ def trace(options = {})
34
+ @traces << options.merge(time: Time.current)
35
+ end
36
+ end
37
+ end
@@ -5,11 +5,16 @@ module InnerPerformance
5
5
  isolate_namespace InnerPerformance
6
6
 
7
7
  config.generators do |g|
8
- g.test_framework :rspec
8
+ g.test_framework(:rspec)
9
9
  end
10
10
 
11
- initializer 'inner_performance.install' do
11
+ initializer "inner_performance.install" do
12
12
  InnerPerformance.install!
13
13
  end
14
+
15
+ initializer "inner_performance.assets.precompile" do |app|
16
+ # this initializer is only called when sprockets is in use
17
+ app.config.assets.precompile << "inner_performance_manifest.js"
18
+ end
14
19
  end
15
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InnerPerformance
4
- VERSION = '0.1.4'
4
+ VERSION = "0.3.0"
5
5
  end
@@ -1,11 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'inner_performance/version'
4
- require 'inner_performance/engine'
5
- require 'inner_performance/configuration'
3
+ require "inner_performance/version"
4
+ require "inner_performance/engine"
5
+ require "inner_performance/configuration"
6
6
 
7
- require 'ransack'
8
- require 'pagy'
7
+ require_relative "inner_performance/current_request"
8
+
9
+ require "ransack"
9
10
 
10
11
  module InnerPerformance
11
12
  class << self
@@ -18,7 +19,36 @@ module InnerPerformance
18
19
  end
19
20
 
20
21
  def install!
21
- ActiveSupport::Notifications.subscribe 'process_action.action_controller' do |event|
22
+ ActiveSupport::Notifications.subscribe("render_template.action_view") do |event|
23
+ CurrentRequest.current.trace({
24
+ group: :view,
25
+ name: event.name,
26
+ payload: { identifier: event.payload[:identifier] },
27
+ duration: event.duration.round(2),
28
+ }) if InnerPerformance.configuration.traces_enabled
29
+ end
30
+
31
+ ActiveSupport::Notifications.subscribe("render_partial.action_view") do |event|
32
+ CurrentRequest.current.trace({
33
+ group: :view,
34
+ name: event.name,
35
+ payload: { identifier: event.payload[:identifier] },
36
+ duration: event.duration.round(2),
37
+ }) if InnerPerformance.configuration.traces_enabled
38
+ end
39
+
40
+ ActiveSupport::Notifications.subscribe("sql.active_record") do |event|
41
+ unless event.payload[:name].in?(InnerPerformance.configuration.ignored_event_names)
42
+ CurrentRequest.current.trace({
43
+ group: :db,
44
+ name: event.name,
45
+ payload: { name: event.payload[:name], sql: event.payload[:sql] },
46
+ duration: event.duration.round(2),
47
+ }) if InnerPerformance.configuration.traces_enabled
48
+ end
49
+ end
50
+
51
+ ActiveSupport::Notifications.subscribe("process_action.action_controller") do |event|
22
52
  if save_event?(event)
23
53
  InnerPerformance::SaveEventJob.perform_later(
24
54
  type: InnerPerformance::Events::ProcessActionActionController.name,
@@ -28,13 +58,16 @@ module InnerPerformance
28
58
  duration: event.duration,
29
59
  db_runtime: event.payload[:db_runtime],
30
60
  properties: {
31
- view_runtime: event.payload[:view_runtime]
32
- }
61
+ view_runtime: event.payload[:view_runtime],
62
+ },
63
+ traces: CurrentRequest.current.traces,
33
64
  )
34
65
  end
66
+
67
+ CurrentRequest.cleanup
35
68
  end
36
69
 
37
- ActiveSupport::Notifications.subscribe 'perform.active_job' do |event|
70
+ ActiveSupport::Notifications.subscribe("perform.active_job") do |event|
38
71
  if save_event?(event)
39
72
  InnerPerformance::SaveEventJob.perform_later(
40
73
  type: InnerPerformance::Events::PerformActiveJob.name,
@@ -42,9 +75,12 @@ module InnerPerformance
42
75
  event: event.name,
43
76
  name: event.payload[:job].class.name,
44
77
  duration: event.duration,
45
- db_runtime: event.payload[:db_runtime]
78
+ db_runtime: event.payload[:db_runtime],
79
+ traces: CurrentRequest.current.traces,
46
80
  )
47
81
  end
82
+
83
+ CurrentRequest.cleanup
48
84
  end
49
85
  end
50
86
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inner_performance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mbajur
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-26 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activejob
@@ -24,20 +23,6 @@ dependencies:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
25
  version: 7.1.5
27
- - !ruby/object:Gem::Dependency
28
- name: pagy
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 9.3.1
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 9.3.1
41
26
  - !ruby/object:Gem::Dependency
42
27
  name: rails
43
28
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +79,7 @@ dependencies:
94
79
  - - ">="
95
80
  - !ruby/object:Gem::Version
96
81
  version: '0'
97
- description: Database-backed modest performance monitoring tool for your Rails app.
82
+ description: Simple database-backed performance monitoring for your Rails app.
98
83
  email:
99
84
  - mbajur@gmail.com
100
85
  executables: []
@@ -103,11 +88,11 @@ extra_rdoc_files: []
103
88
  files:
104
89
  - README.md
105
90
  - Rakefile
106
- - app/assets/config/inner_performance_manifest.js
107
- - app/assets/stylesheets/inner_performance/application.css
108
91
  - app/controllers/inner_performance/application_controller.rb
109
92
  - app/controllers/inner_performance/dashboard_controller.rb
110
93
  - app/controllers/inner_performance/events_controller.rb
94
+ - app/controllers/inner_performance/frontends_controller.rb
95
+ - app/frontend/inner_performance/vendor/bootstrap.min.css
111
96
  - app/helpers/inner_performance/application_helper.rb
112
97
  - app/jobs/inner_performance/application_job.rb
113
98
  - app/jobs/inner_performance/cleanup_job.rb
@@ -117,15 +102,25 @@ files:
117
102
  - app/models/inner_performance/event.rb
118
103
  - app/models/inner_performance/events/perform_active_job.rb
119
104
  - app/models/inner_performance/events/process_action_action_controller.rb
105
+ - app/models/inner_performance/trace.rb
106
+ - app/models/inner_performance/traces/db.rb
107
+ - app/models/inner_performance/traces/view.rb
108
+ - app/services/inner_performance/trace_for_insert_initializer.rb
120
109
  - app/views/inner_performance/dashboard/index.html.erb
121
110
  - app/views/inner_performance/events/_event.html.erb
122
111
  - app/views/inner_performance/events/index.html.erb
112
+ - app/views/inner_performance/events/show.html.erb
113
+ - app/views/inner_performance/traces/dbs/_db.html.erb
114
+ - app/views/inner_performance/traces/views/_view.html.erb
123
115
  - app/views/layouts/inner_performance/application.html.erb
124
116
  - config/routes.rb
125
117
  - db/migrate/20241123121600_create_inner_performance_events.rb
126
118
  - db/migrate/20241124111458_add_type_to_inner_performance_events.rb
119
+ - db/migrate/20241218082041_remove_default_value_from_inner_performance_events_properties.rb
120
+ - db/migrate/20250214162622_create_inner_performance_traces.rb
127
121
  - lib/inner_performance.rb
128
122
  - lib/inner_performance/configuration.rb
123
+ - lib/inner_performance/current_request.rb
129
124
  - lib/inner_performance/engine.rb
130
125
  - lib/inner_performance/version.rb
131
126
  - lib/tasks/inner_performance_tasks.rake
@@ -135,7 +130,6 @@ metadata:
135
130
  homepage_uri: https://github.com/mbajur
136
131
  source_code_uri: https://github.com/mbajur/inner_performance
137
132
  changelog_uri: https://github.com/mbajur/inner_performance
138
- post_install_message:
139
133
  rdoc_options: []
140
134
  require_paths:
141
135
  - lib
@@ -150,8 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
144
  - !ruby/object:Gem::Version
151
145
  version: '0'
152
146
  requirements: []
153
- rubygems_version: 3.5.23
154
- signing_key:
147
+ rubygems_version: 3.6.9
155
148
  specification_version: 4
156
- summary: Database-backed modest performance monitoring tool for your Rails app.
149
+ summary: Simple database-backed performance monitoring for your Rails app.
157
150
  test_files: []
@@ -1 +0,0 @@
1
- //= link_directory ../stylesheets/inner_performance .css
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */