inner_performance 0.1.4 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -9
- data/Rakefile +5 -5
- data/app/controllers/inner_performance/dashboard_controller.rb +5 -5
- data/app/controllers/inner_performance/events_controller.rb +6 -1
- data/app/controllers/inner_performance/frontends_controller.rb +32 -0
- data/app/frontend/inner_performance/vendor/bootstrap.min.css +5 -0
- data/app/helpers/inner_performance/application_helper.rb +2 -2
- data/app/jobs/inner_performance/cleanup_job.rb +7 -2
- data/app/jobs/inner_performance/save_event_job.rb +13 -3
- data/app/mailers/inner_performance/application_mailer.rb +2 -2
- data/app/models/inner_performance/event.rb +3 -1
- data/app/models/inner_performance/trace.rb +7 -0
- data/app/models/inner_performance/traces/db.rb +22 -0
- data/app/models/inner_performance/traces/view.rb +22 -0
- data/app/services/inner_performance/trace_for_insert_initializer.rb +19 -0
- data/app/views/inner_performance/events/_event.html.erb +1 -1
- data/app/views/inner_performance/events/index.html.erb +15 -4
- data/app/views/inner_performance/events/show.html.erb +32 -0
- data/app/views/inner_performance/traces/dbs/_db.html.erb +10 -0
- data/app/views/inner_performance/traces/views/_view.html.erb +9 -0
- data/app/views/layouts/inner_performance/application.html.erb +1 -3
- data/config/routes.rb +6 -2
- data/db/migrate/20241123121600_create_inner_performance_events.rb +8 -8
- data/db/migrate/20241124111458_add_type_to_inner_performance_events.rb +1 -1
- data/db/migrate/20241218082041_remove_default_value_from_inner_performance_events_properties.rb +5 -0
- data/db/migrate/20250214162622_create_inner_performance_traces.rb +13 -0
- data/lib/inner_performance/configuration.rb +19 -5
- data/lib/inner_performance/current_request.rb +37 -0
- data/lib/inner_performance/engine.rb +7 -2
- data/lib/inner_performance/version.rb +1 -1
- data/lib/inner_performance.rb +47 -10
- metadata +16 -6
- data/app/assets/config/inner_performance_manifest.js +0 -1
- 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,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
|
-
|
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,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,
|
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
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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">
|
@@ -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
|
-
<%=
|
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:
|
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
|
6
|
-
t.string
|
7
|
-
t.string
|
8
|
-
t.decimal
|
9
|
-
t.decimal
|
10
|
-
t.datetime
|
11
|
-
t.datetime
|
12
|
-
t.text
|
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
|
@@ -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,
|
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
|
-
|
10
|
-
|
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(
|
16
|
-
proc { |event| (event.payload[:job]&.class&.name ||
|
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
|
8
|
+
g.test_framework(:rspec)
|
9
9
|
end
|
10
10
|
|
11
|
-
initializer
|
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
|
data/lib/inner_performance.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require "inner_performance/version"
|
4
|
+
require "inner_performance/engine"
|
5
|
+
require "inner_performance/configuration"
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
require_relative "inner_performance/current_request"
|
8
|
+
|
9
|
+
require "ransack"
|
10
|
+
require "pagy"
|
9
11
|
|
10
12
|
module InnerPerformance
|
11
13
|
class << self
|
@@ -18,7 +20,36 @@ module InnerPerformance
|
|
18
20
|
end
|
19
21
|
|
20
22
|
def install!
|
21
|
-
ActiveSupport::Notifications.subscribe
|
23
|
+
ActiveSupport::Notifications.subscribe("render_template.action_view") do |event|
|
24
|
+
CurrentRequest.current.trace({
|
25
|
+
group: :view,
|
26
|
+
name: event.name,
|
27
|
+
payload: { identifier: event.payload[:identifier] },
|
28
|
+
duration: event.duration.round(2),
|
29
|
+
}) if InnerPerformance.configuration.traces_enabled
|
30
|
+
end
|
31
|
+
|
32
|
+
ActiveSupport::Notifications.subscribe("render_partial.action_view") do |event|
|
33
|
+
CurrentRequest.current.trace({
|
34
|
+
group: :view,
|
35
|
+
name: event.name,
|
36
|
+
payload: { identifier: event.payload[:identifier] },
|
37
|
+
duration: event.duration.round(2),
|
38
|
+
}) if InnerPerformance.configuration.traces_enabled
|
39
|
+
end
|
40
|
+
|
41
|
+
ActiveSupport::Notifications.subscribe("sql.active_record") do |event|
|
42
|
+
unless event.payload[:name].in?(InnerPerformance.configuration.ignored_event_names)
|
43
|
+
CurrentRequest.current.trace({
|
44
|
+
group: :db,
|
45
|
+
name: event.name,
|
46
|
+
payload: { name: event.payload[:name], sql: event.payload[:sql] },
|
47
|
+
duration: event.duration.round(2),
|
48
|
+
}) if InnerPerformance.configuration.traces_enabled
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
ActiveSupport::Notifications.subscribe("process_action.action_controller") do |event|
|
22
53
|
if save_event?(event)
|
23
54
|
InnerPerformance::SaveEventJob.perform_later(
|
24
55
|
type: InnerPerformance::Events::ProcessActionActionController.name,
|
@@ -28,13 +59,16 @@ module InnerPerformance
|
|
28
59
|
duration: event.duration,
|
29
60
|
db_runtime: event.payload[:db_runtime],
|
30
61
|
properties: {
|
31
|
-
view_runtime: event.payload[:view_runtime]
|
32
|
-
}
|
62
|
+
view_runtime: event.payload[:view_runtime],
|
63
|
+
},
|
64
|
+
traces: CurrentRequest.current.traces,
|
33
65
|
)
|
34
66
|
end
|
67
|
+
|
68
|
+
CurrentRequest.cleanup
|
35
69
|
end
|
36
70
|
|
37
|
-
ActiveSupport::Notifications.subscribe
|
71
|
+
ActiveSupport::Notifications.subscribe("perform.active_job") do |event|
|
38
72
|
if save_event?(event)
|
39
73
|
InnerPerformance::SaveEventJob.perform_later(
|
40
74
|
type: InnerPerformance::Events::PerformActiveJob.name,
|
@@ -42,9 +76,12 @@ module InnerPerformance
|
|
42
76
|
event: event.name,
|
43
77
|
name: event.payload[:job].class.name,
|
44
78
|
duration: event.duration,
|
45
|
-
db_runtime: event.payload[:db_runtime]
|
79
|
+
db_runtime: event.payload[:db_runtime],
|
80
|
+
traces: CurrentRequest.current.traces,
|
46
81
|
)
|
47
82
|
end
|
83
|
+
|
84
|
+
CurrentRequest.cleanup
|
48
85
|
end
|
49
86
|
end
|
50
87
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inner_performance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mbajur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description:
|
97
|
+
description: Simple database-backed performance monitoring for your Rails app.
|
98
98
|
email:
|
99
99
|
- mbajur@gmail.com
|
100
100
|
executables: []
|
@@ -103,11 +103,11 @@ extra_rdoc_files: []
|
|
103
103
|
files:
|
104
104
|
- README.md
|
105
105
|
- Rakefile
|
106
|
-
- app/assets/config/inner_performance_manifest.js
|
107
|
-
- app/assets/stylesheets/inner_performance/application.css
|
108
106
|
- app/controllers/inner_performance/application_controller.rb
|
109
107
|
- app/controllers/inner_performance/dashboard_controller.rb
|
110
108
|
- app/controllers/inner_performance/events_controller.rb
|
109
|
+
- app/controllers/inner_performance/frontends_controller.rb
|
110
|
+
- app/frontend/inner_performance/vendor/bootstrap.min.css
|
111
111
|
- app/helpers/inner_performance/application_helper.rb
|
112
112
|
- app/jobs/inner_performance/application_job.rb
|
113
113
|
- app/jobs/inner_performance/cleanup_job.rb
|
@@ -117,15 +117,25 @@ files:
|
|
117
117
|
- app/models/inner_performance/event.rb
|
118
118
|
- app/models/inner_performance/events/perform_active_job.rb
|
119
119
|
- app/models/inner_performance/events/process_action_action_controller.rb
|
120
|
+
- app/models/inner_performance/trace.rb
|
121
|
+
- app/models/inner_performance/traces/db.rb
|
122
|
+
- app/models/inner_performance/traces/view.rb
|
123
|
+
- app/services/inner_performance/trace_for_insert_initializer.rb
|
120
124
|
- app/views/inner_performance/dashboard/index.html.erb
|
121
125
|
- app/views/inner_performance/events/_event.html.erb
|
122
126
|
- app/views/inner_performance/events/index.html.erb
|
127
|
+
- app/views/inner_performance/events/show.html.erb
|
128
|
+
- app/views/inner_performance/traces/dbs/_db.html.erb
|
129
|
+
- app/views/inner_performance/traces/views/_view.html.erb
|
123
130
|
- app/views/layouts/inner_performance/application.html.erb
|
124
131
|
- config/routes.rb
|
125
132
|
- db/migrate/20241123121600_create_inner_performance_events.rb
|
126
133
|
- db/migrate/20241124111458_add_type_to_inner_performance_events.rb
|
134
|
+
- db/migrate/20241218082041_remove_default_value_from_inner_performance_events_properties.rb
|
135
|
+
- db/migrate/20250214162622_create_inner_performance_traces.rb
|
127
136
|
- lib/inner_performance.rb
|
128
137
|
- lib/inner_performance/configuration.rb
|
138
|
+
- lib/inner_performance/current_request.rb
|
129
139
|
- lib/inner_performance/engine.rb
|
130
140
|
- lib/inner_performance/version.rb
|
131
141
|
- lib/tasks/inner_performance_tasks.rake
|
@@ -153,5 +163,5 @@ requirements: []
|
|
153
163
|
rubygems_version: 3.5.23
|
154
164
|
signing_key:
|
155
165
|
specification_version: 4
|
156
|
-
summary:
|
166
|
+
summary: Simple database-backed performance monitoring for your Rails app.
|
157
167
|
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
|
-
*/
|