Created
July 5, 2020 18:01
-
-
Save andrykonchin/6c1e7699e16ed1b1ea89cda265c50fe9 to your computer and use it in GitHub Desktop.
Example of exe/rubocop-profile file to measure performance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
$LOAD_PATH.unshift("#{__dir__}/../lib") | |
require 'rubocop' | |
require 'stackprof' | |
result = 0 | |
StackProf.run(mode: :cpu, out: 'tmp/stackprof.dump') do | |
cli = RuboCop::CLI.new | |
result = cli.run | |
end | |
exit result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment