diff --git a/lib/fluent/rubyprof.rb b/lib/fluent/rubyprof.rb index d32d08e..9c37a93 100644 --- a/lib/fluent/rubyprof.rb +++ b/lib/fluent/rubyprof.rb @@ -69,7 +69,7 @@ def parse_options(argv = ARGV) raise OptionParser::InvalidOption.new("`start` or `stop` must be specified as the 1st argument") end - measure_modes = %w[PROCESS_TIME WALL_TIME CPU_TIME ALLOCATIONS MEMORY GC_RUNS GC_TIME] + measure_modes = %w[PROCESS_TIME WALL_TIME ALLOCATIONS MEMORY] unless measure_modes.include?(opts[:measure_mode]) raise OptionParser::InvalidOption.new("-m allows one of #{measure_modes.join(', ')}") end diff --git a/spec/fluent-rubyprof/rubyprof_spec.rb b/spec/fluent-rubyprof/rubyprof_spec.rb index 1c551c9..6cca617 100644 --- a/spec/fluent-rubyprof/rubyprof_spec.rb +++ b/spec/fluent-rubyprof/rubyprof_spec.rb @@ -13,7 +13,7 @@ end it 'correct measure_mode' do - expect { Fluent::Rubyprof.new.parse_options(['start', '-m', 'CPU_TIME']) }.not_to raise_error + expect { Fluent::Rubyprof.new.parse_options(['start', '-m', 'PROCESS_TIME']) }.not_to raise_error end it 'incorrect measure_mode' do