DEV: Apply syntax_tree formatting to script/*

This commit is contained in:
David Taylor
2023-01-07 11:53:14 +00:00
parent ff508d1ae5
commit 436b3b392b
143 changed files with 8905 additions and 7353 deletions

View File

@ -2,22 +2,30 @@
# simple script to measure memory at boot
if ENV['RAILS_ENV'] != "production"
exec "RAILS_ENV=production ruby #{__FILE__}"
end
exec "RAILS_ENV=production ruby #{__FILE__}" if ENV["RAILS_ENV"] != "production"
require 'memory_profiler'
require "memory_profiler"
MemoryProfiler.report do
require File.expand_path("../../config/environment", __FILE__)
MemoryProfiler
.report do
require File.expand_path("../../config/environment", __FILE__)
Rails.application.routes.recognize_path('abc') rescue nil
begin
Rails.application.routes.recognize_path("abc")
rescue StandardError
nil
end
# load up the yaml for the localization bits, in master process
I18n.t(:posts)
# load up the yaml for the localization bits, in master process
I18n.t(:posts)
# load up all models and schema
(ActiveRecord::Base.connection.tables - %w[schema_migrations versions]).each do |table|
table.classify.constantize.first rescue nil
# load up all models and schema
(ActiveRecord::Base.connection.tables - %w[schema_migrations versions]).each do |table|
begin
table.classify.constantize.first
rescue StandardError
nil
end
end
end
end.pretty_print
.pretty_print