Merge branch 'dev'
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
Docker / docker (push) Waiting to run

This commit is contained in:
songtianlun 2025-02-14 11:09:59 +08:00
commit 6f655ee792
4 changed files with 14 additions and 2 deletions

View File

@ -80,7 +80,8 @@ group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"
gem 'bullet', '~> 8.0'
gem "bullet", "~> 8.0"
gem "rack-mini-profiler", "~> 3.3"
end
group :production do

View File

@ -319,6 +319,8 @@ GEM
raabro (1.4.0)
racc (1.8.1)
rack (3.1.9)
rack-mini-profiler (3.3.1)
rack (>= 1.2.0)
rack-session (2.1.0)
base64 (>= 0.1.0)
rack (>= 3.0.0)
@ -537,6 +539,7 @@ DEPENDENCIES
pg (~> 1.5)
propshaft
puma (>= 5.0)
rack-mini-profiler (~> 3.3)
rails (~> 8.0.1)
rubocop-rails-omakase
ruby-openai (~> 7.3)

View File

@ -12,7 +12,7 @@ export default class extends Controller {
const endTime = performance.now();
const loadTime = endTime - startTime;
// 更新显示
this.timerTarget.textContent = loadTime;
this.timerTarget.textContent = Math.ceil( loadTime );
});
}
}

View File

@ -0,0 +1,8 @@
# frozen_string_literal: true
if Rails.env.development?
require "rack-mini-profiler"
# The initializer was required late, so initialize it manually.
# Rack::MiniProfilerRails.initialize!(Rails.application)
end