mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-18 20:59:39 +02:00
perf(income statement): cache income statement queries (#2371)
* Leftover cleanup from prior PR * Benchmark convenience task * Change default warm benchmark time * Cache income statement queries * Fix private method access
This commit is contained in:
parent
84b2426e54
commit
a5f1677f60
6 changed files with 103 additions and 77 deletions
|
@ -16,7 +16,7 @@ class CustomAuth < DerailedBenchmarks::AuthHelper
|
|||
# Make sure this user is created in the DB with realistic data before running benchmarks
|
||||
user = User.find_by!(email: "user@maybe.local")
|
||||
|
||||
puts "Found user for benchmarking: #{user.email}"
|
||||
Rails.logger.debug "Found user for benchmarking: #{user.email}"
|
||||
|
||||
# Mimic the way Rails handles browser cookies
|
||||
session = user.sessions.create!
|
||||
|
@ -27,7 +27,7 @@ class CustomAuth < DerailedBenchmarks::AuthHelper
|
|||
|
||||
env['HTTP_COOKIE'] = "session_token=#{signed_value}"
|
||||
|
||||
puts "Setting up session for user: #{user.email}"
|
||||
Rails.logger.debug "Setting up session for user: #{user.email}"
|
||||
|
||||
app.call(env)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue