simple_apm 1.1.0 → 1.1.1
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.
- checksums.yaml +4 -4
- data/README.md +39 -31
- data/app/assets/stylesheets/simple_apm/application.css +39 -0
- data/app/controllers/simple_apm/apm_controller.rb +11 -6
- data/app/controllers/simple_apm/application_controller.rb +15 -1
- data/app/views/layouts/simple_apm/application.html.erb +33 -8
- data/app/views/simple_apm/apm/action_info.html.erb +16 -16
- data/app/views/simple_apm/apm/actions.html.erb +12 -12
- data/app/views/simple_apm/apm/dashboard.html.erb +18 -18
- data/app/views/simple_apm/apm/data.html.erb +19 -19
- data/app/views/simple_apm/apm/index.html.erb +14 -14
- data/app/views/simple_apm/apm/show.html.erb +26 -26
- data/config/locales/simple_apm.en.yml +131 -0
- data/config/locales/simple_apm.zh-CN.yml +131 -0
- data/config/routes.rb +1 -0
- data/lib/simple_apm/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac42ca5ebe7f45973a953586a00e22bb887d77da218f11ddf734dfb90975cbf8
|
|
4
|
+
data.tar.gz: d6ae570304dd85c0cb7bbc726fb42435f7a2d0ec461d6f2f3e56796bfed68353
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 83534ce017f1502595622764a2768be13d26f47d271e00dbd5b39d44d3870031862d9e936a1d1c7bd4ec29c52ddf99088c8f42b7f866edc135d9975f4d9a86fb
|
|
7
|
+
data.tar.gz: b1ed3284d308e6f6c7694899887dc5734e0f7dbf38252374a509c2fc6d8990c6e20d7a3078c6c8d0e2836735e3e7a662d74a8e10335d859fd02e024d13623295
|
data/README.md
CHANGED
|
@@ -1,73 +1,81 @@
|
|
|
1
1
|
# SimpleApm (Rails Engine)
|
|
2
|
-
基于Redis的简单的Web请求性能监控/慢事务追踪工具
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
- 最慢的500个(默认500)请求
|
|
6
|
-
- 记录每个action最慢的20次请求
|
|
7
|
-
- 记录每个action的平均访问时间
|
|
8
|
-
- 记录慢请求的详情和对应SQL详情(多余的会删掉)
|
|
9
|
-
- 以10分钟为刻度记录平均/最慢访问时间、次数等性能指标,并生成图表
|
|
10
|
-
- 记录请求中外部http访问时间
|
|
3
|
+
A lightweight Redis-backed Rails engine for web request performance monitoring and slow request tracing.
|
|
11
4
|
|
|
5
|
+
SimpleApm records request performance by day:
|
|
12
6
|
|
|
13
|
-
|
|
7
|
+
- The slowest requests, 500 by default.
|
|
8
|
+
- The slowest 20 requests for each action.
|
|
9
|
+
- Average response time for each action.
|
|
10
|
+
- Slow request details and related SQL details, trimming excess records.
|
|
11
|
+
- Average and slowest response time, request count, and other metrics in 10-minute intervals, with charts.
|
|
12
|
+
- External HTTP request duration during each request.
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
The web UI supports English and Chinese. English is used by default, and users can switch languages from the top-right corner.
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
## How It Works
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
SimpleApm records request-level data around Rack and uses Redis for storage and aggregation.
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
The core data flow is based on [Active Support Instrumentation](https://guides.rubyonrails.org/active_support_instrumentation.html).
|
|
22
21
|
|
|
22
|
+
Instrumentation events are processed by a long-running worker thread so request handling does not block on metric aggregation.
|
|
23
|
+
|
|
24
|
+
Memory usage is collected with [get_process_mem](https://github.com/schneems/get_process_mem). In Linux testing, collection takes less than 1 ms.
|
|
25
|
+
|
|
26
|
+
## Screenshots
|
|
23
27
|
|
|
24
|
-
## 功能截图
|
|
25
28
|
- Dashboard
|
|
26
|
-

|
|
27
30
|
|
|
28
|
-
-
|
|
31
|
+
- Slow Requests
|
|
29
32
|

|
|
30
33
|
|
|
31
|
-
- Action
|
|
34
|
+
- Action List
|
|
32
35
|

|
|
33
36
|
|
|
34
|
-
-
|
|
37
|
+
- Request Info
|
|
35
38
|

|
|
36
39
|
|
|
37
|
-
- Action
|
|
38
|
-

|
|
40
|
+
- Action Info
|
|
41
|
+

|
|
42
42
|
|
|
43
|
+
- Data Management
|
|
44
|
+

|
|
43
45
|
|
|
44
46
|
## Usage
|
|
45
47
|
|
|
48
|
+
Mount the engine in your Rails routes:
|
|
49
|
+
|
|
46
50
|
```ruby
|
|
47
51
|
# routes.rb
|
|
48
52
|
mount SimpleApm::Engine => "/apm"
|
|
53
|
+
```
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
rails generate simple_apm:install
|
|
55
|
+
Or run the installer:
|
|
52
56
|
|
|
57
|
+
```bash
|
|
58
|
+
rails generate simple_apm:install
|
|
53
59
|
```
|
|
54
60
|
|
|
55
|
-
|
|
56
61
|
## Installation
|
|
62
|
+
|
|
57
63
|
Add this line to your application's Gemfile:
|
|
58
64
|
|
|
59
65
|
```ruby
|
|
60
|
-
gem
|
|
66
|
+
gem "simple_apm"
|
|
61
67
|
```
|
|
62
68
|
|
|
63
|
-
|
|
69
|
+
Then run:
|
|
70
|
+
|
|
64
71
|
```bash
|
|
65
|
-
|
|
72
|
+
bundle
|
|
66
73
|
```
|
|
67
74
|
|
|
68
|
-
|
|
69
75
|
## Contributing
|
|
70
|
-
|
|
76
|
+
|
|
77
|
+
Issues and pull requests are welcome.
|
|
71
78
|
|
|
72
79
|
## License
|
|
80
|
+
|
|
73
81
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
@@ -144,6 +144,36 @@ body.simple-apm {
|
|
|
144
144
|
box-shadow: none;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
.apm-language-switch {
|
|
148
|
+
display: inline-flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
gap: 4px;
|
|
151
|
+
padding: 3px;
|
|
152
|
+
background: rgba(255, 255, 255, 0.08);
|
|
153
|
+
border-radius: 6px;
|
|
154
|
+
flex: 0 0 auto;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.apm-language-switch a {
|
|
158
|
+
padding: 5px 8px;
|
|
159
|
+
color: #cbd5e1;
|
|
160
|
+
border-radius: 4px;
|
|
161
|
+
font-size: 12px;
|
|
162
|
+
line-height: 16px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.apm-language-switch a:hover,
|
|
166
|
+
.apm-language-switch a:focus {
|
|
167
|
+
color: #ffffff;
|
|
168
|
+
text-decoration: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.apm-language-switch a.active {
|
|
172
|
+
color: #052e2b;
|
|
173
|
+
background: #5eead4;
|
|
174
|
+
font-weight: 700;
|
|
175
|
+
}
|
|
176
|
+
|
|
147
177
|
.apm-content {
|
|
148
178
|
width: min(1440px, calc(100% - 48px));
|
|
149
179
|
margin: 0 auto;
|
|
@@ -539,6 +569,10 @@ pre {
|
|
|
539
569
|
margin-left: auto;
|
|
540
570
|
}
|
|
541
571
|
|
|
572
|
+
.apm-language-switch {
|
|
573
|
+
margin-left: auto;
|
|
574
|
+
}
|
|
575
|
+
|
|
542
576
|
.apm-page-header,
|
|
543
577
|
.apm-toolbar {
|
|
544
578
|
align-items: flex-start;
|
|
@@ -564,6 +598,11 @@ pre {
|
|
|
564
598
|
justify-content: space-between;
|
|
565
599
|
}
|
|
566
600
|
|
|
601
|
+
.apm-language-switch {
|
|
602
|
+
width: 100%;
|
|
603
|
+
justify-content: center;
|
|
604
|
+
}
|
|
605
|
+
|
|
567
606
|
.apm-date-select select.form-control {
|
|
568
607
|
flex: 1 1 auto;
|
|
569
608
|
}
|
|
@@ -54,6 +54,11 @@ module SimpleApm
|
|
|
54
54
|
redirect_to request.referer
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
+
def set_locale
|
|
58
|
+
session[:simple_apm_locale] = params[:locale] if AVAILABLE_LOCALES.include?(params[:locale])
|
|
59
|
+
redirect_back fallback_location: dashboard_path
|
|
60
|
+
end
|
|
61
|
+
|
|
57
62
|
def data
|
|
58
63
|
@data = SimpleApm::Redis.in_apm_days.map {|x| SimpleApm::Hit.day_info(x)}
|
|
59
64
|
end
|
|
@@ -61,21 +66,21 @@ module SimpleApm
|
|
|
61
66
|
def data_delete
|
|
62
67
|
if params[:date].is_a?(String)
|
|
63
68
|
r = SimpleApm::Redis.clear_data(params[:date])
|
|
64
|
-
flash[:notice] = r[:success] ?
|
|
69
|
+
flash[:notice] = r[:success] ? t("simple_apm.flash.deleted") : t("simple_apm.flash.no_data_for_day")
|
|
65
70
|
elsif params[:type]=='month'
|
|
66
71
|
del_count = SimpleApm::Redis.clear_data_before_time(Time.now.at_beginning_of_day - 1.month)
|
|
67
|
-
flash[:notice] = "
|
|
72
|
+
flash[:notice] = t("simple_apm.flash.deleted_count", count: del_count)
|
|
68
73
|
elsif params[:type]=='week'
|
|
69
74
|
del_count = SimpleApm::Redis.clear_data_before_time(Time.now.at_beginning_of_day - 1.week)
|
|
70
|
-
flash[:notice] = "
|
|
75
|
+
flash[:notice] = t("simple_apm.flash.deleted_count", count: del_count)
|
|
71
76
|
elsif params[:type]=='stop_data'
|
|
72
77
|
SimpleApm::Redis.stop!
|
|
73
|
-
flash[:notice] =
|
|
78
|
+
flash[:notice] = t("simple_apm.flash.updated")
|
|
74
79
|
elsif params[:type]=='rerun_data'
|
|
75
80
|
SimpleApm::Redis.rerun!
|
|
76
|
-
flash[:notice] =
|
|
81
|
+
flash[:notice] = t("simple_apm.flash.updated")
|
|
77
82
|
else
|
|
78
|
-
flash[:notice] =
|
|
83
|
+
flash[:notice] = t("simple_apm.flash.unknown_action")
|
|
79
84
|
# r = params[:date].map{|d|SimpleApm::Redis.clear_data(d)}
|
|
80
85
|
# suc, fail = r.partition{|x|x[:success]}
|
|
81
86
|
# flash[:notice] = "成功删除#{suc.length}"
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
module SimpleApm
|
|
2
2
|
class ApplicationController < ActionController::Base
|
|
3
|
+
AVAILABLE_LOCALES = %w[en zh-CN].freeze
|
|
4
|
+
|
|
3
5
|
protect_from_forgery with: :exception
|
|
4
|
-
|
|
6
|
+
around_action :switch_simple_apm_locale
|
|
7
|
+
helper_method :apm_date, :simple_apm_locale
|
|
5
8
|
|
|
6
9
|
def apm_date
|
|
7
10
|
session[:apm_date].presence || Time.now.strftime("%Y-%m-%d")
|
|
8
11
|
end
|
|
12
|
+
|
|
13
|
+
def simple_apm_locale
|
|
14
|
+
locale = session[:simple_apm_locale].presence
|
|
15
|
+
AVAILABLE_LOCALES.include?(locale) ? locale : "en"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
def switch_simple_apm_locale(&action)
|
|
21
|
+
I18n.with_locale(simple_apm_locale, &action)
|
|
22
|
+
end
|
|
9
23
|
end
|
|
10
24
|
end
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
<div class="apm-nav">
|
|
53
53
|
<%
|
|
54
54
|
[
|
|
55
|
-
[dashboard_path,
|
|
56
|
-
[index_path,
|
|
57
|
-
[actions_path,
|
|
58
|
-
[data_path,
|
|
55
|
+
[dashboard_path, t("simple_apm.layout.nav_dashboard")],
|
|
56
|
+
[index_path, t("simple_apm.layout.nav_slow_requests")],
|
|
57
|
+
[actions_path, t("simple_apm.layout.nav_actions")],
|
|
58
|
+
[data_path, t("simple_apm.layout.nav_data")]
|
|
59
59
|
].each do |m|
|
|
60
60
|
%>
|
|
61
61
|
<a class="navbar-brand <%= 'active' if request.url =~ /#{m[0]}/ %>"
|
|
@@ -64,8 +64,15 @@
|
|
|
64
64
|
</a>
|
|
65
65
|
<% end %>
|
|
66
66
|
</div>
|
|
67
|
+
<div class="apm-language-switch" aria-label="<%= t("simple_apm.layout.language") %>">
|
|
68
|
+
<% SimpleApm::ApplicationController::AVAILABLE_LOCALES.each do |locale| %>
|
|
69
|
+
<%= link_to t("simple_apm.locales.#{locale}"),
|
|
70
|
+
set_locale_path(locale: locale),
|
|
71
|
+
class: ("active" if simple_apm_locale == locale) %>
|
|
72
|
+
<% end %>
|
|
73
|
+
</div>
|
|
67
74
|
<div class="select-apm-date apm-date-select">
|
|
68
|
-
<span
|
|
75
|
+
<span><%= t("simple_apm.layout.date") %></span>
|
|
69
76
|
<%= select_tag 'apm_date', options_for_select(SimpleApm::Redis.in_apm_days, apm_date), class: 'form-control' %>
|
|
70
77
|
</div>
|
|
71
78
|
</div>
|
|
@@ -77,14 +84,32 @@
|
|
|
77
84
|
<footer class="apm-footer">
|
|
78
85
|
<div class="apm-footer-status">
|
|
79
86
|
<% if SimpleApm::Redis.running? %>
|
|
80
|
-
<span class="apm-status apm-status-ok"
|
|
87
|
+
<span class="apm-status apm-status-ok"><%= t("simple_apm.layout.collected") %></span>
|
|
81
88
|
<% else %>
|
|
82
|
-
<span class="apm-status apm-status-danger"
|
|
89
|
+
<span class="apm-status apm-status-danger"><%= t("simple_apm.common.paused") %></span>
|
|
83
90
|
<% end %>
|
|
84
91
|
</div>
|
|
85
92
|
<div class="apm-footer-meta">
|
|
86
93
|
<% SimpleApm::Redis.simple_info.each do |k, v| %>
|
|
87
|
-
|
|
94
|
+
<%
|
|
95
|
+
redis_label_key =
|
|
96
|
+
case k
|
|
97
|
+
when '系统内存'
|
|
98
|
+
'system_memory'
|
|
99
|
+
when '当前内存占用'
|
|
100
|
+
'current_memory'
|
|
101
|
+
when '当前内存占用(rss)'
|
|
102
|
+
'current_memory_rss'
|
|
103
|
+
when '占用内存峰值'
|
|
104
|
+
'peak_memory'
|
|
105
|
+
when 'redis版本'
|
|
106
|
+
'redis_version'
|
|
107
|
+
when /db[0-9]+/
|
|
108
|
+
'db'
|
|
109
|
+
end
|
|
110
|
+
redis_label = redis_label_key ? t("simple_apm.layout.redis_info.#{redis_label_key}") : k
|
|
111
|
+
%>
|
|
112
|
+
<span><label><%= redis_label %>:</label><%= v %></span>
|
|
88
113
|
<% end %>
|
|
89
114
|
</div>
|
|
90
115
|
</footer>
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
<div class="apm-page-header">
|
|
2
2
|
<div>
|
|
3
|
-
<h1 class="apm-page-title"
|
|
3
|
+
<h1 class="apm-page-title"><%= t("simple_apm.action_info.title") %></h1>
|
|
4
4
|
<p class="apm-page-subtitle"><%= @action.name %></p>
|
|
5
5
|
</div>
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<div class="apm-metrics">
|
|
9
9
|
<div class="apm-stat">
|
|
10
|
-
<p class="apm-stat-label"
|
|
10
|
+
<p class="apm-stat-label"><%= t("simple_apm.action_info.daily_hits") %></p>
|
|
11
11
|
<div class="apm-stat-value"><%= @action.click_count %></div>
|
|
12
12
|
</div>
|
|
13
13
|
<div class="apm-stat">
|
|
14
|
-
<p class="apm-stat-label"
|
|
14
|
+
<p class="apm-stat-label"><%= t("simple_apm.action_info.avg_response_time") %></p>
|
|
15
15
|
<div class="apm-stat-value"><%= sec_str @action.time.to_f/@action.click_count.to_i %></div>
|
|
16
16
|
</div>
|
|
17
17
|
<div class="apm-stat">
|
|
18
|
-
<p class="apm-stat-label"
|
|
18
|
+
<p class="apm-stat-label"><%= t("simple_apm.action_info.avg_db_time") %></p>
|
|
19
19
|
<div class="apm-stat-value"><%= sec_str @action.avg_db_time %></div>
|
|
20
20
|
</div>
|
|
21
21
|
<div class="apm-stat">
|
|
22
|
-
<p class="apm-stat-label"
|
|
22
|
+
<p class="apm-stat-label"><%= t("simple_apm.action_info.avg_sql_count") %></p>
|
|
23
23
|
<div class="apm-stat-value"><%= @action.avg_queries_count.round(1) %></div>
|
|
24
24
|
</div>
|
|
25
25
|
<div class="apm-stat">
|
|
26
|
-
<p class="apm-stat-label"
|
|
26
|
+
<p class="apm-stat-label"><%= t("simple_apm.action_info.slowest_response_time") %></p>
|
|
27
27
|
<div class="apm-stat-value"><%= link_to sec_str(@action.slow_time), show_path(id: @action.slow_id) %></div>
|
|
28
|
-
<div class="apm-stat-meta"
|
|
28
|
+
<div class="apm-stat-meta"><%= t("simple_apm.action_info.fastest") %> <%= link_to sec_str(@action.fast_time), show_path(id: @action.fast_id) %></div>
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
32
|
<section class="apm-panel">
|
|
33
33
|
<div class="apm-panel-header">
|
|
34
34
|
<div>
|
|
35
|
-
<h2 class="apm-panel-title"
|
|
36
|
-
<p class="apm-panel-subtitle"
|
|
35
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.action_info.slow_samples_title") %></h2>
|
|
36
|
+
<p class="apm-panel-subtitle"><%= t("simple_apm.action_info.slow_samples_subtitle") %></p>
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
<div class="apm-panel-body">
|
|
40
40
|
<div class="apm-table-wrap">
|
|
41
41
|
<table class="table table-bordered">
|
|
42
42
|
<tr>
|
|
43
|
-
<th
|
|
44
|
-
<th
|
|
45
|
-
<th
|
|
46
|
-
<th
|
|
47
|
-
<th
|
|
48
|
-
<th
|
|
43
|
+
<th><%= t("simple_apm.action_info.response_time") %></th>
|
|
44
|
+
<th><%= t("simple_apm.action_info.access_time") %></th>
|
|
45
|
+
<th><%= t("simple_apm.action_info.memory_delta") %></th>
|
|
46
|
+
<th><%= t("simple_apm.action_info.request_id") %></th>
|
|
47
|
+
<th><%= t("simple_apm.action_info.ip") %></th>
|
|
48
|
+
<th><%= t("simple_apm.common.server") %></th>
|
|
49
49
|
</tr>
|
|
50
50
|
<% @action.slow_requests.each do |slow_request| %>
|
|
51
51
|
<%
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
<%= sec_str r.during %>
|
|
58
58
|
(DB: <%= sec_str r.db_runtime %> ,
|
|
59
59
|
SQL: <%= r.queries_count.to_i %> ,
|
|
60
|
-
|
|
60
|
+
<%= t("simple_apm.common.view") %>: <%= sec_str r.view_runtime %>
|
|
61
61
|
<%= "HTTP: #{sec_str r.net_http_during}" if r.net_http_during.to_f > 0 %>)
|
|
62
62
|
</td>
|
|
63
63
|
<td><%= time_label r.started %></td>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<div class="apm-page-header">
|
|
2
2
|
<div>
|
|
3
|
-
<h1 class="apm-page-title"
|
|
4
|
-
<p class="apm-page-subtitle"
|
|
3
|
+
<h1 class="apm-page-title"><%= t("simple_apm.actions.title") %></h1>
|
|
4
|
+
<p class="apm-page-subtitle"><%= t("simple_apm.actions.subtitle") %></p>
|
|
5
5
|
</div>
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<section class="apm-panel">
|
|
9
9
|
<div class="apm-panel-header">
|
|
10
10
|
<div>
|
|
11
|
-
<h2 class="apm-panel-title"
|
|
12
|
-
<p class="apm-panel-subtitle"
|
|
11
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.actions.list_title") %></h2>
|
|
12
|
+
<p class="apm-panel-subtitle"><%= t("simple_apm.actions.list_subtitle") %></p>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
<div class="apm-panel-body">
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
<table id="actions-table" class="table">
|
|
18
18
|
<thead>
|
|
19
19
|
<tr>
|
|
20
|
-
<th
|
|
21
|
-
<th
|
|
22
|
-
<th
|
|
23
|
-
<th
|
|
24
|
-
<th
|
|
25
|
-
<th
|
|
26
|
-
<th
|
|
27
|
-
<th
|
|
20
|
+
<th><%= t("simple_apm.actions.name") %></th>
|
|
21
|
+
<th><%= t("simple_apm.actions.click_count") %></th>
|
|
22
|
+
<th><%= t("simple_apm.actions.avg_response_time") %></th>
|
|
23
|
+
<th><%= t("simple_apm.actions.avg_db_time") %></th>
|
|
24
|
+
<th><%= t("simple_apm.actions.avg_sql_count") %></th>
|
|
25
|
+
<th><%= t("simple_apm.actions.avg_http_time") %></th>
|
|
26
|
+
<th><%= t("simple_apm.actions.fastest_response_time") %></th>
|
|
27
|
+
<th><%= t("simple_apm.actions.slowest_response_time") %></th>
|
|
28
28
|
</tr>
|
|
29
29
|
</thead>
|
|
30
30
|
<tbody>
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
<div class="apm-page-header">
|
|
2
2
|
<div>
|
|
3
|
-
<h1 class="apm-page-title"
|
|
4
|
-
<p class="apm-page-subtitle"
|
|
3
|
+
<h1 class="apm-page-title"><%= t("simple_apm.dashboard.title") %></h1>
|
|
4
|
+
<p class="apm-page-subtitle"><%= t("simple_apm.dashboard.subtitle") %></p>
|
|
5
5
|
</div>
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<div class="apm-metrics">
|
|
9
9
|
<div class="apm-stat">
|
|
10
|
-
<p class="apm-stat-label"
|
|
10
|
+
<p class="apm-stat-label"><%= t("simple_apm.dashboard.stat_points") %></p>
|
|
11
11
|
<div class="apm-stat-value"><%= @x_names.length %></div>
|
|
12
|
-
<div class="apm-stat-meta"
|
|
12
|
+
<div class="apm-stat-meta"><%= t("simple_apm.dashboard.ten_minute_intervals") %></div>
|
|
13
13
|
</div>
|
|
14
14
|
<div class="apm-stat">
|
|
15
|
-
<p class="apm-stat-label"
|
|
15
|
+
<p class="apm-stat-label"><%= t("simple_apm.dashboard.hits") %></p>
|
|
16
16
|
<div class="apm-stat-value"><%= @hits_arr.map(&:to_i).sum %></div>
|
|
17
|
-
<div class="apm-stat-meta"
|
|
17
|
+
<div class="apm-stat-meta"><%= t("simple_apm.dashboard.current_day_total") %></div>
|
|
18
18
|
</div>
|
|
19
19
|
<div class="apm-stat">
|
|
20
|
-
<p class="apm-stat-label"
|
|
20
|
+
<p class="apm-stat-label"><%= t("simple_apm.dashboard.peak_avg_response") %></p>
|
|
21
21
|
<div class="apm-stat-value"><%= sec_str(@time_arr.map(&:to_f).max.to_f) %></div>
|
|
22
|
-
<div class="apm-stat-meta"
|
|
22
|
+
<div class="apm-stat-meta"><%= t("simple_apm.dashboard.interval_peak") %></div>
|
|
23
23
|
</div>
|
|
24
24
|
<div class="apm-stat">
|
|
25
|
-
<p class="apm-stat-label"
|
|
25
|
+
<p class="apm-stat-label"><%= t("simple_apm.dashboard.current_collection") %></p>
|
|
26
26
|
<div class="apm-stat-value">
|
|
27
27
|
<% if SimpleApm::Redis.running? %>
|
|
28
|
-
<span class="apm-status apm-status-ok"
|
|
28
|
+
<span class="apm-status apm-status-ok"><%= t("simple_apm.common.running") %></span>
|
|
29
29
|
<% else %>
|
|
30
|
-
<span class="apm-status apm-status-danger"
|
|
30
|
+
<span class="apm-status apm-status-danger"><%= t("simple_apm.common.paused") %></span>
|
|
31
31
|
<% end %>
|
|
32
32
|
</div>
|
|
33
|
-
<div class="apm-stat-meta"
|
|
33
|
+
<div class="apm-stat-meta"><%= t("simple_apm.dashboard.redis_status") %></div>
|
|
34
34
|
</div>
|
|
35
35
|
<div class="apm-stat">
|
|
36
|
-
<p class="apm-stat-label"
|
|
36
|
+
<p class="apm-stat-label"><%= t("simple_apm.dashboard.query_date") %></p>
|
|
37
37
|
<div class="apm-stat-value"><%= SimpleApm::RedisKey.query_date || Time.now.strftime('%Y-%m-%d') %></div>
|
|
38
|
-
<div class="apm-stat-meta"
|
|
38
|
+
<div class="apm-stat-meta"><%= t("simple_apm.dashboard.switch_in_top_right") %></div>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
41
41
|
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
<section class="apm-panel apm-col-6">
|
|
44
44
|
<div class="apm-panel-header">
|
|
45
45
|
<div>
|
|
46
|
-
<h2 class="apm-panel-title"
|
|
47
|
-
<p class="apm-panel-subtitle"
|
|
46
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.dashboard.response_time") %></h2>
|
|
47
|
+
<p class="apm-panel-subtitle"><%= t("simple_apm.dashboard.response_time_subtitle") %></p>
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
50
|
<div class="apm-panel-body">
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
<section class="apm-panel apm-col-6">
|
|
56
56
|
<div class="apm-panel-header">
|
|
57
57
|
<div>
|
|
58
|
-
<h2 class="apm-panel-title"
|
|
59
|
-
<p class="apm-panel-subtitle"
|
|
58
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.dashboard.hit_count") %></h2>
|
|
59
|
+
<p class="apm-panel-subtitle"><%= t("simple_apm.dashboard.hit_count_subtitle") %></p>
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
62
62
|
<div class="apm-panel-body">
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
<div class="apm-page-header">
|
|
2
2
|
<div>
|
|
3
|
-
<h1 class="apm-page-title"
|
|
4
|
-
<p class="apm-page-subtitle"
|
|
3
|
+
<h1 class="apm-page-title"><%= t("simple_apm.data.title") %></h1>
|
|
4
|
+
<p class="apm-page-subtitle"><%= t("simple_apm.data.subtitle") %></p>
|
|
5
5
|
</div>
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<section class="apm-panel">
|
|
9
9
|
<div class="apm-panel-header">
|
|
10
10
|
<div>
|
|
11
|
-
<h2 class="apm-panel-title"
|
|
12
|
-
<p class="apm-panel-subtitle"
|
|
11
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.data.collection_status") %></h2>
|
|
12
|
+
<p class="apm-panel-subtitle"><%= t("simple_apm.data.collection_subtitle") %></p>
|
|
13
13
|
</div>
|
|
14
14
|
<div class="apm-toolbar-actions">
|
|
15
15
|
<% if SimpleApm::Redis.running? %>
|
|
16
|
-
<span class="apm-status apm-status-ok"
|
|
17
|
-
<%= link_to
|
|
16
|
+
<span class="apm-status apm-status-ok"><%= t("simple_apm.common.running") %></span>
|
|
17
|
+
<%= link_to t("simple_apm.data.pause_collection"), data_delete_path(type: 'stop_data'), class: 'btn btn-warning btn-sm', 'data-confirm'=> t("simple_apm.data.confirm_pause") %>
|
|
18
18
|
<% else %>
|
|
19
|
-
<span class="apm-status apm-status-danger"
|
|
20
|
-
<%= link_to
|
|
19
|
+
<span class="apm-status apm-status-danger"><%= t("simple_apm.common.paused") %></span>
|
|
20
|
+
<%= link_to t("simple_apm.data.resume_collection"), data_delete_path(type: 'rerun_data'), class: 'btn btn-primary btn-sm' %>
|
|
21
21
|
<% end %>
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
<div class="apm-panel-body">
|
|
25
25
|
<div class="apm-toolbar">
|
|
26
26
|
<div>
|
|
27
|
-
<strong
|
|
28
|
-
<p class="apm-page-subtitle"
|
|
27
|
+
<strong><%= t("simple_apm.data.delete_data") %></strong>
|
|
28
|
+
<p class="apm-page-subtitle"><%= t("simple_apm.data.delete_subtitle") %></p>
|
|
29
29
|
</div>
|
|
30
30
|
<div class="apm-toolbar-actions">
|
|
31
|
-
<%= link_to
|
|
32
|
-
<%= link_to
|
|
31
|
+
<%= link_to t("simple_apm.data.keep_one_week"), data_delete_path(type: 'week'), class: 'btn btn-danger', 'data-confirm' => t("simple_apm.data.confirm_delete_week") %>
|
|
32
|
+
<%= link_to t("simple_apm.data.keep_one_month"), data_delete_path(type: 'month'), class: 'btn btn-danger', 'data-confirm' => t("simple_apm.data.confirm_delete_month") %>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
<section class="apm-panel">
|
|
39
39
|
<div class="apm-panel-header">
|
|
40
40
|
<div>
|
|
41
|
-
<h2 class="apm-panel-title"
|
|
42
|
-
<p class="apm-panel-subtitle"
|
|
41
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.data.history_title") %></h2>
|
|
42
|
+
<p class="apm-panel-subtitle"><%= t("simple_apm.data.history_subtitle") %></p>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
<div class="apm-panel-body">
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
<table class="table table-bordered">
|
|
48
48
|
<thead>
|
|
49
49
|
<tr>
|
|
50
|
-
<th
|
|
51
|
-
<th
|
|
52
|
-
<th
|
|
53
|
-
<th
|
|
50
|
+
<th><%= t("simple_apm.data.date") %></th>
|
|
51
|
+
<th><%= t("simple_apm.data.request_count") %></th>
|
|
52
|
+
<th><%= t("simple_apm.data.avg_response_time") %></th>
|
|
53
|
+
<th><%= t("simple_apm.data.operation") %></th>
|
|
54
54
|
</tr>
|
|
55
55
|
</thead>
|
|
56
56
|
<tbody>
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
<td><%= d[:day] %></td>
|
|
61
61
|
<td><%= d[:hits] %></td>
|
|
62
62
|
<td><%= sec_str d[:avg_time] %></td>
|
|
63
|
-
<td><%= link_to
|
|
63
|
+
<td><%= link_to t("simple_apm.data.delete"), data_delete_path(date: d[:day]), class: 'apm-danger-link', 'data-confirm' => t("simple_apm.data.confirm_delete") %></td>
|
|
64
64
|
</tr>
|
|
65
65
|
<% end %>
|
|
66
66
|
</tbody>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<div class="apm-page-header">
|
|
2
2
|
<div>
|
|
3
|
-
<h1 class="apm-page-title"
|
|
4
|
-
<p class="apm-page-subtitle"
|
|
3
|
+
<h1 class="apm-page-title"><%= t("simple_apm.index.title") %></h1>
|
|
4
|
+
<p class="apm-page-subtitle"><%= t("simple_apm.index.subtitle") %></p>
|
|
5
5
|
</div>
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<section class="apm-panel">
|
|
9
9
|
<div class="apm-panel-header">
|
|
10
10
|
<div>
|
|
11
|
-
<h2 class="apm-panel-title"
|
|
12
|
-
<p class="apm-panel-subtitle"
|
|
11
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.index.samples_title") %></h2>
|
|
12
|
+
<p class="apm-panel-subtitle"><%= t("simple_apm.index.samples_subtitle") %></p>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
<div class="apm-panel-body">
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
<table id="slow-requests" class="table">
|
|
18
18
|
<thead>
|
|
19
19
|
<tr>
|
|
20
|
-
<th
|
|
21
|
-
<th
|
|
22
|
-
<th
|
|
23
|
-
<th
|
|
24
|
-
<th
|
|
25
|
-
<th
|
|
26
|
-
<th
|
|
27
|
-
<th
|
|
28
|
-
<th
|
|
29
|
-
<th
|
|
20
|
+
<th><%= t("simple_apm.index.request_time") %></th>
|
|
21
|
+
<th><%= t("simple_apm.index.action_name") %></th>
|
|
22
|
+
<th><%= t("simple_apm.index.total_time") %></th>
|
|
23
|
+
<th><%= t("simple_apm.common.db") %></th>
|
|
24
|
+
<th><%= t("simple_apm.common.sql") %></th>
|
|
25
|
+
<th><%= t("simple_apm.common.view") %></th>
|
|
26
|
+
<th><%= t("simple_apm.common.http") %></th>
|
|
27
|
+
<th><%= t("simple_apm.index.memory_mb") %></th>
|
|
28
|
+
<th><%= t("simple_apm.common.server") %></th>
|
|
29
|
+
<th><%= t("simple_apm.index.ip") %></th>
|
|
30
30
|
</tr>
|
|
31
31
|
</thead>
|
|
32
32
|
</table>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
<div class="apm-page-header">
|
|
2
2
|
<div>
|
|
3
|
-
<h1 class="apm-page-title"
|
|
3
|
+
<h1 class="apm-page-title"><%= t("simple_apm.show.title") %></h1>
|
|
4
4
|
<p class="apm-page-subtitle"><%= @request.action_name %>.<%= @request.format %>(<%= @request.method %>)</p>
|
|
5
5
|
</div>
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<div class="apm-metrics">
|
|
9
9
|
<div class="apm-stat">
|
|
10
|
-
<p class="apm-stat-label"
|
|
10
|
+
<p class="apm-stat-label"><%= t("simple_apm.common.total") %></p>
|
|
11
11
|
<div class="apm-stat-value"><%= sec_str @request.during %></div>
|
|
12
12
|
</div>
|
|
13
13
|
<div class="apm-stat">
|
|
14
|
-
<p class="apm-stat-label"
|
|
14
|
+
<p class="apm-stat-label"><%= t("simple_apm.common.db") %></p>
|
|
15
15
|
<div class="apm-stat-value"><%= sec_str @request.db_runtime %></div>
|
|
16
16
|
</div>
|
|
17
17
|
<div class="apm-stat">
|
|
18
|
-
<p class="apm-stat-label"
|
|
18
|
+
<p class="apm-stat-label"><%= t("simple_apm.common.sql") %></p>
|
|
19
19
|
<div class="apm-stat-value"><%= @request.queries_count.to_i %></div>
|
|
20
|
-
<div class="apm-stat-meta"
|
|
20
|
+
<div class="apm-stat-meta"><%= t("simple_apm.show.cached") %> <%= @request.cached_queries_count.to_i %></div>
|
|
21
21
|
</div>
|
|
22
22
|
<div class="apm-stat">
|
|
23
|
-
<p class="apm-stat-label"
|
|
23
|
+
<p class="apm-stat-label"><%= t("simple_apm.common.view") %></p>
|
|
24
24
|
<div class="apm-stat-value"><%= sec_str @request.view_runtime %></div>
|
|
25
25
|
</div>
|
|
26
26
|
<div class="apm-stat">
|
|
27
|
-
<p class="apm-stat-label"
|
|
27
|
+
<p class="apm-stat-label"><%= t("simple_apm.common.http") %></p>
|
|
28
28
|
<div class="apm-stat-value"><%= sec_str @request.net_http_during %></div>
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
<section class="apm-panel">
|
|
33
33
|
<div class="apm-panel-header">
|
|
34
34
|
<div>
|
|
35
|
-
<h2 class="apm-panel-title"
|
|
36
|
-
<p class="apm-panel-subtitle"
|
|
35
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.show.basic_info") %></h2>
|
|
36
|
+
<p class="apm-panel-subtitle"><%= t("simple_apm.show.basic_info_subtitle") %></p>
|
|
37
37
|
</div>
|
|
38
38
|
</div>
|
|
39
39
|
<div class="apm-panel-body">
|
|
40
40
|
<dl class="apm-detail-list">
|
|
41
|
-
<dt
|
|
41
|
+
<dt><%= t("simple_apm.common.url") %></dt>
|
|
42
42
|
<dd><%= @request.url %></dd>
|
|
43
|
-
<dt
|
|
43
|
+
<dt><%= t("simple_apm.show.started_at") %></dt>
|
|
44
44
|
<dd><%= time_label @request.started, true %></dd>
|
|
45
|
-
<dt
|
|
46
|
-
<dd><%= @request.completed_memory.to_f.round(1) %>M
|
|
47
|
-
<dt
|
|
45
|
+
<dt><%= t("simple_apm.show.completed_memory") %></dt>
|
|
46
|
+
<dd><%= @request.completed_memory.to_f.round(1) %>M (<%= t("simple_apm.show.memory_increase") %>: <%= @request.memory_during.to_f.round(1) %>M)</dd>
|
|
47
|
+
<dt><%= t("simple_apm.common.server") %></dt>
|
|
48
48
|
<dd><%= @request.host %></dd>
|
|
49
|
-
<dt
|
|
49
|
+
<dt><%= t("simple_apm.show.ip") %></dt>
|
|
50
50
|
<dd><%= @request.remote_addr %></dd>
|
|
51
51
|
</dl>
|
|
52
52
|
</div>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
<section class="apm-panel">
|
|
57
57
|
<div class="apm-panel-header">
|
|
58
58
|
<div>
|
|
59
|
-
<h2 class="apm-panel-title"
|
|
59
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.show.exception") %></h2>
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
62
62
|
<div class="apm-panel-body">
|
|
@@ -69,18 +69,18 @@
|
|
|
69
69
|
<section class="apm-panel">
|
|
70
70
|
<div class="apm-panel-header">
|
|
71
71
|
<div>
|
|
72
|
-
<h2 class="apm-panel-title"
|
|
73
|
-
<p class="apm-panel-subtitle"
|
|
72
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.show.external_requests") %></h2>
|
|
73
|
+
<p class="apm-panel-subtitle"><%= t("simple_apm.show.external_requests_subtitle") %></p>
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
76
76
|
<div class="apm-panel-body">
|
|
77
77
|
<div class="apm-table-wrap">
|
|
78
78
|
<table class="table table-bordered">
|
|
79
79
|
<tr>
|
|
80
|
-
<th
|
|
81
|
-
<th
|
|
82
|
-
<th
|
|
83
|
-
<th
|
|
80
|
+
<th><%= t("simple_apm.show.started_at") %></th>
|
|
81
|
+
<th><%= t("simple_apm.show.duration") %></th>
|
|
82
|
+
<th><%= t("simple_apm.common.url") %></th>
|
|
83
|
+
<th><%= t("simple_apm.show.other_info") %></th>
|
|
84
84
|
</tr>
|
|
85
85
|
<% @request.net_http_requests.each do |r| %>
|
|
86
86
|
<tr>
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
<section class="apm-panel">
|
|
101
101
|
<div class="apm-panel-header">
|
|
102
102
|
<div>
|
|
103
|
-
<h2 class="apm-panel-title"
|
|
104
|
-
<p class="apm-panel-subtitle"
|
|
103
|
+
<h2 class="apm-panel-title"><%= t("simple_apm.show.sql_list") %></h2>
|
|
104
|
+
<p class="apm-panel-subtitle"><%= t("simple_apm.show.sql_list_subtitle") %></p>
|
|
105
105
|
</div>
|
|
106
106
|
</div>
|
|
107
107
|
<div class="apm-panel-body">
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
<td>time</td>
|
|
113
113
|
<td>name</td>
|
|
114
114
|
<td>sql</td>
|
|
115
|
-
<td
|
|
116
|
-
<td
|
|
115
|
+
<td><%= t("simple_apm.show.time_ms") %></td>
|
|
116
|
+
<td><%= t("simple_apm.show.location") %></td>
|
|
117
117
|
</tr>
|
|
118
118
|
</thead>
|
|
119
119
|
<tbody>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
en:
|
|
2
|
+
simple_apm:
|
|
3
|
+
actions:
|
|
4
|
+
title: "Action Performance"
|
|
5
|
+
subtitle: "Aggregate hits, response time, and SQL behavior by Controller#Action."
|
|
6
|
+
list_title: "Action List"
|
|
7
|
+
list_subtitle: "Click an action name to inspect its slow request samples."
|
|
8
|
+
name: "Name"
|
|
9
|
+
click_count: "Hits"
|
|
10
|
+
avg_response_time: "Avg Response Time"
|
|
11
|
+
avg_db_time: "Avg DB Time"
|
|
12
|
+
avg_sql_count: "Avg SQL Count"
|
|
13
|
+
avg_http_time: "Avg HTTP Time"
|
|
14
|
+
fastest_response_time: "Fastest Response Time"
|
|
15
|
+
slowest_response_time: "Slowest Response Time"
|
|
16
|
+
action_info:
|
|
17
|
+
title: "Action Overview"
|
|
18
|
+
daily_hits: "Daily Hits"
|
|
19
|
+
avg_response_time: "Avg Response Time"
|
|
20
|
+
avg_db_time: "Avg DB Time"
|
|
21
|
+
avg_sql_count: "Avg SQL Count"
|
|
22
|
+
slowest_response_time: "Slowest Response Time"
|
|
23
|
+
fastest: "Fastest"
|
|
24
|
+
slow_samples_title: "Slow Request Samples"
|
|
25
|
+
slow_samples_subtitle: "Keeps the slowest requests for this action."
|
|
26
|
+
response_time: "Response Time"
|
|
27
|
+
access_time: "Access Time"
|
|
28
|
+
memory_delta: "Memory Delta"
|
|
29
|
+
request_id: "Request ID"
|
|
30
|
+
ip: "IP"
|
|
31
|
+
common:
|
|
32
|
+
db: "DB"
|
|
33
|
+
http: "HTTP"
|
|
34
|
+
running: "Running"
|
|
35
|
+
paused: "Paused"
|
|
36
|
+
server: "Server"
|
|
37
|
+
sql: "SQL"
|
|
38
|
+
total: "Total"
|
|
39
|
+
url: "URL"
|
|
40
|
+
view: "View"
|
|
41
|
+
dashboard:
|
|
42
|
+
title: "Performance Overview"
|
|
43
|
+
subtitle: "Review response time and traffic trends in 10-minute intervals."
|
|
44
|
+
stat_points: "Data Points"
|
|
45
|
+
ten_minute_intervals: "10-minute intervals"
|
|
46
|
+
hits: "Hits"
|
|
47
|
+
current_day_total: "Current day total"
|
|
48
|
+
peak_avg_response: "Peak Avg Response"
|
|
49
|
+
interval_peak: "Interval peak"
|
|
50
|
+
current_collection: "Collection"
|
|
51
|
+
redis_status: "Redis status"
|
|
52
|
+
query_date: "Query Date"
|
|
53
|
+
switch_in_top_right: "Switchable in the top right"
|
|
54
|
+
response_time: "Response Time"
|
|
55
|
+
response_time_subtitle: "Average response time for each interval."
|
|
56
|
+
hit_count: "Hit Count"
|
|
57
|
+
hit_count_subtitle: "Request count for each interval."
|
|
58
|
+
data:
|
|
59
|
+
title: "Data Management"
|
|
60
|
+
subtitle: "Manage collection status and historical Redis data."
|
|
61
|
+
collection_status: "Collection Status"
|
|
62
|
+
collection_subtitle: "When paused, middleware stops recording new request performance data."
|
|
63
|
+
pause_collection: "Pause Collection"
|
|
64
|
+
resume_collection: "Resume Collection"
|
|
65
|
+
confirm_pause: "Pause collection?"
|
|
66
|
+
delete_data: "Delete Data"
|
|
67
|
+
delete_subtitle: "Clean historical data by retention period, or delete one day."
|
|
68
|
+
keep_one_week: "Keep One Week"
|
|
69
|
+
keep_one_month: "Keep One Month"
|
|
70
|
+
confirm_delete_week: "Delete all data older than one week?"
|
|
71
|
+
confirm_delete_month: "Delete all data older than one month?"
|
|
72
|
+
history_title: "Historical Data"
|
|
73
|
+
history_subtitle: "View collection volume and average response time by date."
|
|
74
|
+
date: "Date"
|
|
75
|
+
request_count: "Requests"
|
|
76
|
+
avg_response_time: "Avg Response Time"
|
|
77
|
+
operation: "Operation"
|
|
78
|
+
delete: "Delete"
|
|
79
|
+
confirm_delete: "Delete this data?"
|
|
80
|
+
flash:
|
|
81
|
+
deleted: "Deleted successfully."
|
|
82
|
+
deleted_count: "Deleted %{count} records successfully."
|
|
83
|
+
no_data_for_day: "No data for this day."
|
|
84
|
+
unknown_action: "Unknown action."
|
|
85
|
+
updated: "Updated successfully."
|
|
86
|
+
index:
|
|
87
|
+
title: "Slow Requests"
|
|
88
|
+
subtitle: "Sort by response duration to locate DB, SQL, View, and external request cost."
|
|
89
|
+
samples_title: "Request Samples"
|
|
90
|
+
samples_subtitle: "Loads recent slow request records by default."
|
|
91
|
+
request_time: "Request Time"
|
|
92
|
+
action_name: "Action Name"
|
|
93
|
+
total_time: "Total Time"
|
|
94
|
+
memory_mb: "Memory (Mb)"
|
|
95
|
+
ip: "IP"
|
|
96
|
+
layout:
|
|
97
|
+
collected: "Collecting data"
|
|
98
|
+
date: "Date"
|
|
99
|
+
language: "Language"
|
|
100
|
+
nav_actions: "Actions"
|
|
101
|
+
nav_dashboard: "Dashboard"
|
|
102
|
+
nav_data: "Data"
|
|
103
|
+
nav_slow_requests: "Slow Requests"
|
|
104
|
+
redis_info:
|
|
105
|
+
current_memory: "Current Memory"
|
|
106
|
+
current_memory_rss: "Current Memory (RSS)"
|
|
107
|
+
db: "DB"
|
|
108
|
+
peak_memory: "Peak Memory"
|
|
109
|
+
redis_version: "Redis Version"
|
|
110
|
+
system_memory: "System Memory"
|
|
111
|
+
locales:
|
|
112
|
+
en: "English"
|
|
113
|
+
zh-CN: "中文"
|
|
114
|
+
show:
|
|
115
|
+
title: "Request Details"
|
|
116
|
+
cached: "Cached"
|
|
117
|
+
basic_info: "Basic Info"
|
|
118
|
+
basic_info_subtitle: "Request source, time, and memory changes."
|
|
119
|
+
started_at: "Started At"
|
|
120
|
+
completed_memory: "Completed Memory"
|
|
121
|
+
memory_increase: "Increase"
|
|
122
|
+
ip: "IP"
|
|
123
|
+
exception: "Exception"
|
|
124
|
+
external_requests: "External Requests"
|
|
125
|
+
external_requests_subtitle: "Net::HTTP calls triggered during this request."
|
|
126
|
+
duration: "Duration"
|
|
127
|
+
other_info: "Other Info"
|
|
128
|
+
sql_list: "SQL List"
|
|
129
|
+
sql_list_subtitle: "Click SQL text to view the complete statement."
|
|
130
|
+
time_ms: "Time (ms)"
|
|
131
|
+
location: "Location"
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
zh-CN:
|
|
2
|
+
simple_apm:
|
|
3
|
+
actions:
|
|
4
|
+
title: "Action 性能"
|
|
5
|
+
subtitle: "按 Controller#Action 聚合访问次数、响应时间和 SQL 行为。"
|
|
6
|
+
list_title: "Action 列表"
|
|
7
|
+
list_subtitle: "点击 Action 名称查看该接口的慢请求样本。"
|
|
8
|
+
name: "Name"
|
|
9
|
+
click_count: "点击次数"
|
|
10
|
+
avg_response_time: "平均响应时间"
|
|
11
|
+
avg_db_time: "平均 DB 时间"
|
|
12
|
+
avg_sql_count: "平均 SQL 次数"
|
|
13
|
+
avg_http_time: "平均 HTTP 访问时间"
|
|
14
|
+
fastest_response_time: "最快响应时间"
|
|
15
|
+
slowest_response_time: "最慢响应时间"
|
|
16
|
+
action_info:
|
|
17
|
+
title: "Action 概况"
|
|
18
|
+
daily_hits: "当日点击次数"
|
|
19
|
+
avg_response_time: "平均响应时间"
|
|
20
|
+
avg_db_time: "平均 DB 时间"
|
|
21
|
+
avg_sql_count: "平均 SQL 次数"
|
|
22
|
+
slowest_response_time: "最慢响应时间"
|
|
23
|
+
fastest: "最快"
|
|
24
|
+
slow_samples_title: "慢请求样本"
|
|
25
|
+
slow_samples_subtitle: "保留该 Action 下响应最慢的请求。"
|
|
26
|
+
response_time: "响应时间"
|
|
27
|
+
access_time: "访问时间"
|
|
28
|
+
memory_delta: "内存波动"
|
|
29
|
+
request_id: "请求 ID"
|
|
30
|
+
ip: "访问 IP"
|
|
31
|
+
common:
|
|
32
|
+
db: "DB"
|
|
33
|
+
http: "HTTP"
|
|
34
|
+
running: "运行中"
|
|
35
|
+
paused: "已暂停"
|
|
36
|
+
server: "Server"
|
|
37
|
+
sql: "SQL"
|
|
38
|
+
total: "Total"
|
|
39
|
+
url: "URL"
|
|
40
|
+
view: "View"
|
|
41
|
+
dashboard:
|
|
42
|
+
title: "性能概览"
|
|
43
|
+
subtitle: "按 10 分钟粒度观察响应时间和访问量趋势。"
|
|
44
|
+
stat_points: "统计点"
|
|
45
|
+
ten_minute_intervals: "10 分钟区间"
|
|
46
|
+
hits: "访问次数"
|
|
47
|
+
current_day_total: "当前日期累计"
|
|
48
|
+
peak_avg_response: "最高平均响应"
|
|
49
|
+
interval_peak: "区间峰值"
|
|
50
|
+
current_collection: "当前采集"
|
|
51
|
+
redis_status: "Redis 状态"
|
|
52
|
+
query_date: "查询日期"
|
|
53
|
+
switch_in_top_right: "可在右上角切换"
|
|
54
|
+
response_time: "响应时间"
|
|
55
|
+
response_time_subtitle: "每个时间段的平均响应耗时。"
|
|
56
|
+
hit_count: "访问次数"
|
|
57
|
+
hit_count_subtitle: "每个时间段的请求数量。"
|
|
58
|
+
data:
|
|
59
|
+
title: "数据管理"
|
|
60
|
+
subtitle: "管理采集开关和历史 Redis 数据。"
|
|
61
|
+
collection_status: "采集状态"
|
|
62
|
+
collection_subtitle: "暂停后 middleware 不再记录新的请求性能数据。"
|
|
63
|
+
pause_collection: "暂停收集数据"
|
|
64
|
+
resume_collection: "继续收集数据"
|
|
65
|
+
confirm_pause: "确定暂停吗?"
|
|
66
|
+
delete_data: "删除数据"
|
|
67
|
+
delete_subtitle: "按保留周期清理历史数据,或删除单日数据。"
|
|
68
|
+
keep_one_week: "保留一周数据"
|
|
69
|
+
keep_one_month: "保留一个月数据"
|
|
70
|
+
confirm_delete_week: "确定删除所有一周以前的数据?"
|
|
71
|
+
confirm_delete_month: "确定删除所有一个月以前的数据?"
|
|
72
|
+
history_title: "历史数据"
|
|
73
|
+
history_subtitle: "以日期为单位查看采集量和平均响应时间。"
|
|
74
|
+
date: "日期"
|
|
75
|
+
request_count: "请求数量"
|
|
76
|
+
avg_response_time: "平均响应时间"
|
|
77
|
+
operation: "操作"
|
|
78
|
+
delete: "删除"
|
|
79
|
+
confirm_delete: "确定删除?"
|
|
80
|
+
flash:
|
|
81
|
+
deleted: "删除成功!"
|
|
82
|
+
deleted_count: "成功删除 %{count} 条数据"
|
|
83
|
+
no_data_for_day: "当日没有数据"
|
|
84
|
+
unknown_action: "未知操作!"
|
|
85
|
+
updated: "设置成功!"
|
|
86
|
+
index:
|
|
87
|
+
title: "慢事务列表"
|
|
88
|
+
subtitle: "按响应耗时排序,快速定位 DB、SQL、View 和外部请求占比。"
|
|
89
|
+
samples_title: "请求样本"
|
|
90
|
+
samples_subtitle: "默认加载最近的慢请求记录。"
|
|
91
|
+
request_time: "请求时间"
|
|
92
|
+
action_name: "Action Name"
|
|
93
|
+
total_time: "Total Time"
|
|
94
|
+
memory_mb: "Memory (Mb)"
|
|
95
|
+
ip: "IP"
|
|
96
|
+
layout:
|
|
97
|
+
collected: "数据收集中"
|
|
98
|
+
date: "统计日期"
|
|
99
|
+
language: "语言"
|
|
100
|
+
nav_actions: "Action 列表"
|
|
101
|
+
nav_dashboard: "Dashboard"
|
|
102
|
+
nav_data: "数据管理"
|
|
103
|
+
nav_slow_requests: "慢事务列表"
|
|
104
|
+
redis_info:
|
|
105
|
+
current_memory: "当前内存占用"
|
|
106
|
+
current_memory_rss: "当前内存占用 (RSS)"
|
|
107
|
+
db: "DB"
|
|
108
|
+
peak_memory: "占用内存峰值"
|
|
109
|
+
redis_version: "Redis 版本"
|
|
110
|
+
system_memory: "系统内存"
|
|
111
|
+
locales:
|
|
112
|
+
en: "English"
|
|
113
|
+
zh-CN: "中文"
|
|
114
|
+
show:
|
|
115
|
+
title: "请求详情"
|
|
116
|
+
cached: "缓存"
|
|
117
|
+
basic_info: "基础信息"
|
|
118
|
+
basic_info_subtitle: "请求来源、时间和内存变化。"
|
|
119
|
+
started_at: "开始时间"
|
|
120
|
+
completed_memory: "结束时内存"
|
|
121
|
+
memory_increase: "增幅"
|
|
122
|
+
ip: "访问 IP"
|
|
123
|
+
exception: "报错信息"
|
|
124
|
+
external_requests: "外部请求"
|
|
125
|
+
external_requests_subtitle: "请求过程中触发的 Net::HTTP 调用。"
|
|
126
|
+
duration: "耗时"
|
|
127
|
+
other_info: "其他信息"
|
|
128
|
+
sql_list: "SQL 列表"
|
|
129
|
+
sql_list_subtitle: "点击 SQL 文本查看完整语句。"
|
|
130
|
+
time_ms: "时间 (ms)"
|
|
131
|
+
location: "位置"
|
data/config/routes.rb
CHANGED
data/lib/simple_apm/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simple_apm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- yuanyin.xia
|
|
@@ -126,6 +126,8 @@ files:
|
|
|
126
126
|
- app/views/simple_apm/apm/data.html.erb
|
|
127
127
|
- app/views/simple_apm/apm/index.html.erb
|
|
128
128
|
- app/views/simple_apm/apm/show.html.erb
|
|
129
|
+
- config/locales/simple_apm.en.yml
|
|
130
|
+
- config/locales/simple_apm.zh-CN.yml
|
|
129
131
|
- config/routes.rb
|
|
130
132
|
- config/simple_apm.yml
|
|
131
133
|
- lib/generators/simple_apm/install_generator.rb
|