Sha256: 1dc1ac49a3fe0c7605db793ddb65784806b372b5aa9aac4876c5e35554ca9265
Contents?: true
Size: 700 Bytes
Versions: 10
Compression:
Stored size: 700 Bytes
Contents
require 'stackprof' require_relative '../lib/enhanced_errors' # Adjust the path if necessary # gem install stackprof # adjust path as needed # ruby ./lib/core_ext/enhanced_errors/benchmark/stackprofile.rb # dumps to current folder. read the stackprof dump: # stackprof stackprof.dump # Define the number of iterations ITERATIONS = 10_000 def run_with_enhanced_errors EnhancedErrors.enhance!(debug: false) ITERATIONS.times do begin raise 'Test exception with EnhancedErrors' rescue => _e # Exception handled with EnhancedErrors. end end end def stackprofile StackProf.run(mode: :wall, out: 'stackprof.dump') do run_with_enhanced_errors end end stackprofile
Version data entries
10 entries across 10 versions & 1 rubygems