Sha256: 9a1331c463915b2ab17e60375f91a69075bc2a85f15c3b6bb6e9954e10f7bcf1
Contents?: true
Size: 556 Bytes
Versions: 4
Compression:
Stored size: 556 Bytes
Contents
# frozen_string_literal: true $LOAD_PATH.push File.expand_path("#{__dir__}/../lib") require "sql_runner" require "ruby-prof" connection_string = "postgres:///test?connect_timeout=2&application_name=myapp" SQLRunner.connect connection_string SQLRunner.pool = 25 SQLRunner.timeout = 10 SQLRunner.root_dir = "#{__dir__}/sql" class FindUser < SQLRunner::Query plugin :one end result = RubyProf.profile do FindUser.call email: "me@fnando.com" end File.open("examples/profiling.html", "w") do |io| RubyProf::CallStackPrinter.new(result).print(io) end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sql_runner-0.4.1 | examples/profiling.rb |
sql_runner-0.4.0 | examples/profiling.rb |
sql_runner-0.3.0 | examples/profiling.rb |
sql_runner-0.2.0 | examples/profiling.rb |