simple_apm 1.0.14 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: eb5367e4179faa354aa59c16c8bd9f13ef706e8f
4
- data.tar.gz: f46424a7e5257d7b29821b5b055e4e8068c51f8d
2
+ SHA256:
3
+ metadata.gz: ac42ca5ebe7f45973a953586a00e22bb887d77da218f11ddf734dfb90975cbf8
4
+ data.tar.gz: d6ae570304dd85c0cb7bbc726fb42435f7a2d0ec461d6f2f3e56796bfed68353
5
5
  SHA512:
6
- metadata.gz: 0d3f3a4be257b6148bf1baa872f39774166e021a3926333c372cd9122f735e2e0271b24d5d091d6dfd1262306800dcd3b9ebf76d49c17a825884a9be9b4db647
7
- data.tar.gz: ac480c8f99332d9fe00b3c82bc14d685589633754d96ac4e6703722ab2c8e6d85d3d5e3d60da4cae3fbe1a773ed48be5b3d88c057dcca1b8e443158d8fc8628f
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
- 围绕Rack记录请求级别的相关信息,使用redis作为数据存储/计算工具来记录慢事务
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
- 数据传递核心为:[Active Support Instrumentation](https://guides.rubyonrails.org/active_support_instrumentation.html)
16
+ ## How It Works
18
17
 
19
- 处理Instrument方式为开启一个不影响主线程的常驻线程,循环计算处理数据
18
+ SimpleApm records request-level data around Rack and uses Redis for storage and aggregation.
20
19
 
21
- 获取内存信息用到了gem: [get_process_mem](https://github.com/schneems/get_process_mem),经测试在linux系统耗时在1ms以下
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
- ![Dashboard](public/dashboard.jpg)
29
+ ![Dashboard](public/dashbord.png)
27
30
 
28
- - 慢请求列表
31
+ - Slow Requests
29
32
  ![Slow Requests](public/slow_requests.png)
30
33
 
31
- - Action列表
34
+ - Action List
32
35
  ![Action List](public/action_list.png)
33
36
 
34
- - 请求详情
37
+ - Request Info
35
38
  ![Request Info](public/request_info.png)
36
39
 
37
- - Action概况
38
- ![Action Info](public/action_info.png)
39
-
40
- - 数据管理
41
- ![Data](public/data-manage.png)
40
+ - Action Info
41
+ ![Action Info](public/action_detail.png)
42
42
 
43
+ - Data Management
44
+ ![Data Management](public/data-manage.png)
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 'simple_apm'
66
+ gem "simple_apm"
61
67
  ```
62
68
 
63
- And then execute:
69
+ Then run:
70
+
64
71
  ```bash
65
- $ bundle
72
+ bundle
66
73
  ```
67
74
 
68
-
69
75
  ## Contributing
70
- Contribution directions go here.
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).
data/Rakefile CHANGED
@@ -17,11 +17,6 @@ end
17
17
  APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
18
  load 'rails/tasks/engine.rake'
19
19
 
20
-
21
- load 'rails/tasks/statistics.rake'
22
-
23
-
24
-
25
20
  require 'bundler/gem_tasks'
26
21
 
27
22
  require 'rake/testtask'