<commit_before>module Nmap
  class ScanTask

    # The name of the scan task
    attr_reader :name

    # The time the scan task begun
    attr_reader :start

    # The time the scan task ended
    attr_reader :stop

    # Extra information on the scan task
    attr_reader :extrainfo

    #
    # Creates a new ScanTask object.
    #
    # @param [String] name
    #   The name of the scan task.
    #
    # @param [Time] start
    #   The time the scan task begun.
    #
    # @param [Time] stop
    #   The time the scan task ended.
    #
    # @param [String] extrainfo
    #   Any extra information relating to the scan task.
    #
    # @since 0.1.2
    #
    def initialize(name,start,stop,extrainfo=nil)
      @name = name
      @start = start
      @stop = stop
      @extrainfo = extrainfo
    end

    #
    # The duration of the scan task.
    #
    # @return [Integer]
    #   The number of seconds it took the scan task to complete.
    #
    # @since 0.1.2
    #
    def duration
      (@stop - @start)
    end

    #
    # Converts the scan task to a String.
    #
    # @return [String]
    #   The String form of the scan task.<commit_msg>Renamed ScanTask#start, ScanTask#stop to ScanTask#start_time, ScanTask#end_time, respectively.<commit_after>module Nmap
  class ScanTask

    # The name of the scan task
    attr_reader :name

    # The time the scan task begun
    attr_reader :start

    # The time the scan task ended
    attr_reader :stop

    # Extra information on the scan task
    attr_reader :extrainfo

    #
    # Creates a new ScanTask object.
    #
    # @param [String] name
    #   The name of the scan task.
    #
    # @param [Time] start_time
    #   The time the scan task begun.
    #
    # @param [Time] end_time
    #   The time the scan task ended.
    #
    # @param [String] extrainfo
    #   Any extra information relating to the scan task.
    #
    # @since 0.1.2
    #
    def initialize(name,start_time,end_time,extrainfo=nil)
      @name = name
      @start_time = start_time
      @end_time = end_time
      @extrainfo = extrainfo
    end

    #
    # The duration of the scan task.
    #
    # @return [Integer]
    #   The number of seconds it took the scan task to complete.
    #
    # @since 0.1.2
    #
    def duration
      (@end_time - @start_time)
    end

    #
    # Converts the scan task to a String.
    #
    # @return [String]
    #   The String form of the scan task.
{'fraction_non_alphanumeric': 0.07950819672131147, 'fraction_numerical': 0.004918032786885246, 'mean_word_length': 1.9841075794621026, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4379388', 'n_tokens_mistral': 801, 'n_tokens_neox': 773, 'n_words': 273}