<commit_before>require 'thinp_xml/metadata'

#----------------------------------------------------------------

module ThinpXML
  class Builder
    attr_accessor :uuid, :nr_thins, :nr_mappings

    def initialize
      @uuid = ''
      @nr_thins = 0
      @nr_mappings = 0
    end

    def generate
      nr_thins = @nr_thins.to_i
      nr_mappings = @nr_mappings.to_i

      superblock = Superblock.new(@uuid, 0, 1, 128, 100)

      devices = Array.new
      offset = 0
      0.upto(nr_thins - 1) do |dev|
        mappings = Array.new
<commit_msg>Sample nr mappings for each thin (was same for all previously)<commit_after>require 'thinp_xml/metadata'

#----------------------------------------------------------------

module ThinpXML
  class Builder
    attr_accessor :uuid, :nr_thins, :nr_mappings

    def initialize
      @uuid = ''
      @nr_thins = 0
      @nr_mappings = 0
    end

    def generate
      nr_thins = @nr_thins.to_i

      superblock = Superblock.new(@uuid, 0, 1, 128, 100)

      devices = Array.new
      offset = 0
      0.upto(nr_thins - 1) do |dev|
        mappings = Array.new
        nr_mappings = @nr_mappings.to_i

{'fraction_non_alphanumeric': 0.1935483870967742, 'fraction_numerical': 0.022667829119442023, 'mean_word_length': 1.651270207852194, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5490782', 'n_tokens_mistral': 404, 'n_tokens_neox': 367, 'n_words': 90}