-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
week 4 optimisation (Shlyapnikov) #143
base: master
Are you sure you want to change the base?
week 4 optimisation (Shlyapnikov) #143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Респект, по максимуму всего сделано 👍
100% 2054 (longest request) | ||
``` | ||
|
||
## После того как закешировали паршл среднее время ответа уменьшилось в 2,5 раза |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Document Path: / | ||
Document Length: 143451 bytes | ||
Concurrency Level: 5 | ||
Time taken for tests: 2.669 seconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
как-бдуто >10x по сравнлению с 33.310 seconds
100% 206 (longest request) | ||
``` | ||
|
||
## на local_production окружении с кешированием и прекомпиляци ассетов срднее время ответа уменьшилось почти в 5 раз |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
require 'prometheus_exporter/middleware' | ||
require 'prometheus_exporter/client' | ||
|
||
prometheus_client = PrometheusExporter::Client.new(host: 'localhost') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -0,0 +1,62 @@ | |||
RailsPerformance.setup do |config| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ого, я не видел этот гем раньше, респект
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да я вот, чисто случайно нашел)
@@ -1,3 +1,9 @@ | |||
require 'prometheus_exporter/instrumentation' | |||
PrometheusExporter::Instrumentation::ActiveRecord.start( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
- '-config.file=/etc/prometheus/prometheus.yml' | ||
ports: | ||
- '9090:9090' | ||
grafana: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
+
Grafanaдля мониторинга локального
dev.to`NewRelic
для мониторинга локальногоdev.to
Skylight
[rails_performance](https://github.com/igorkasyanchuk/rails_performance)
Который позицианируют как: "This is a simple and free alternative to the New Relic APM, Datadog or other similar services."
ab
иrack-mini-profiler
- подтверждена гипотиза что заметное время занимает рендерингpartial
-ов_single_story.html.erb
app/views/articles/tag_index.html.erb
который по моему мнению довольно статичен и изменяется редко