Skip to content

Commit

Permalink
refactor: Update the puma-stats to display in the footer while in dev…
Browse files Browse the repository at this point in the history
…elopment
  • Loading branch information
jonrandahl committed Sep 17, 2024
1 parent 3305c88 commit 7b5ef60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions app/views/common/_footer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,3 @@
%p.u-muted--footer
= t('common.footer.application_release')
= Version::VERSION
- if Rails.env.development?
%pre
[puma stats:
= JSON.pretty_generate(JSON.parse(Puma.stats, symbolize_names: true))
, time: #{Time.now}]
5 changes: 5 additions & 0 deletions app/views/common/_puma_stats.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

%div
%pre
%code
= "[#{JSON.pretty_generate(puma_stats: JSON.parse(Puma.stats), time: Time.now)}]"
1 change: 1 addition & 0 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@


= render partial: 'common/footer'
= render partial: 'common/puma_stats' if Rails.env.development?

0 comments on commit 7b5ef60

Please sign in to comment.