rails_performance 0.0.1.12 → 0.0.1.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ead4f058f985e1601b4e3eb4318867b40da0952c4ea30092afcd466e50f98f63
4
- data.tar.gz: e5bbc0934281a451c292a62f63024778c2f2ea627f94b2f7a836080a27e2516c
3
+ metadata.gz: 662fb596120e49bc5903039cdb5b26f9575ba318f5d944df649f745287ea56a8
4
+ data.tar.gz: f4cac11d6142ce2151365706b924af3be8521f06ee4294b762a8c7d96ce4873d
5
5
  SHA512:
6
- metadata.gz: f2c6d72b1550a5adcf4fa73f5b6580241a06cd32d68e1b3ea5b7587c7ba86ad3070911802ea9abac5ced6c8c90f1f925f98b4e4395d41039364bd2e48f320552
7
- data.tar.gz: 5399cda1f85d289862ef1a9c7349061e5d520044df2bfd0dbd376da866835a55b4b495271aed577a31f57cb7e35a1ec8b2b4bd6542c3973339614322bbc2d806
6
+ metadata.gz: 93905eb36dd9be60f981c4dc3c028610614fa4ad25f65778ccd16d9c56cfaa6d4a09461be3c9aa5a82073726584d29f7b75a3680077fc4a220dd11476a8e222b
7
+ data.tar.gz: a56f4c93c89dfe9b4bb99110a846ad8c9b5e97d45af5800d8517709a2ed60f8696b5298bfb0467aacf50d364dc9e66cb2ce78b195233edbed12d1b2478f30aa9
data/README.md CHANGED
@@ -1,6 +1,22 @@
1
- # RailsPerformance
1
+ # Rails Performance
2
2
 
3
- Short description and motivation.
3
+ Self-hosted tool to monitor the performance of your Ruby on Rails application.
4
+
5
+ This is **simple and free alternative** to New Relic, Datadog or other similar services.
6
+
7
+ It allows you to track:
8
+
9
+ - throughput report (see amount of requests per minute)
10
+ - an average response time
11
+ - the slowest controllers & actions
12
+ - duration of total time spent per request, views rendering, DB execution
13
+ - simple crash reports
14
+
15
+ All data is stored in local Redis and not sent to 3rd party servers.
16
+
17
+ ## Production
18
+
19
+ Gem is production-ready. At least on my applications with ~800 unique users per day it works well.
4
20
 
5
21
  ## Usage
6
22
 
@@ -8,9 +24,22 @@ Create `config/initializers/rails_performance.rb`
8
24
 
9
25
  ```ruby
10
26
  RailsPerformance.setup do |config|
11
- config.redis = Redis.new
12
- config.days = 3
13
- end
27
+ config.redis = Redis::Namespace.new("#{Rails.env}-rails-performance", redis: Redis.new)
28
+ config.duration = 24.hours
29
+
30
+ config.debug = false # currently not used>
31
+ config.enabled = true
32
+
33
+ # protect your Performance Dashboard with HTTP BASIC password
34
+ config.http_basic_authentication_enabled = false
35
+ config.http_basic_authentication_user_name = 'rails_performance'
36
+ config.http_basic_authentication_password = 'password12'
37
+
38
+ # if you need an additional rules to check user permissions
39
+ config.verify_access_proc = proc { |controller| true }
40
+ # for example when you have `current_user`
41
+ # config.verify_access_proc = proc { |controller| controller.current_user && controller.current_user.admin? }
42
+ end if defined?(RailsPerformance)
14
43
  ```
15
44
 
16
45
  ## Installation
@@ -25,15 +54,57 @@ And then execute:
25
54
  $ bundle
26
55
  ```
27
56
 
57
+ You must also have installed Redis server, because this gem is storing data into it.
58
+
59
+ After installation and configuration, start your Rails application, make a few requests, and open `https://localhost:3000/rails/performance` URL.
60
+
61
+ ## Limitations
62
+
63
+ - it doesn't track params of POST/PUT requests
64
+ - it doesn't track SQL queries (at least for now)
65
+ - it doesn't track Redis/ElasticSearch or other apps
66
+ - it can't compare historical data
67
+ - depending on your load you may need to reduce time of for how long you store data, because all calculations are done in memory and it could take some time for high-load apps
68
+
69
+ ## Redis
70
+
71
+ All information is stored into Redis. The default expiration time is set to `config.duration` from the configuration.
72
+
73
+ ## Development & Testing
74
+
75
+ Just clone the repo, setup dummy app (`rails db:migrate`).
76
+
77
+ After this:
78
+
79
+ - rails s
80
+ - rake tests
81
+
82
+ Like a regular web development.
83
+
84
+ Please note that to simplify integration with other apps all CSS/JS are bundled inside, and delivered in body of the request. This is to avoid integration with assets pipeline or webpacker.
85
+
86
+ ## Why
87
+
88
+ The idea of this gem grew from curriosity how many RPM my app receiving per day. Later it evolutionated to something more powerful.
89
+
28
90
  ## TODO
29
91
 
30
- - documentation
92
+ - documentation in Readme
93
+ - generator for initial config
94
+ - gif with demo
31
95
  - time/zone config?
32
96
  - CI for tests
97
+ - connected charts
98
+ - ability to zoom to see requests withing specific datime range
33
99
  - better hint
34
100
  - export to csv
35
- - http basic auth
101
+ - http basic auth config
102
+ - current_user auth config
36
103
  - better stats tooltip, do not show if nothing to show
104
+ - dark mode toggle? save to the cookies
105
+ - integration with elastic search
106
+ - monitor active job (sidekiq)?
107
+ - logo?
37
108
 
38
109
  ## Contributing
39
110
 
@@ -0,0 +1 @@
1
+ <?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="512px" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="_x33_7"><g><g><path d="M348.722,390.683c0.051-0.076,0.075-0.177,0.128-0.304L348.722,390.683z" style="fill-rule:evenodd;clip-rule:evenodd;"/><path d="M500.025,313.289c-2.99-0.304-5.984-0.633-8.238-0.937 c-0.994-0.126-1.84-0.228-2.479-0.329c0.257-0.177,0.485-0.356,0.742-0.531c-0.257-0.153-0.536-0.304-0.82-0.458 c0.667-0.53,0.538-0.937-0.075-1.239c0.715-0.508,1.431-0.987,1.715-1.976c-0.896-0.911-1.945,0.71-3.225,0.684 c-1.151,0.051-2.531,0.151-3.991,0.253c-1.228-0.102-2.453-0.202-3.529-0.278c1.151-0.329,2.456-0.403,3.915-0.329 c0.152-0.405,0.307-0.785,0.459-1.189c-2.02,0.229-4.066,0.202-6.114,0.127c7.956-0.835,17.651-1.773,28.395-2.837 c-0.023-0.024-6.033-0.609-11.966-1.164c-0.589-0.077-0.813-0.126-1.813-0.203v-4.965c-2-0.253-4.404-0.632-6.628-1.063 c-0.334-6.838-4.991-4.635-6.578-1.417c0.025,0.176,0.066,0.303,0.09,0.455c-0.436,0.049-0.89,0.102-1.351,0.15 c-0.256-3.394-1.659-3.267-2.326,0.255c-1.663,0.15-3.296,0.177-4.653-0.025c0.255-0.38,0.487-1.04,0.487-2.56 c-2.329-0.354-6.063-2.937-9.105,1.318c0.486-0.38,0.664,0.227,0.791,1.012c-0.69-0.024-1.38-0.075-2.045-0.126 c0.332-0.43,0.665-1.014,0.845-1.621c-0.792-0.859-2.354-1.492-2.865,0.382c-0.333,0.05-0.64,0.15-0.973,0.253l0.051-1.471 c0.282-0.076,0.563-0.228,0.847-0.353c0.535-0.128,1.047-0.255,1.533-0.356c0.869,0.279,1.74,0.404,2.404-0.583 c1.637-0.379,3.019-0.709,3.837-0.885c2.02-0.456,2.935-1.875,4.623-3.978c0.485-0.074,1.017-0.379,1.017-1.365 c0-0.024,0-0.052,0-0.078c1-0.633,1.311-1.29,2.028-2c-1.05-0.102-1.647-0.177-2.362-0.277c-0.205-0.254-0.389-0.28-0.646-0.077 c-0.152,0-0.256-0.025-0.438-0.05c2.764-3.851,4.083,0.024,6.845-5.319c-0.871-0.076-1.479-0.127-2.657-0.202 c2.687-2.026,4.736-3.596,7.142-5.471c-1.871-2.532-5.015,0.658-7.803,1.571c-0.254-1.065-0.613-2.457-0.894-3.622 c0.486-0.253,1.664-1.37,2.405-1.24c2.072,0.404,4.222-0.913,6.958-4.054c1.764-2.026,3.605-2.582,5.883-4.127 c-1.561-3.95-4.963-0.786-8.084,1.394c-0.739-0.052-1.305-0.178-1.433-0.405c2.1-1.268,4.196-1.899,6.549-6.587 c-0.664-3.721-3.478-0.1-5.397,0.584c-1.941,0.709-3.836,1.19-5.806,1.75c-0.255-2.129-0.536-4.129-0.819-6.384 c1.689-0.631,3.352-1.293,5.321-2.103c0.128-3.164,0.206-5.444,0.256-7.292c-1.866-0.532-3.274-2.381-5.116-1.267 c-7.852,4.737-13.351,1.342-20.004,1.75c-6.572,0.379-12.992,0.1-19.416-0.181c-5.779-0.227-11.638-0.328-17.879,0.737 c-0.794,0.152-1.534,0.152-2.252,0.101c0.078-1.824,0.641-3.521,1.025-5.217c0.486-0.027,0.971-0.051,1.51-0.075 c0.537,0.302,1.047,0.96,1.585,1.061c2.122,0.405,3.632-0.581,5.144-1.014c0.05-0.047,0.074-0.174,0.1-0.277 c8.697-0.253,20.361-0.581,33.639-1.241c0-0.025-5.73-0.937-11.461-1.875c-5.729-0.96-11.432-1.998-11.332-2.379 c5.653-2.152-4.424-3.369-8.518-4.079c-3.3-0.579-6.138-0.86-8.876-1.01c-0.537-0.052-1.073-0.052-1.585-0.077 c2.785-0.255,5.575-0.532,8.414-0.935c1.945-0.306,4.016-0.763,6.164-1.294c0.154,0.103,0.282,0.077,0.436-0.101 c1.254-0.328,2.508-0.658,3.787-1.038c3.094-0.887,6.021-1.874,8.99-2.684c0.254,0.075,0.598,0.101,0.598,0.101v-0.33 c1-0.051,0.629-0.103,0.855-0.176c7.244-1.217,25.064-2.887,47.144-5.093c0,0-5.915-0.581-11.875-1.164 c-2.991-0.304-5.937-0.632-8.187-0.937c-0.998-0.128-1.828-0.229-2.468-0.33c0.229-0.152,0.491-0.354,0.749-0.506 c-0.283-0.152-0.564-0.33-0.845-0.482c2.583-2-6.545-2.33-10.484-2.634c-3.504-0.304-6.716-0.352-9.579-0.251 c-1.716,0.075-3.311,0.176-5.311,0.277v-0.935c-4-0.433-7.736-1.243-11.801-2.18c-1.076,0.128-2.155,0.304-3.359,0.431 c0.565-0.377,1.175-0.784,1.763-1.241c0.077-0.049,0.151-0.103,0.202-0.15c0.332,1.848,1.755,0.352,2.087-1.318 c0-0.077-0.021-0.127-0.048-0.178c1.229-0.885,2.51-1.796,4.019-2.859c-0.331-0.028-0.609-0.028-0.867-0.051 c0.027-0.101,0.026-0.229,0.026-0.382c-0.203-0.075-0.432-0.201-0.638-0.354c1.178-0.557,2.072,0.204,3.428-1.698 c-0.589-0.023-0.997-0.049-1.767-0.101c0.975-0.508,1.844-0.96,2.662-1.391c0.536,1.846,2.353,0.251,2.992-1.698 c-0.818-0.887-2.381-1.522-2.889,0.354c-0.309,0.052-0.641,0.152-0.975,0.253l0.078-1.468c0.896-0.255,1.814-0.785,2.89-1.644 c1.128-0.887,2.354-1.142,3.837-1.826c-1.688-2.48-5.603,0.784-7.903,0.581c1.534-1.291,3.12-2.474,4.756-3.474h-13.327 c0.18,0,0.385,0.182,0.563-0.197c-0.843-0.053-1.48,0.305-2.66,0.204c2.688-2.001,4.733-3.368,7.163-5.267 c-1.892-2.508-5.039,0.758-7.827,1.67c-0.256-1.064-0.613-2.405-0.895-3.546c0.486-0.253,1.688-1.367,2.402-1.214 c2.074,0.379,4.223-0.9,6.959-4.065c1.766-2.026,3.633-2.55,5.885-4.121c-1.563-3.925-4.964-0.783-8.059,1.421 c-0.768-0.075-1.329-0.175-1.459-0.403c2.1-1.292,4.195-1.898,6.55-6.608c-0.641-3.697-3.479-0.101-5.397,0.608 c-1.944,0.709-3.838,1.192-5.807,1.747c-0.256-2.128-0.512-4.152-0.818-6.407c1.688-0.634,3.35-1.265,5.346-2.077 c0.103-3.166,0.18-5.47,0.257-7.32c-1.868-0.506-3.276-2.379-5.142-1.265c-7.83,4.735-13.328,1.342-20.005,1.749 c-6.573,0.403-12.993,0.126-19.415-0.152c-5.781-0.255-11.639-0.332-17.88,0.733c-1.737,0.304-3.351-0.025-4.373-0.101 c-6.038,4.634-10.592,3.114-15.349,3.114c-1.433-0.025-2.865-0.025-4.297-0.025c0.154-0.253,0.306-0.532,0.436-0.811 c-5.065-1.367-11.18,0.382-16.27-1.364c-0.512-0.837-1.305-2.303-2.251-2.303h0.229l0.078-0.382c0.152,0,0.28,0.086,0.408,0.112 c4.682,1.773,9.771,1.741,16.473,0.271c0.026-0.049,0.026-0.053,0.026-0.105c1.382-0.101,2.84-0.292,4.322-0.52 c0.153,0.101,0.281,0.107,0.462-0.045c4.834-0.787,10.001-1.998,14.579-2.757c7.161-0.531,24.583-0.658,46.274-1.773 c0,0-5.73-0.935-11.46-1.846c-5.729-0.99-11.435-2.026-11.332-2.381c5.679-2.179-4.426-3.395-8.519-4.104 c-3.299-0.582-6.139-0.835-8.876-1.011c-2.762-0.154-5.372-0.206-8.236-0.433c-3.733-0.302-7.341-0.785-10.923-1.391 c-3.555-0.583-7.084-1.218-10.588-1.875c-3.508-0.658-6.985-1.316-10.489-1.822c-3.505-0.508-7.034-0.887-10.616-1.04 c-2.711-0.126-5.447-0.227-8.185-0.302c0.896-0.356,1.815-0.482,2.533-2.279c-0.819,0.202-4.913,1.82-2.89,1.494 c0.202-0.051,0.076,0.53,0.126,0.785c-0.64-0.026-1.28-0.051-1.892-0.051c-0.078-0.253-0.258-0.305-0.461-0.178 c0-0.025,0.024-0.025,0.024-0.051c-0.077,0.077-0.18,0.154-0.255,0.204c-1.715-0.049-3.455-0.049-5.167-0.075 c0.126-0.051,0.255-0.128,0.383-0.178c-0.103-0.911-1.406-0.684-1.918,0.152c-0.896,0-1.765-0.026-2.661-0.026 c0.383-0.304,0.69-0.735,0.819-1.292c-0.589,0.178-1.177,0.178-1.79,0.178c0.052-0.33,0.076-0.658,0.229-0.557 c1.458,0,2.762-0.455,3.862-0.532c0.153,0.051,0.102,0.558,0.129,0.836c0.612-1.318,1.021-0.658,1.688-0.759 c2.635-0.407,5.449-0.735,8.108-0.887c1.331-0.075,2.636-0.126,3.889-0.152c1.228,0,2.405,0.026,3.479,0.077 c0.102-0.077,0.178-0.128,0.281-0.178c0.255-0.026,0.613-0.026,0.971-0.101c0.819,0.176,1.638,0.024,2.764-0.431 c0.078-0.026,0.051,0.176,0.051,0.354c-1.816,2.433-3.762,0.405-5.347,1.469c0.181,0.051,0.486-0.15,0.358,0.482 c-1.074-1.012-3.198-2.051-4.962,0.913c7.111-1.494,15.321,1.19,22.613-0.051c-0.437-0.253-2.532-1.597-1.97,0.025 c-2.482-3.116-7.188,0.328-9.542-2.737c0.229,0.051,0.46,0.077,0.69,0.025c0.869-0.176,1.637,0.305,2.48,0.305 c3.07-0.026,6.267,0.278,9.234-0.101c0.64,0.735,2.124-0.178,3.07-0.557c0.281,0-0.076,1.063,0.281,0.937 c1.688-0.482,3.353-0.176,5.398-0.632c-1.152-1.04-3.146-1.114-4.734-0.126c-0.128-0.152,0.104-0.887-0.128-0.887 c-0.382,1.241-0.356-0.101-0.588-0.126c-2.66,0.684-4.859,0.48-6.88,0.229c0.486-1.217,1.049-0.709,1.584-1.039 c0.488,1.873,2.38-1.545,3.096-0.204c0.973-1.417,1.791-0.152,2.838-1.494c0.206-0.024,0.053,0.506,0.259,0.482 c1.176-1.091,2.583-0.735,3.556,0.253c-0.59,0.583-1.15-0.026-1.536,0.986c0.462-0.227,0.998,0,1.587-0.302 c0.305-0.836-0.18-0.457,0.127-1.316c1.586,0.684,3.66-0.379,5.219,0.354c0.23,0.101,0.307,0.658,0.563,0.733 c0.486,0.178,1.305-0.429,1.867-0.302c0.869,0.228,1.459,0.302,2.021,0.684c0.384-0.457,0.766-0.836,1.151-1.089 c-0.206,0.558-0.358,0.607-0.13,0.708c0.666-0.658,0.896-0.784,1.229,0.026c-0.256,0.66-0.384,0.077-0.64,0.862 c0.46,0.457,1.049-0.305,1.662-1.215c-0.076-1.597-1.1-0.684-1.79-0.937c-1.254-0.482-2.583-1.595-3.991-1.241 c-0.92-1.824-3.17,0.988-3.938-1.241c-0.308,0.051-0.588,0.482-0.896,0.608c0.052-0.836,0.052-0.887-0.23-1.269 c-0.308,0.711,0.18,0.812-0.128,1.142c-0.612,0.682,0-0.962-0.333-1.04c-1.125-0.051-2.123-0.253-3.196-0.431 c-1.508-0.279-4.222,1.419-4.86,0.077c-2.098-0.152-4.502-0.152-7.008-0.128c-0.666-0.986-2.328-0.607-3.07,0.025 c-2.149,0.052-4.323,0.077-6.395,0.026c-1.049-0.026-1.688-0.862-2.916-0.785c-4.35,0.354-9.338,0.583-14.273,1.164 c-0.64-0.328-1.356-0.302-2.098-0.202c1.328-0.506,2.531-0.126,3.811-1.014c2.916,0.381,6.42-0.684,9.618-0.431 c0.946,0.077,2.353,0.229,3.248,0c0.46-0.125,0.64,0.025,1.126,0c0.204-0.024,0.408-0.024,0.614-0.024 c1.048,1.063,3.146,0.658,4.63,1.038c0.18-0.405,0.332-0.785,0.512-1.19c-0.078-0.025-0.154-0.051-0.232-0.101 c1.613-0.026,3.199-0.077,4.683-0.178c0.512-0.026,1.355-0.354,1.663-0.178c0.152,0.103,0.076,0.658,0.23,0.658 c0.383,0.051,0.922-0.379,1.33-0.354c1.202,0.075,2.635,0.229,4.041,0.204c1.534-0.026,3.02,0.354,4.375,0.733 c0.178,0.051,0.512-0.405,0.691-0.405c0.28,0.025,0.459,0.506,0.716,0.506c6.368,0.051,13.096,0.709,20.155,0.381 c0.462-0.229-0.076,0.733,0.384,0.504c0.486-0.429,0.997-0.809,1.511-1.366c-1.843-1.215-4.656,0.836-5.858-1.444 c-2.788,1.824-4.632-1.038-7.034,0.051c-0.128-0.051-0.256-0.101-0.385-0.101c0.053-0.103,0.129-0.204,0.205-0.304 c7.7-0.355,15.193,1.672,24.428-1.85c0.537-0.834-2.531-0.455-2.48-1.265c-1.176-0.938-3.07-1.014-4.654-0.861 c-0.794,0.075-1.512,0.204-2.021,0.304c-0.539,0.126-0.818,0.228-0.818,0.228c-3.889-1.67-5.552-0.457-9.363-2.558 c-1.022,0.202-2.021,0.405-3.018,0.558c-0.076-0.126-0.206-0.253-0.41-0.305c-0.127,0.152-0.178,0.305-0.23,0.405 c-0.178,0.026-0.357,0.075-0.537,0.101c-0.127-0.126-0.256-0.253-0.383-0.354c0.103-0.077,0.179-0.152,0.28-0.227 c2.202-0.836,4.431-5.04,4.431-5.04c-3.354,0.8-5.318,0.144-8.318-1.132v-1h-0.026c-1.136-1-2.235-0.978-3.374-1.805 c-1.613,0.229-3.785,0.904-4.887,0.094c-2.942-0.026-5.525-1.506-8.212-2.34c-0.589-0.178-1.15-0.949-1.739-0.949h-6.982 c-0.181,0-0.486,1.338-0.742,1.49l0.078-0.206l-0.818,1.149c-0.462,0.077,0.178-1.723,0.588-1.875 c-0.463-0.05-0.896-0.559-1.357-0.559h-5.576c-0.563,1-1.074,0.35-1.611,1.818c0-0.305,0.104-0.655,0.281-0.959 c-1.535,0.557-1.867,0.141-2.43-0.859H201.306c-0.18,0-0.384,0.628-0.564,0.653c-0.92,0-1.841,0.275-2.583,0.707 c-0.026,0.025-0.026,0.188-0.026,0.213c-0.742,0.253-1.51,0.727-2.251,1.462c-0.665-0.583-1.765-0.879-2.457-0.802 c-0.741,0.862-1.099,1.03-1.534,1.866c-0.332,0.026-0.64,0.059-0.973,0.084c-0.024-0.152-0.076-0.273-0.102-0.376 c-1.15-0.178-2.251-1.719-3.223,0.281l-0.026-1.011c-0.486,0.582-1.048,1.215-1.662,1.571c-0.435,0.051-0.87,0.102-1.331,0.177 c-0.102-0.075-0.23-0.126-0.332-0.253c-0.025,0.126-0.076,0.203-0.127,0.304c-0.436,0.051-0.896,0.101-1.33,0.178 c-0.768,0-1.51,0.101-2.226,0.302c-2.507,0.381-4.989,0.785-7.547,1.141c-2.813,0.355-5.365,0.658-8.434,0.887 c-0.332,1.316-1.58,1.874-1.58,2.178c0,0,0,0,0-0.026c-1-0.128-0.987-0.025-1.192,0.253c-0.179,0.026-0.808,0.052-0.808,0.075 c0-0.023,0-0.049,0-0.075c0,0.052-0.247,0.075-0.35,0.127c-1.278,0.201-2.514,0.506-3.001,2.152 c-0.025,0.609,0.124,1.089,0.38,1.52c-0.025,0.075-0.081,0.178-0.105,0.305l-0.192-0.279c0.154,0.253,0.269,0.48,0.269,0.735 c0,0.075,0,0.178,0,0.278l0.334-0.178c0.153,0.126,0.666,0.279,0.666,0.405v0.101c0,0,0.139,0,0.165-0.025 c0.869,0.784,1.834,1.646,2.013,3.166c-1.33,2.305-3.533-0.354-5.093-1.089c0.154,1.595,0.983,2.761,2.108,3.648 c-0.845,0.429-1.556,1.164-2.067,2.379c2.2,0.48,6.603-0.202,8.648,0.557c-1.688,1.166-4.091,0.532-6.394,1.14 c0.077,1.012,0.666,0.708,0.64,1.977c-1.867,0.379-3.734,0.782-5.602,1.189c-5.703,1.215-11.281,2.178-16.269,0.86 c-2.583,0.532-5.064,1.14-7.52,1.723c-3.99-0.534-8.263-1.342-12.688-0.862c-2.736,0.305-5.524,1.469-8.261,2.609 c-0.563,0-1.101,0-1.638,0.051c-2.328,0.277-4.706,1.342-7.008,1.747c-3.096,0.532-6.472-1.875-8.492,1.443 c-0.461-1.848-2.558-0.735-2.994,0.861c0.922,0.811,2.457-1.14,3.275,0.532c-0.818,0.354-1.612,0.735-2.353,1.164 c-3.657,1.14-8.006,3.444-11.281,7.852c-0.153,1.874,0.793,0.482,0.641,2.355c-0.052,1.569-0.742,1.164-1.024,2.075 c0.844-0.047,1.204-0.86,1.816,0.279c-0.664,1.925-1.968,1.95-2.328,4.686c0.845-0.988,1.715-1.824,2.609-2.583 c-0.103,0.379-0.206,0.759-0.282,1.166c-0.025,0.834-0.05,1.52-0.076,2.126c-0.716,0.658-1.407,1.52-1.97,2.66 c0.536,0.733,1.33-0.988,1.944-0.405c0,0.962,0.026,1.747,0.076,2.684c-0.614,0.253-1.151,0.709-1.561,1.595 c0.538-0.354,1.074-0.733,1.586-1.189c0.076,0.962,0.153,2.128,0.282,3.85c0.281,0.506,0.563,0.988,0.844,1.419 c-1.151,0.86-2.251,1.923-3.248,3.316c0.664,2.887-0.309,5.267-0.846,7.75c-0.281,0.026-0.587,0.075-0.869,0.101 c-0.818,0.075-1.458-1.089-2.175-1.241c-2.148-0.379-3.657,0.609-5.141,1.038c-0.127,0.128-0.205,0.457-0.205,1.014l0.461-0.049 c3.019-0.128,5.908,1.138,8.594,1.036c0.46-0.101,0.803-0.152,1.263-0.228L79,178.407v-0.176c3-0.405,5.158-1.336,7.691-1.768 c1.637-0.303,3.393-0.464,5.005-1.464c0.025,0,0.076,0,0.102,0c1.279,1,3.275,2.477,5.397,2.957 c-0.794,0.431-1.662,1.796-2.685,3.468c1.433-0.684,2.609-1.129,3.683-1.635c-0.409,0.988,0.077,2.296-0.128,2.778 c-0.895,0.279-2.097-0.395-2.275,2.239c0.69-0.787,1.38-0.794,2.072-0.616c-2.737,1.419-6.012,0.49-8.544,1.959 c-1.996-0.988-3.99-1.288-6.114,0.384c0.615,0.126,1.203,0.229,1.817,0.33c-5.654,0.381-11.256,0.761-16.934,1.571 c-1.97,0.28-4.042,0.735-6.191,1.292c-0.154-0.101-0.282-0.074-0.435,0.104c-1.254,0.328-2.507,0.656-3.786,1.038 c-3.096,0.885-6.066,1.873-9.031,2.684c-0.258-0.077-0.645-0.126-0.645-0.101v0.305c0,0.075-0.585,0.126-0.816,0.176 c-7.238,1.215-25.041,2.913-47.115,5.116c0,0,5.922,0.581,11.883,1.139c2.993,0.332,5.965,0.66,8.191,0.964 c1.024,0.126,1.833,0.227,2.472,0.328c-0.229,0.152-0.491,0.328-0.72,0.506c0.255,0.152,0.535,0.33,0.815,0.482 c-2.583,2,6.547,2.328,10.487,2.632c3.529,0.305,6.672,0.33,9.538,0.255c1.739-0.077,3.266-0.178,5.266-0.279v0.911 c5,0.457,7.778,1.265,11.847,2.203c1.074-0.128,2.175-0.304,3.377-0.431c-0.563,0.379-1.163,0.787-1.751,1.239 c-0.051,0.053-0.147,0.101-0.198,0.128c-0.333-1.822-1.748-0.328-2.079,1.342c0.024,0.075,0.021,0.128,0.045,0.178 c-1.227,0.888-2.509,1.773-4.018,2.862c0.332,0.025,0.611,0.025,0.867,0.051c-0.024,0.101-0.025,0.228-0.025,0.379 c0.205,0.075,0.434,0.204,0.665,0.354c-1.203,0.557-2.098-0.202-3.428,1.697c0.563,0.026,0.973,0.052,1.739,0.075 c-0.972,0.532-1.816,0.988-2.66,1.419c-0.538-1.848-2.354-0.253-2.993,1.696c0.819,0.887,2.378,1.494,2.892-0.354 c0.306-0.051,0.639-0.152,0.971-0.253l-0.076,1.443c-0.87,0.253-1.816,0.812-2.891,1.672c-1.125,0.885-2.353,1.117-3.837,1.824 c1.688,2.482,5.602-2.01,7.93-1.782c-1.561,1.267-3.121,0.27-4.783,2.27h13.327c-0.18,0-0.358,1.022-0.563,1.403 c0.87,0.051,1.484,0.296,2.661,0.397c-2.661,1.998-4.733,3.669-7.137,5.566c1.867,2.508,5.014-0.608,7.827-1.521 c0.256,1.063,0.589,2.482,0.871,3.621c-0.46,0.253-1.663,1.379-2.405,1.253c-2.072-0.379-4.22,0.92-6.957,4.06 c-1.765,2.051-3.607,2.583-5.884,4.154c1.561,3.926,4.963,0.789,8.083-1.417c0.743,0.077,1.306,0.18,1.433,0.407 c-2.097,1.292-4.194,1.899-6.548,6.611c0.665,3.697,3.479,0.102,5.398-0.608c1.944-0.708,3.837-1.189,5.806-1.747 c0.282,2.127,0.538,4.154,0.82,6.407c-1.689,0.634-3.326,1.265-5.322,2.077c-0.127,3.166-0.204,5.444-0.256,7.292 c1.867,0.531,3.275,2.406,5.117,1.268c7.853-4.709,13.352-1.316,20.003-1.722c6.574-0.405,12.994-0.128,19.415,0.15 c5.806,0.255,11.639,0.331,17.88-0.733c0.793-0.127,1.561-0.127,2.251-0.102c-0.077,1.849-0.639,3.521-1.022,5.242 c-0.486,0.026-0.972,0.026-1.484,0.052c-0.562-0.303-1.074-0.964-1.585-1.066c-2.149-0.402-3.659,0.584-5.141,1.041 c-0.052,0.05-0.103,0.151-0.129,0.253c-8.696,0.277-20.362,0.582-33.638,1.265c0,0,5.731,0.937,11.46,1.849 c5.73,0.964,11.434,2.027,11.332,2.382c-5.653,2.153,4.425,3.394,8.519,4.104c3.299,0.581,6.139,0.835,8.902,1.012 c0.512,0.025,1.049,0.052,1.586,0.076c-2.814,0.229-5.603-0.216-8.416,0.19c-0.972,0.127-1.969-0.215-2.968-0.215H111.7 c-0.026,0-0.077,1-0.103,1c-0.179,0-0.332,0-0.485,0c0.205-1,0.383-1,0.588-1h-3.505c-0.05,0-0.076,0.82-0.102,0.873 c-0.179-0.023-0.384,0.348-0.537,0.348c-0.153,0.357-0.308,0.895-0.459,1.251c-0.154,0.15-0.332,0.347-0.513,0.471 c-0.409,0.129-0.793,0.277-1.201,0.38c-1.1,0.33-2.201,0.68-3.275,1.01c-2.175,0.1-4.349,0.212-6.548,0.366 c-1.458,0.431-0.46-1.107-1.919-0.679c-0.614,0.329-1.254,0.688-1.893,1.017c-1.253-0.405-3.198-0.199-4.578,0.307 c0.383,0.937,1.586,1.088,2.763,0.86c-0.077,0.053-0.153,0.102-0.205,0.154c1.177,0.228,2.353,0.305,3.555,0.328 c-2.404,0.354-5.602,0.759-9.464,1.189c-2.125-0.229-3.991-0.658-5.398-1.646c0.358-0.303,2.149,0.356,3.044-0.532 c1.151,0.482,3.096,0.406,3.708-0.733c-3.836-1.495-14.631,0.684-18.98,0.305c-0.87,0.911-2.174,1.266-2.609,2.709 c0.92,0.886,1.971-0.709,3.249-0.684c2.174-0.126,5.141-0.328,8.056-0.658c0.104,0.126,0.181,0.253,0.231,0.38 c-1.28,0.607-2.891,0.734-4.681,0.632c-0.154,0.381-0.308,0.786-0.46,1.192c2.021-0.229,4.066-0.229,6.112-0.128 c-7.98,0.837-17.675,1.773-28.393,2.835c0,0,6.268,0.585,12.229,1.168c0.587,0.05,1.072,0.126,2.072,0.175v4.991 c4,0.429,7.598,1.24,11.69,2.177c3.222-0.38,7.339-1.089,10.101-0.43c7.163-0.281,13.994,0.734,21.079,1.366 c-1.151,0.076-2.545,0.255-4.003,0.506c-0.282-0.048-0.584,0-0.916,0.154c-0.459,0.075-0.955,0.176-1.44,0.277 c-2.072-0.455-3.842-1.546-5.632-0.479c-5.398-1.521-11.617-2.153-16.451,0.378c-1.561,0.532-0.545-1.749-1.236-1.57 c-2.992,1.294-5.191,1.014-9.191,0.912v6.912c3,0.255,4.74,0.636,6.966,1.067c0.305,6.86,5.119,4.658,6.704,1.416 c-0.025-0.152,0.015-0.277-0.011-0.429c0.435-0.078,0.902-0.129,1.363-0.179c-0.537,0.634-1.11,1.268-1.8,1.976 c1.05,0.103,1.748,0.177,2.464,0.252c0.23,0.255,0.465,0.28,0.72,0.101c0.129,0,0.284,0.027,0.437,0.053 c-2.762,3.848-4.039-0.053-6.829,5.319c0.871,0.075,1.485,0.102,2.687,0.2c-2.687,2.002-4.732,3.599-7.162,5.472 c1.892,2.532,5.039-0.659,7.827-1.57c0.256,1.063,0.589,2.456,0.871,3.597c-0.461,0.252-1.663,1.392-2.405,1.241 c-2.046-0.381-4.195,0.911-6.932,4.076c-1.765,2.025-3.633,2.556-5.883,4.13c1.533,3.948,4.962,0.783,8.057-1.42 c0.742,0.075,1.33,0.203,1.458,0.405c-2.098,1.289-4.196,1.898-6.549,6.608c0.64,3.698,3.479,0.102,5.398-0.607 c1.842-0.657,3.657-1.14,5.524-1.671c-0.895,0.684-1.816,1.596-2.839,2.762c-1.765,2.051-3.632,2.582-5.884,4.126 c1.536,3.952,4.964,0.813,8.059-1.392c0.742,0.075,1.331,0.179,1.433,0.404c-0.818,0.507-1.638,0.913-2.482,1.52 c-0.818,0.303-1.636,0.634-2.532,0.989c-0.026,0.582-0.026,1.114-0.051,1.62c-0.486,0.684-0.971,1.469-1.484,2.457 c0.23,1.29,0.716,1.695,1.331,1.645c0,0.558-0.026,1.088-0.051,1.595c1.867,0.508,3.274,2.383,5.142,1.268 c1.918-1.166,3.683-1.822,5.397-2.204c0.077,0.583,0.127,1.164,0.205,1.748c-1.689,0.657-3.325,1.292-5.321,2.102 c-0.102,3.167-0.178,5.445-0.255,7.296c1.867,0.532,3.273,2.403,5.116,1.266c7.853-4.711,13.353-1.318,20.003-1.724 c4.707-0.305,9.336-0.228,13.915-0.077c0.18,0.077,0.283,0.154,0.256,0.205c-5.652,2.15,4.452,3.366,8.518,4.075 c1.842,0.329,3.558,0.532,5.168,0.711c-8.416,0.253-19.185,0.558-31.31,1.191c0.025,0,5.755,0.908,11.485,1.847 c5.705,0.963,11.435,2,11.307,2.382c-5.654,2.152,4.451,3.393,8.518,4.077c1.381,0.253,2.686,0.432,3.915,0.582 c-0.028,0.076-0.028,0.101-0.052,0.177c0.563,0.254,1.022,0.482,1.536-0.025c1.201,0.127,2.378,0.229,3.504,0.279 c2.25,0.126,4.476,0.229,6.777,0.354c0.589,0.582,1.254,1.19,2.303,0.176c0.281,0.027,0.562,0.076,0.843,0.104 c-0.024,0.074-0.076,0.15-0.126,0.252c0.332,0.102,0.741,0.355,1.279-0.149c2.66,0.302,5.295,0.632,7.878,1.062 c-0.129,0.254-0.255,0.582-0.358,1.115c0.563-0.128,1.202,0.48,1.662-0.888c0.384,0.077,0.768,0.151,1.177,0.228 c-0.358,0.052-0.792-0.025-1.253,0.202c-0.307,0.862,0.205,0.482-0.103,1.344c-1.586-0.709-3.684,0.354-5.217-0.354 c-0.256-0.127-0.333-0.683-0.588-0.76c-0.488-0.177-1.279,0.431-1.868,0.304c-0.87-0.203-1.432-0.304-2.021-0.684 c-0.384,0.457-0.767,0.836-1.125,1.089c0.206-0.533,0.359-0.608,0.102-0.709c-0.641,0.682-0.895,0.784-1.203-0.025 c0.23-0.658,0.384-0.076,0.64-0.861c-0.486-0.455-1.074,0.305-1.662,1.217c0.076,1.621,1.099,0.683,1.79,0.961 c1.228,0.458,2.584,1.597,3.965,1.24c0.921,1.8,3.198-1.014,3.964,1.217c0.282-0.051,0.589-0.481,0.896-0.609 c-0.076,0.836-0.052,0.889,0.231,1.268c0.307-0.709-0.179-0.811,0.126-1.14c0.615-0.682,0,0.964,0.309,1.037 c1.149,0.052,2.149,0.254,3.197,0.432c0.408,0.077,0.87,0,1.38-0.103c-0.05,0.103-0.102,0.203-0.127,0.355 c0.051,0.153,0.103,0.354,0.205,0.531c-0.179-0.025-0.332-0.076-0.486-0.127c-0.153-0.023-0.486,0.406-0.664,0.406 c-0.308-0.024-0.461-0.481-0.718-0.481c-6.368-0.076-13.096-0.734-20.156-0.404c-0.486,0.229,0.077-0.71-0.384-0.507 c-0.511,0.43-0.997,0.812-1.51,1.368c0.461,0.305,0.972,0.405,1.51,0.405c-0.18,0.202-0.357,0.531-0.562,1.113 c0.051,0,0.076,0.027,0.102,0.027c-3.888,0-7.93,0.404-12.407,2.099c-0.562,0.864,2.533,0.458,2.482,1.27 c1.151,0.937,3.07,1.037,4.655,0.858c0.794-0.074,1.509-0.202,2.021-0.303c0.512-0.126,0.819-0.203,0.819-0.203 c3.888,1.646,5.524,0.432,9.362,2.533c1.022-0.202,2.021-0.381,3.017-0.559c0.078,0.154,0.18,0.255,0.41,0.303 c0.103-0.148,0.18-0.276,0.205-0.404c0.179-0.025,0.386-0.075,0.563-0.1c0.127,0.126,0.256,0.253,0.384,0.355 c-0.104,0.076-0.18,0.148-0.283,0.227c-0.742,0.279-1.484,0.937-2.149,1.697c-1.022,0-2.045,0-3.094,0.05 c-0.461,0.229,0.102-0.734-0.359-0.507c-0.512,0.432-1.023,0.812-1.509,1.369c1.151,0.733,2.686,0.227,3.964,0.303 c-0.358,0.481-0.639,0.911-0.871,1.268c-4.501-0.128-9.182,0.049-14.452,2.075c-0.562,0.835,2.534,0.457,2.481,1.266 c1.151,0.912,3.044,1.014,4.657,0.863c0.792-0.077,1.508-0.204,2.021-0.33c0.512-0.101,0.818-0.203,0.818-0.203 c3.887,1.672,5.525,0.432,9.362,2.558c1.023-0.228,2.021-0.405,3.019-0.582c0.076,0.152,0.179,0.28,0.408,0.305 c0.103-0.128,0.18-0.279,0.205-0.405c0.18-0.026,0.359-0.053,0.563-0.076c0.128,0.125,0.23,0.253,0.357,0.354 c-0.076,0.076-0.178,0.128-0.255,0.229c-2.226,0.836-4.553,5.016-4.553,5.016c5.09-1.191,8.288,0.909,11.817,3.52 c1.637-0.229,3.786-0.685,4.912,0.102c2.941,0.049,5.525,0.362,8.211,1.224C179,412.371,179.588,412,180.15,412h7.009 c0.154,0,0.486-0.111,0.742-0.236l-0.077,0.806l0.794-0.838c0.459-0.053-0.154,0.651-0.589,0.806 c0.459,0.049,0.921-0.537,1.356-0.537h5.575c0.59,0,1.101,0.904,1.613-0.592c0.025,0.328-0.104,0.055-0.256,0.357 c1.536-0.556,1.867-0.766,2.404,0.234h111.886c0.205,0,0.383,0.625,0.564,0.598c0.945,0,1.867,0.352,2.607-0.079 c0-0.024,0,0.125,0.026,0.098c0.742-0.254,1.483-0.572,2.251-1.305c0.665,0.583,1.765,0.956,2.43,0.88 c0.742-0.887,1.125-0.993,1.559-1.828c0.309-0.023,0.641-0.037,0.947-0.064c0.053,0.152,0.077,0.285,0.104,0.386 c1.176,0.179,2.275,1.726,3.223-0.275l0.026,1.014c0.485-0.579,1.073-1.214,1.661-1.593c0.436-0.052,0.896-0.102,1.331-0.153 c0.13,0.052,0.231,0.129,0.333,0.229c0.051-0.1,0.075-0.203,0.127-0.278c0.461-0.077,0.896-0.127,1.356-0.178 c0.768,0,1.509-0.102,2.226-0.305c2.48-0.381,4.987-0.784,7.545-1.139c2.814-0.354,5.705-0.657,8.748-0.889 c0.332-1.341,1.074-1.872,1.92-2.177c0.357,0.129,0.691,0.052,0.895-0.227c0.153-0.024,0.307-0.051,0.487-0.077 c-0.026,0.026-0.026,0.026-0.026,0.053c0.127-0.026,0.255-0.077,0.357-0.102c1.279-0.23,2.481-0.506,2.993-2.179 c0.024-0.608-0.153-1.089-0.41-1.494c0.052-0.076,0.077-0.178,0.128-0.305l-0.128,0.28c-0.178-0.255-0.356-0.507-0.587-0.735 c0-0.076-0.025-0.177,0-0.279l0.004,0.179c-0.129-0.152-0.305-0.28-0.305-0.405v-0.129c0,0.028-0.182,0.028-0.207,0.053 c-0.87-0.787-1.856-1.646-2.036-3.166c1.33-2.33,3.521,0.353,5.109,1.088c-0.182-1.595-1.015-2.76-2.14-3.646 c0.842-0.454,1.555-1.164,2.065-2.379c-1.663-0.382-4.611-0.078-6.809-0.23c-0.078-0.202-0.158-0.379-0.262-0.557 c-0.076-0.126-0.179-0.228-0.28-0.329c1.534-0.378,3.352-0.125,5.117-0.607c-0.077-0.988-0.692-0.686-0.641-1.976 c1.84-0.354,3.709-0.759,5.574-1.165c5.705-1.214,11.307-2.179,16.297-0.861c2.558-0.53,5.037-1.139,7.493-1.722 c3.991,0.532,8.263,1.316,12.688,0.862c2.738-0.307,5.55-1.471,8.264-2.61c0.563,0,1.124,0,1.661-0.074 c2.301-0.254,4.709-1.317,7.008-1.723c3.096-0.531,6.447,1.85,8.469-1.469c0.485,1.874,2.582,0.733,3.016-0.835 c-0.944-0.838-2.48,1.139-3.273-0.558c0.821-0.329,1.587-0.71,2.355-1.139c3.632-1.14,7.981-3.446,11.279-7.852 c0.154-1.875-0.793-0.482-0.638-2.357c0.024-1.569,0.739-1.163,0.997-2.076c-0.821,0.053-1.203,0.862-1.791-0.277 c0.639-1.95,1.943-1.95,2.327-4.685c-0.842,0.986-1.714,1.824-2.636,2.556c0.104-0.379,0.206-0.759,0.309-1.138 c0.025-0.836,0.052-1.521,0.052-2.151c0.716-0.634,1.406-1.52,1.97-2.636c-0.514-0.732-1.306,0.963-1.946,0.405 c0-0.961,0-1.748-0.075-2.685c0.613-0.278,1.178-0.709,1.586-1.597c-0.563,0.356-1.101,0.736-1.611,1.191 c-0.053-0.962-0.129-2.152-0.258-3.848c-0.305-0.533-0.587-0.988-0.867-1.42c1.176-0.861,2.275-1.924,3.272-3.316 c-0.664-2.889,0.308-5.269,0.819-7.749c0.305-0.026,0.588-0.076,0.871-0.102c0.816-0.077,1.483,1.086,2.199,1.215 c2.121,0.405,3.657-0.583,5.142-1.039c0.126-0.127,0.204-0.432,0.204-0.986l-0.486,0.048c-2.994,0.13-5.909-1.138-8.594-1.037 c-0.461,0.076-0.922,0.152-1.383,0.229l-0.511-0.101l-0.026,0.174c-1.586,0.281-3.197,0.532-4.809,0.788 c0.485-0.507,0.945-1.038,1.407-1.673c-0.024-0.102-0.024-0.203-0.052-0.304c1.254-0.431,2.531-0.937,3.89-1.543 c-0.511-3.852-2.79,0.783-4.069-0.255c0-0.329,0.027-0.658,0.051-0.964c0.435-0.051,0.949-0.378,0.998-1.365 c-0.256,0.124-0.51,0.152-0.792,0.152c0.229-1.166,0.563-2.306,0.792-3.445c0.307-0.051,0.59-0.102,0.896-0.127 c0.485-0.051,0.922,0.381,1.355,0.734l0.229,0.81l0.359,1.065l-0.308-1.167l-0.23-0.656c0.257,0.201,0.513,0.403,0.769,0.454 c2.122,0.404,3.66-0.608,5.142-1.038c0.128-0.126,0.204-0.806,0.204-1.39L438.02,325c-0.025,0-0.025,0-0.051,0 c1.945-1,3.913-0.031,5.885-0.311c1.943-0.303,4.04-0.569,6.164-1.102c0.154,0.075,0.308,0.17,0.434-0.009 c1.254-0.329,2.533-0.61,3.786-0.992c3.607-1.038,7.267-2.178,10.642-3.065c7.239-1.217,24.99-2.874,47.066-5.077 C511.92,314.444,505.961,313.872,500.025,313.289z M472.681,278.012l1.79-0.937l-0.127,0.76l-1.79,0.937L472.681,278.012z M471.043,256.435c0.078-0.052,0.154,0.152,0.231,0.229c-0.128,0.201-0.257,0.556-0.333,0.607 c-0.102,0.075-0.179-0.128-0.257-0.228C470.813,256.838,470.941,256.51,471.043,256.435z M469.432,255.956l-0.255,0.657 l-0.152-0.38L469.432,255.956z M438.302,194.516c0.308,0.025,0.589-0.941,0.896-0.968c-0.128,0.279-0.205,0.452-0.205,0.452 h0.588c-0.714,2-1.433,1.499-2.122,1.651c-0.204-0.457-0.485-0.581-0.692-1.061C437.047,194.461,437.816,194.466,438.302,194.516 z M436.025,198.365l1.15-0.405l-0.076,0.328l-1.151,0.407L436.025,198.365z M430.295,198.644l-0.024,0.405l-0.155-0.101 L430.295,198.644z M424.975,188.488l1.791-0.911l-0.129,0.759l-1.789,0.913L424.975,188.488z M423.337,166.935 c0.077-0.075,0.155,0.128,0.231,0.204c-0.127,0.229-0.256,0.557-0.334,0.634c-0.102,0.049-0.178-0.152-0.229-0.229 C423.106,167.316,423.234,167.012,423.337,166.935z M421.727,166.455l-0.256,0.634l-0.154-0.356L421.727,166.455z M353.02,111.881c0.025,0,0.025,0,0.025,0c-0.025,0.023-0.025,0.023-0.051,0.023C352.994,111.881,353.02,111.881,353.02,111.881z M54.785,219.891c-0.282-0.05-0.588-0.262-0.871-0.236c0.103-0.277,0.179-1.654,0.179-1.654h-0.562 c0.691,0,1.407-0.322,2.097-0.471c0.206,0.479,0.487,1.18,0.716,1.687C56.038,219.341,55.271,219.942,54.785,219.891z M57.086,216.043l-1.15,0.405l0.076-0.328l1.125-0.407L57.086,216.043z M62.792,215.762l0.025-0.405l0.154,0.101L62.792,215.762z M68.112,225.918l-1.79,0.911l0.151-0.759l1.791-0.911L68.112,225.918z M69.775,247.471c-0.103,0.074-0.154-0.127-0.257-0.204 c0.129-0.228,0.257-0.556,0.36-0.632c0.076-0.052,0.153,0.152,0.23,0.227C69.979,247.091,69.852,247.391,69.775,247.471z M71.386,247.952l0.23-0.633l0.153,0.354L71.386,247.952z M101.211,179.423l0.026-0.152l-1.305,0.075l0.18,0.178 c-0.436,0.025-0.869,0.075-1.331,0.126c0.257-0.126,0.537-0.253,0.793-0.379c-0.128-0.152-0.23-0.888-0.331-0.992 c0.664,0.104,1.304-0.279,1.943-0.279c0.025,0,0.025,0,0.051,0c0.179,0,0.358,0.711,0.538,0.735 C101.595,178.735,101.391,179.397,101.211,179.423z M81.796,314.784l-1.815,0.912l0.153-0.761l1.791-0.911L81.796,314.784z M143.036,386.049c0.255-0.203,0.536-0.608,0.843-1.24c1.049-0.051,1.996,0.023,2.583,1.114c2.481-1.622,4.222,0.456,6.268,0.15 c0.102,0.053,0.206,0.128,0.281,0.205C149.711,386.379,146.437,386.126,143.036,386.049z M153.728,391.392c0,0,0,0-0.026,0 c0.026,0,0.051,0,0.077-0.023C153.753,391.392,153.753,391.392,153.728,391.392z M286.793,106.486l0.129,0.709 c-0.025,0-0.051,0.024-0.077,0.024c-0.257-0.176-0.486-0.379-0.716-0.632C286.358,106.535,286.563,106.51,286.793,106.486z M175.673,385.163c-0.485,0.026-1.354,0.354-1.662,0.176c-0.127-0.102-0.05-0.657-0.23-0.657c-0.382-0.052-0.92,0.38-1.304,0.354 c-1.203-0.074-2.661-0.227-4.066-0.203c-1.153,0.027-2.303-0.202-3.377-0.453c0.103-0.203,0.229-0.585,0.358-1.167 c-0.101,0.076-0.23,0.051-0.358,0c1.253-0.329,2.507-0.682,2.916,0.178c1.791,0.128,3.812,0.128,5.908,0.128 c0.283,0.304,0.794,0.479,1.229,0.101c0.256,0.277,0.614,0.519,0.997,0.544c0.716,0.408,1.766-0.162,1.407-0.162c0,0,0,0,0.025,0 c0.588,0,1.305,0.949,2.072,1.125C178.257,385.15,176.927,385.087,175.673,385.163z M176.852,388.327 c-0.077,0.025-0.153,0.052-0.23,0.077c-0.026,0-0.026,0-0.026-0.025c0.026-0.026,0.052-0.026,0.103-0.052 C176.75,388.327,176.8,388.327,176.852,388.327z M166.951,387.34c-0.077,0.103-0.179,0.152-0.28,0.178 c-0.026-0.05-0.078-0.101-0.103-0.151c0.077,0,0.154,0,0.23,0C166.85,387.366,166.901,387.34,166.951,387.34z M149.542,130.499 v0.117c-0.113-0.018-0.229-0.029-0.342-0.045C149.313,130.549,149.428,130.525,149.542,130.499z M140.963,178.484 c0.818-0.051,1.611-0.077,2.378-0.101c-1.048,0.253-2.045,0.405-2.787,0.152C140.707,178.51,140.835,178.484,140.963,178.484z M122.924,243.459v1.014c-0.092-0.014-0.184-0.029-0.276-0.041L122.924,243.459z M163.856,380.022 c-0.256-0.026-0.511-0.051-0.741-0.051c-0.513-0.127-0.999-0.382-1.408-0.787c0.538-0.581,1.074-0.074,1.433-0.859 c1.458,0.228,2.916,0.507,4.349,0.758c-0.639,0.203-1.253-0.125-1.969,0.813c-0.206,0.024-0.077-0.509-0.282-0.481 C164.803,379.819,164.317,379.972,163.856,380.022z M158.894,401.624c0,0,0,0-0.024-0.025c0.024,0,0.049,0,0.075,0 C158.919,401.599,158.919,401.624,158.894,401.624z M161.657,392.023c-0.205,0.103-0.282,0.054-0.282-0.072 c0.23-0.076,0.46-0.13,0.665-0.153C161.913,391.875,161.785,391.923,161.657,392.023z M161.503,386c0.078,0,0.128,0,0.205,0 c0.64,0,1.254,0.811,1.791,1.088c0.18-0.203,0.334,0,0.486-0.101c0.256-0.025,0.512,0.124,0.742,0.1 c0.026,0.127,0.026,0.342,0,0.494c-0.512,0.354-1.022-0.181-1.56-0.233C162.603,387.145,162.041,386,161.503,386z M163.396,401.117c0.921-0.05,1.816-0.101,2.686-0.125C165.085,401.422,164.214,401.32,163.396,401.117z M166.824,402.291 c-0.588,0.328-0.153-0.525,0.026-1.207c0.153,0,0.282,0,0.435,0c0.46,0,0.921,0.171,1.356,0.274 C168.051,401.562,167.463,401.833,166.824,402.291z M172.017,394.508c0.051-0.558,0.307-0.709,0.46-1.113 c-0.511-0.332-1.919,1.569-2.328,1.087l0.359-0.505c0.461-0.128,0.921-0.381,1.202-0.659c-0.078-0.051-0.154-0.126-0.23-0.178 c0.741-0.126,1.355-0.102,1.636,0.456c0.076,0,0.154,0.026,0.257,0.026C172.912,393.799,172.427,393.646,172.017,394.508z M173.5,388.605c-0.716,1.116-1.381,0.609-2.123,0.938c-1.202-0.179-2.354-0.305-3.25-0.71c0.077-0.102,0.179-0.229,0.257-0.455 c-0.257,0.126-0.514,0.126-0.819,0.151c-0.231-0.151-0.435-0.354-0.615-0.582c0.052-0.178,0.103-0.38,0.128-0.633 c0.205-0.025,0.409-0.051,0.614-0.101c0.332,0.05,0.666,0.05,1.024,0c0.076,0.024,0.152,0.024,0.23,0.05 c0.998,0.381,2.098,0.633,3.223,0.787c0.486,0.175,0.997,0.251,1.508,0.275c0.282,0.178,0.614,0.278,0.922,0.356 C174.165,388.961,173.755,389.089,173.5,388.605z M174.524,393.787l-0.743,1.153c-0.026,0-0.05,0-0.076,0 c-0.051,0,0.076-0.901,0.152-1.356c0.257,0,0.538,0.023,0.794,0.023C174.626,393.686,174.575,393.712,174.524,393.787z M179.69,403.496l-0.818,1.609c-0.128-0.557,0.23-1.349,0.153-1.831c-0.563,0.863-1.279,0.201-1.842,1.367 c0.053-0.558,0.308-0.649,0.435-1.055c-0.485-0.329-1.893,1.59-2.301,1.108l0.356-0.498c0.461-0.152,0.922-0.96,1.203-1.264 c-0.154-0.101-0.306-0.934-0.46-0.934h4.018C180.202,402,179.972,403.064,179.69,403.496z M182.069,403.035 c0.026-0.077,0.077-0.148,0.128-0.224c0.28,0.05,0.537,0.127,0.82,0.202c-0.052,0.026-0.104,0.071-0.154,0.071 c0.23,0.023,0.434,0.045,0.639,0.045c0.024,0,0.024,0,0.05,0C182.888,403.813,182.478,403.288,182.069,403.035z M183.451,403.801 c0-0.228,0.102-0.404,0.229-0.607c0.206,0.053,0.384,0.101,0.563,0.154C183.988,403.474,183.706,403.623,183.451,403.801z M181.379,383.414c1.022,0,2.046,0,3.018,0.026c0.359,0.025,0.64,0.127,0.921,0.229 C184.013,383.567,182.683,383.466,181.379,383.414z M185.421,393.799c0-0.052,0.024-0.103,0.024-0.152c0.026,0,0.026,0,0.052,0 C185.472,393.696,185.446,393.724,185.421,393.799z M190.587,404.005c0.025-0.254,0.102-0.557,0.23-0.859 c0.077,0,0.18-0.028,0.282-0.028C190.895,403.348,190.741,403.649,190.587,404.005z M198.926,404.132 c0.026-0.331,0.051-0.584,0.128-0.784c0-0.027,0.026-0.027,0.026-0.027c0.23,0,0.486-0.026,0.716-0.05 c0.409,0.353,0.818-0.384,1.176-0.636c0.23-0.025,0.486-0.635,0.716-0.635h0.691c0.026,0,0.026,0.686,0.026,0.734 C201.306,402.836,200.154,403.649,198.926,404.132z M202.457,402.734c0.025-0.049,0.051-0.734,0.051-0.734h2.557 c0.104,0,0.205,0.394,0.307,0.444C204.426,402.37,203.454,402.662,202.457,402.734z M205.295,394.381 c-0.026-0.204-0.026-0.38,0-0.481c-0.23,0.304-0.486,0.456-0.767,0.582c-0.257-0.023-0.512-0.023-0.768-0.023 c0.511-0.152,1.048-0.432,1.535-0.559c0.179-0.051,0.384-0.075,0.539-0.051c0.127,0.026,0.254,0.102,0.383,0.152 C205.91,394.077,205.604,394.203,205.295,394.381z M210.591,405.018c-0.102-0.101-0.18-0.709-0.127-0.886 c-0.537,0.734-1.331,0.658-1.714,0.961c0.025-0.152,0.025-0.253,0.025-0.354c0.537-0.15,1.152-0.481,1.689-0.606 c0.179-0.05,0.357-0.077,0.536-0.05c0.18,0.023,0.333,0.101,0.513,0.175C211.18,404.714,210.821,405.396,210.591,405.018z M211.436,405.574c0.05-0.404,0.229-0.784,0.408-1.115c0.154,0.104,0.308,0.204,0.435,0.306 C212.023,404.917,211.742,405.17,211.436,405.574z M214.71,405.675c0.178,0.025,0.358,0.025,0.511,0.025 C215.093,405.954,214.938,406.056,214.71,405.675z M221.82,406.157c-0.588,0.153-0.485-0.429-0.384-1.014 c0.18,0,0.358,0,0.538,0.026l-0.077,0.378L222,405.17c0.103,0,0.205,0,0.307,0.023 C222.102,405.372,221.922,405.651,221.82,406.157z M225.119,407.017l-0.102-0.706c0.026,0,0.051-0.028,0.077-0.052 c0.23,0.202,0.486,0.405,0.716,0.656C225.581,406.968,225.35,406.993,225.119,407.017z M249.867,117.697v0.073 c-0.133-0.008-0.272-0.014-0.395-0.014C249.607,117.731,249.738,117.713,249.867,117.697z M261.828,130.772 c0.024,0,0.051,0,0.051-0.024c0.025,0,0.051,0.024,0.051,0.024C261.904,130.772,261.879,130.772,261.828,130.772z M296.027,130.138c-0.203,0-0.409,0-0.615,0.051c0.104-0.126,0.181-0.328,0.206-0.658c-0.206,0.075-0.333-0.265-0.46,0.088 c-0.078,0.026-0.129-0.619-0.18-0.619c-0.512,0-1.023,0-1.535,0c0.256,0,0.487,0.342,0.691,0.14 c-0.129-0.05-0.256,0.259-0.383,0.207c1.328-0.302,2.557-0.541,4.116-0.541c0.052,0,0.077,0.237,0.103,0.389 c-0.716,0.025-1.406,0.091-2.072,0.447C295.898,129.819,295.977,130.011,296.027,130.138z M342.531,380.831 c0.715,0.052,1.433,0.128,2.123,0.229C343.861,381.034,343.146,380.959,342.531,380.831z M359.695,384.148 c-2.762-0.835-5.576-0.835-8.467-0.226c-0.23,0.051-0.461,0.1-0.691,0.151c-0.177-0.078-0.279-0.026-0.385,0.102 c-0.256,0.076-0.511,0.149-0.766,0.227c-0.256-0.279-0.537-0.53-0.844-0.76c0.588-0.329,1.125-0.784,1.559-1.442 c0.691,0.177,1.383,0.354,2.047,0.556c2.252,0.658,5.143-0.226,8.008-0.101c0.869,0.049,1.739,0.151,2.583,0.28 C361.664,383.111,360.617,383.44,359.695,384.148z M417.709,261.096c-0.69-0.102-1.355-0.202-2.02-0.329 c0.051-0.178,0.078-0.38,0.129-0.633c-0.182,0.202-0.385,0.378-0.564,0.581c-0.459-0.076-0.92-0.126-1.381-0.227l0.461-1.623 c1.253,0.229,2.531,0.431,3.811,0.633L417.709,261.096z M456.973,295.01c-0.254-0.025-0.535,0.199-0.791,0.176 c-0.203-0.404-0.41-0.735-0.588-1.142c0.178-0.077,0.463-0.19,0.793-0.318c0.281-0.048,0.586-0.094,0.87-0.145 c0.255,0.028,0.51-0.461,0.766-0.487c-0.101,0.278-0.178,0.906-0.202,0.906h0.587C457.945,294,457.461,294.859,456.973,295.01z M469.048,294.956c0.332,0.075,0.513,0.606,0.64,1.188c-0.331,0.027-0.663,0-1.021,0 C468.666,295.613,468.717,295.156,469.048,294.956z M464.753,296.12c0.075-0.43,0.203-0.812,0.511-1.164 c0.563,2.405,1.661-0.278,2.379,1.188C466.67,296.144,465.697,296.144,464.753,296.12z M469.33,308.148 c-0.41,0.026-0.844,0.053-1.254,0.053c0.818-0.076,1.688-0.179,2.584-0.28c0.461,0.051,0.92,0.102,1.355,0.179 C471.121,308.1,470.2,308.125,469.33,308.148z" style="fill-rule:evenodd;clip-rule:evenodd;"/></g><g><path d="M294.649,362.484h-28.396h-28.395c0,0,0-17.039,0-28.396 c-39.044,8.518-49.693-21.297-49.693-21.297c-7.098-14.197-14.198-21.297-14.198-21.297c-14.198-8.52,0-7.1,0-7.1 c14.198,0,21.297,14.199,21.297,14.199c12.778,21.297,34.785,17.748,42.594,14.197c0-7.1,2.839-17.746,7.099-21.297 c-31.236-3.549-56.792-21.295-56.792-56.792c0-35.494,7.099-42.593,14.198-49.692c-1.419-3.549-7.099-16.328,0-35.495 c0,0,14.198,0,28.396,21.297c7.099-7.099,28.395-7.099,35.494-7.099c7.1,0,28.396,0,35.496,7.099 c14.197-21.297,28.395-21.297,28.395-21.297c7.809,19.167,1.421,31.945,0,35.495c7.1,7.099,14.199,14.198,14.199,49.692 c0,35.497-25.557,53.243-56.793,56.792c4.26,3.551,7.1,15.619,7.1,21.297V362.484L294.649,362.484z" id="Cat_2_" style="fill:#ED1C24;"/></g></g></g><g id="Layer_1"/></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" ?><svg height="1024" width="2856.857" xmlns="http://www.w3.org/2000/svg"><path d="M552.73 332.135H311.557c-6.205 0-11.25 5.045-11.25 11.297v117.887c0 6.252 5.045 11.272 11.25 11.272h94.109v146.542c0 0-21.145 7.057-79.496 7.057-68.914 0-165.156-25.244-165.156-236.795 0-211.642 100.197-239.491 194.307-239.491 81.465 0 116.514 14.304 138.869 21.241 7.01 2.203 13.404-4.831 13.404-11.105L534.543 46.129999999999995c0-2.912-1.041-6.417-4.262-8.785C521.186 30.951999999999998 465.865 0 326.168 0 165.133 0 0 68.48699999999997 0 397.757 0 726.979 189.051 776 348.381 776c131.883 0 212.021-56.314 212.021-56.314 3.268-1.801 3.6-6.395 3.6-8.479V343.432C563.955 337.227 558.887 332.135 552.73 332.135zM1772.381 28.134000000000015h-135.695c-6.252 0-11.271 5.044-11.271 11.296v262.393h-211.619V39.42999999999995c0-6.252-5.068-11.296-11.178-11.296h-135.838c-6.111 0-11.084 5.044-11.084 11.296v710.473c0 6.299 5.021 11.32 11.084 11.32h135.838c6.203 0 11.178-5.068 11.178-11.32V446.067h211.619l-0.475 303.883c0 6.3 5.021 11.272 11.084 11.272h135.885c6.252 0 11.131-5.068 11.131-11.272l0.473-710.521C1783.607 33.178 1778.539 28.134000000000015 1772.381 28.134000000000015zM714.949 44.236999999999966c-48.357 0-87.574 39.572-87.574 88.403 0 48.855 39.217 88.428 87.574 88.428s87.527-39.572 87.527-88.428C802.477 83.80999999999995 763.307 44.236999999999966 714.949 44.236999999999966zM792.861 272.126c0-6.205-5.02-11.344-11.131-11.344H646.32c-6.348 0-11.746 6.394-11.746 12.67 0 0 0 394.654 0 469.867 0 13.735 8.572 17.903 19.703 17.903 0 0 57.688 0 121.959 0 13.311 0 16.814-6.536 16.814-18.188-0.094-25.197-0.094-123.808-0.094-142.942C792.861 581.905 792.861 272.126 792.861 272.126zM2297.973 261.84799999999996h-134.701c-6.158 0-11.084 5.092-11.084 11.344v348.31c0 0-34.244 25.197-82.934 25.197-48.547 0-61.525-22.024-61.525-69.719 0-47.553 0-303.835 0-303.835 0-6.252-5.068-11.345-11.131-11.345h-136.643c-6.252 0-11.178 5.093-11.178 11.345 0 0 0 185.521 0 326.807 0 141.284 78.766 175.906 186.99 175.906 88.854 0 160.609-49.115 160.609-49.115s3.363 25.766 5.068 28.844c1.422 3.078 5.447 6.158 9.852 6.158h86.58c6.158 0 11.178-5.069 11.178-11.321l0.379-477.278C2309.15 266.9390000000001 2304.129 261.84799999999996 2297.973 261.84799999999996zM2666.932 245.83899999999994c-76.539 0-128.592 34.148-128.592 34.148V39.42999999999995c0-6.252-5.068-11.296-11.131-11.296h-136.264c-6.109 0-11.131 5.044-11.131 11.296l-0.379 710.521c0 6.3 5.068 11.272 11.225 11.272 0 0 94.773 0 94.869 0 4.215 0 7.389-2.179 9.805-5.968 2.369-3.837 5.73-32.775 5.73-32.775s55.557 52.763 161.035 52.763c123.807 0 194.758-62.804 194.758-281.906C2856.859 274.51800000000003 2743.471 245.83899999999994 2666.932 245.83899999999994zM2613.791 646.225c-46.701-1.421-78.34-22.64-78.34-22.64v-225.07c0 0 31.307-19.206 69.672-22.593 48.547-4.31 95.438 10.326 95.438 126.13C2700.322 624.059 2679.199 648.166 2613.791 646.225zM1185.125 643.667c-5.969 0-21.219 2.368-36.85 2.368-49.92 0-66.971-23.256-66.971-53.331 0-30.218 0-199.85 0-199.85h101.926c6.252 0 11.178-5.044 11.178-11.343v-109.48c0.094-6.299-4.926-11.344-11.178-11.344h-101.926l-0.143-134.535c0-5.092-2.699-7.625-8.572-7.625H933.861c-5.352 0-8.336 2.391-8.336 7.578v139.035c0 0-69.576 16.79-74.266 18.188-4.641 1.326-8.051 5.684-8.051 10.822v87.408c0 6.252 5.068 11.344 11.178 11.344h71.139c0 0 0 91.34 0 210.222 0 156.109 109.553 171.455 183.439 171.455 33.723 0 74.076-10.988 80.848-13.356 4.074-1.421 6.395-5.637 6.395-10.136l0.047-96.101C1196.254 648.688 1190.998 643.572 1185.125 643.667z"/></svg>
@@ -0,0 +1,17 @@
1
+ class BaseController < ActionController::Base
2
+ before_action :verify_access
3
+
4
+ if RailsPerformance.http_basic_authentication_enabled
5
+ http_basic_authenticate_with \
6
+ name: RailsPerformance.http_basic_authentication_user_name,
7
+ password: RailsPerformance.http_basic_authentication_password
8
+ end
9
+
10
+ private
11
+
12
+ def verify_access
13
+ result = RailsPerformance.verify_access_proc.call(self)
14
+ redirect_to('/', error: 'Access Denied', status: 401) unless result
15
+ end
16
+
17
+ end
@@ -1,60 +1,64 @@
1
- class RailsPerformanceController < ActionController::Base
1
+ require_relative './base_controller.rb'
2
2
 
3
- def index
4
- @datasource = RP::DataSource.new(prepare_query)
5
- db = @datasource.db
3
+ class RailsPerformanceController < BaseController
6
4
 
7
- @throughput_report = RP::Reports::ThroughputReport.new(db)
8
- @throughput_report_data = @throughput_report.data
5
+ if RailsPerformance.enabled
6
+ def index
7
+ @datasource = RP::DataSource.new(prepare_query)
8
+ db = @datasource.db
9
9
 
10
- @response_time_report = RP::Reports::ResponseTimeReport.new(db)
11
- @response_time_report_data = @response_time_report.data
12
- end
10
+ @throughput_report = RP::Reports::ThroughputReport.new(db)
11
+ @throughput_report_data = @throughput_report.data
12
+
13
+ @response_time_report = RP::Reports::ResponseTimeReport.new(db)
14
+ @response_time_report_data = @response_time_report.data
15
+ end
13
16
 
14
- def summary
15
- @datasource = RP::DataSource.new(prepare_query)
16
- db = @datasource.db
17
+ def summary
18
+ @datasource = RP::DataSource.new(prepare_query)
19
+ db = @datasource.db
17
20
 
18
- @throughput_report = RP::Reports::ThroughputReport.new(db)
19
- @throughput_report_data = @throughput_report.data
21
+ @throughput_report = RP::Reports::ThroughputReport.new(db)
22
+ @throughput_report_data = @throughput_report.data
20
23
 
21
- @response_time_report = RP::Reports::ResponseTimeReport.new(db)
22
- @response_time_report_data = @response_time_report.data
24
+ @response_time_report = RP::Reports::ResponseTimeReport.new(db)
25
+ @response_time_report_data = @response_time_report.data
23
26
 
24
- @report = RP::Reports::BreakdownReport.new(db, title: "Requests")
25
- @data = @report.data
27
+ @report = RP::Reports::BreakdownReport.new(db, title: "Requests")
28
+ @data = @report.data
26
29
 
27
- respond_to do |format|
28
- format.js {}
29
- format.any { render plain: "Doesn't open in new window" }
30
+ respond_to do |format|
31
+ format.js {}
32
+ format.any { render plain: "Doesn't open in new window" }
33
+ end
30
34
  end
31
- end
32
35
 
33
- def crashes
34
- @datasource = RP::DataSource.new(prepare_query({status_eq: 500}))
35
- db = @datasource.db
36
- @report = RP::Reports::CrashReport.new(db)
37
- @data = @report.data
38
- end
36
+ def crashes
37
+ @datasource = RP::DataSource.new(prepare_query({status_eq: 500}))
38
+ db = @datasource.db
39
+ @report = RP::Reports::CrashReport.new(db)
40
+ @data = @report.data
41
+ end
39
42
 
40
- def requests
41
- @datasource = RP::DataSource.new(prepare_query)
42
- db = @datasource.db
43
- @report = RP::Reports::RequestsReport.new(db, group: :controller_action_format, sort: :count)
44
- @data = @report.data
45
- end
43
+ def requests
44
+ @datasource = RP::DataSource.new(prepare_query)
45
+ db = @datasource.db
46
+ @report = RP::Reports::RequestsReport.new(db, group: :controller_action_format, sort: :count)
47
+ @data = @report.data
48
+ end
46
49
 
47
- def recent
48
- @datasource = RP::DataSource.new(prepare_query)
49
- db = @datasource.db
50
- @report = RP::Reports::RecentRequestsReport.new(db)
51
- @data = @report.data
52
- end
50
+ def recent
51
+ @datasource = RP::DataSource.new(prepare_query)
52
+ db = @datasource.db
53
+ @report = RP::Reports::RecentRequestsReport.new(db)
54
+ @data = @report.data
55
+ end
53
56
 
54
- private
57
+ private
55
58
 
56
- def prepare_query(query = params)
57
- RP::Rails::QueryBuilder.compose_from(query)
59
+ def prepare_query(query = params)
60
+ RP::Rails::QueryBuilder.compose_from(query)
61
+ end
58
62
  end
59
63
 
60
64
  end
@@ -3,7 +3,7 @@ module RailsPerformanceHelper
3
3
  return nil unless value
4
4
  return value if value.is_a?(Integer)
5
5
 
6
- value.nan? ? nil : value.round(2)
6
+ value.nan? ? nil : value.round(1)
7
7
  end
8
8
 
9
9
  def ms(value)
@@ -2,6 +2,7 @@
2
2
  <%= insert_js_file 'rails.js' %>
3
3
  <%= insert_js_file 'stupidtable.min.js' %>
4
4
 
5
+ <%= javascript_include_tag 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/js/all.min.js' %>
5
6
  <%= javascript_include_tag 'https://code.highcharts.com/highcharts.js' %>
6
7
  <%= javascript_include_tag 'https://code.highcharts.com/modules/data.js' %>
7
8
  <%= javascript_include_tag 'https://code.highcharts.com/modules/exporting.js' %>
@@ -14,13 +14,20 @@ function showPanel() {
14
14
 
15
15
 
16
16
  $(function() {
17
-
18
17
  var panel = {};
19
18
  window.panel = panel;
20
19
  window.panel.header = $(".panel-heading span");
21
20
  window.panel.content = $(".cd-panel__content");
22
21
  window.panel.close = '<a class="panel-close" href="#" onclick="javascript: hidePanel(); return false;">&times;</a>'
23
22
 
23
+ $(document).ajaxStart(function(e) {
24
+ $('.loader-wrapper').addClass('is-active');
25
+ });
26
+
27
+ $(document).ajaxComplete(function(e) {
28
+ $('.loader-wrapper').removeClass('is-active');
29
+ });
30
+
24
31
  $(".toggle-panel").on('click', function(e) {
25
32
  showPanel();
26
33
  });
@@ -10,15 +10,23 @@
10
10
  <link rel="shortcut icon" href="/favicon.ico">
11
11
  </head>
12
12
  <body>
13
+ <div class="loader-wrapper">
14
+ <div class="loader is-loading"></div>
15
+ </div>
13
16
  <section class="section">
14
17
  <div class="container is-fluid">
15
18
  <%= render '/shared/header' %>
16
19
  <%= yield %>
20
+ <div class="footer-box">
21
+ © Rails Performance <span class='red'><i class="fas fa-heart"></i></span> <%= link_to 'https://github.com/igorkasyanchuk/rails_performance', 'https://github.com/igorkasyanchuk/rails_performance', target: '_blank' %>
22
+ <div class="is-pulled-right">v.<%= RP::VERSION %></div>
23
+ </div>
17
24
  </div>
18
25
  </section>
19
26
  <%= render '/rails_performance/panel' %>
20
27
  <div class="panel-overlay">
21
28
  <%= render '/javascripts/javascripts' %>
22
29
  <%= yield :on_load %>
30
+
23
31
  </body>
24
32
  </html>
@@ -5,7 +5,7 @@
5
5
  <thead>
6
6
  <tr>
7
7
  <th data-sort="string">Datetime</th>
8
- <th data-sort="string">Controller#Action</th>
8
+ <th data-sort="string">Controller#action</th>
9
9
  <th data-sort="string">Method</th>
10
10
  <th data-sort="string">Format</th>
11
11
  <th data-sort="string">Path</th>
@@ -24,7 +24,6 @@
24
24
  <div class="navbar-item">
25
25
  <div class="buttons">
26
26
  <%#= link_to 'Export to CSV', '#', target: '_blank', class: "button is-primary" %>
27
- <%= link_to 'Documentation', 'https://github.com/igorkasyanchuk/rails_performance', target: '_blank', class: "button is-light" %>
28
27
  <%= link_to '/', target: '_blank', class: "button is-light home_icon" do %>
29
28
  <%= icon('home') %>
30
29
  <% end %>
@@ -15,6 +15,7 @@
15
15
  .panel-close {
16
16
  color: red;
17
17
  padding-right: 10px;
18
+ font-size: 15px
18
19
  }
19
20
 
20
21
  .cd-panel {
@@ -1,3 +1,37 @@
1
+ .loader-wrapper {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ height: 100%;
6
+ width: 100%;
7
+ background: #333;
8
+ opacity: 0;
9
+ z-index: -1;
10
+ transition: opacity .3s;
11
+ /* display: flex; */
12
+ justify-content: center;
13
+ align-items: center;
14
+ border-radius: 6px;
15
+ display: none;
16
+ }
17
+
18
+ .loader-wrapper .loader {
19
+ height: 80px;
20
+ width: 80px;
21
+ }
22
+
23
+ .loader-wrapper.is-active {
24
+ display: flex;
25
+ opacity: 0.3;
26
+ z-index: 1000;
27
+ }
28
+
29
+ .footer-box {
30
+ padding-top: 6px;
31
+ font-size: 10px;
32
+ opacity: 0.7;
33
+ }
34
+
1
35
  .stats_icon svg {
2
36
  width: 16px;
3
37
  height: 16px;
@@ -9,7 +43,7 @@
9
43
  }
10
44
 
11
45
  .chart {
12
- height: 255px;
46
+ height: 245px;
13
47
  }
14
48
 
15
49
  .chart_mini {
@@ -17,6 +51,10 @@
17
51
  width: 720px;
18
52
  }
19
53
 
54
+ .red {
55
+ color: red;
56
+ }
57
+
20
58
  .logo h2 {
21
59
  text-transform: uppercase;
22
60
  color: red;
@@ -1,3 +1,3 @@
1
1
  module RailsPerformance
2
- VERSION = '0.0.1.12'
2
+ VERSION = '0.0.1.13'
3
3
  end
@@ -27,6 +27,25 @@ module RailsPerformance
27
27
  mattr_accessor :debug
28
28
  @@debug = false
29
29
 
30
+ mattr_accessor :enabled
31
+ @@enabled = true
32
+
33
+ # Enable http basic authentication
34
+ mattr_accessor :http_basic_authentication_enabled
35
+ @@http_basic_authentication_enabled = false
36
+
37
+ # Enable http basic authentication
38
+ mattr_accessor :http_basic_authentication_user_name
39
+ @@http_basic_authentication_user_name = 'rails_performance'
40
+
41
+ # Enable http basic authentication
42
+ mattr_accessor :http_basic_authentication_password
43
+ @@http_basic_authentication_password = 'password12'
44
+
45
+ # If you want to enable access by specific conditions
46
+ mattr_accessor :verify_access_proc
47
+ @@verify_access_proc = proc { |controller| true }
48
+
30
49
  def self.setup
31
50
  yield(self)
32
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_performance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.12
4
+ version: 0.0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
@@ -94,10 +94,13 @@ files:
94
94
  - app/assets/images/activity.svg
95
95
  - app/assets/images/close.svg
96
96
  - app/assets/images/export.svg
97
+ - app/assets/images/git.svg
98
+ - app/assets/images/github.svg
97
99
  - app/assets/images/home.svg
98
100
  - app/assets/images/import.svg
99
101
  - app/assets/images/menu.svg
100
102
  - app/assets/images/stat.svg
103
+ - app/controllers/base_controller.rb
101
104
  - app/controllers/rails_performance_controller.rb
102
105
  - app/helpers/rails_performance_helper.rb
103
106
  - app/views/javascripts/_javascripts.html.erb