<commit_before>require 'cucumber/formatter/progress'

module Cucumber
  module Formatter
    class Timed < Progress
      def initialize(*args)
        @duration = 0.0
        super
      end

      def before_steps(steps)
        @my_time = Time.now
      end

      def after_steps(steps)
        @duration += Time.now - @my_time
      end

      def after_feature_element(scenario)
        @io.puts " #{scenario.name} (#{@duration}s)"
        @duration = 0.0
      end
    end
  end
end<commit_msg>use the full initialize method signature and save io in an instance-var<commit_after>require 'cucumber/formatter/progress'

module Cucumber
  module Formatter
    class Timed < Progress
      def initialize(step_mother, io, options)
        @io = io
        @duration = 0.0
        super
      end

      def before_steps(steps)
        @my_time = Time.now
      end

      def after_steps(steps)
        @duration += Time.now - @my_time
      end

      def after_feature_element(scenario)
        @io.puts " #{scenario.name} (#{@duration}s)"
        @duration = 0.0
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08759124087591241, 'fraction_numerical': 0.0072992700729927005, 'mean_word_length': 2.098870056497175, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4678258', 'n_tokens_mistral': 350, 'n_tokens_neox': 337, 'n_words': 88}