<commit_before>require 'rubygems'
require 'syntax/convertors/html'
require 'gchart'
require 'bud/state'

class VizOnline #:nodoc: all
  def initialize(bud_instance)
    @bud_instance = bud_instance
    @meta_tables = {'t_rules' => 1, 't_depends' => 1, 't_table_info' => 1, 't_cycle' => 1, 't_stratum' => 1, 't_depends_tc' => 1, 't_table_schema' => 1, 't_provides' => 1}
    @bud_instance.options[:dbm_dir] = "DBM_#{@bud_instance.class}_#{bud_instance.options[:tag]}_#{bud_instance.object_id}_#{bud_instance.port}"
    @table_info = bud_instance.tables[:t_table_info]
    @table_schema = bud_instance.tables[:t_table_schema]
    @logtab = new_tab("the_big_log", [:table, :time, :contents], bud_instance)
    tmp_set = []
    @bud_instance.tables.each do |name, tbl|
      next if name == "the_big_log"
      # Temp collections don't have a schema until a fact has been inserted into
      # them; for now, we just include an empty schema for them in the viz
      if tbl.schema.nil?
        schema = [:a, :b, :c, :d]
      else
        schema = tbl.schema.clone
      end
      tmp_set << [name, schema, tbl.class.to_s]
    end

    tmp_set.each do |t|
      news = [:c_bud_time]
      snd_alias = t[0].to_s + "_snd"<commit_msg>expose 'logtab' for use by BloomUnit<commit_after>require 'rubygems'
require 'syntax/convertors/html'
require 'gchart'
require 'bud/state'

class VizOnline #:nodoc: all
  attr_reader :logtab
  def initialize(bud_instance)
    @bud_instance = bud_instance
    @meta_tables = {'t_rules' => 1, 't_depends' => 1, 't_table_info' => 1, 't_cycle' => 1, 't_stratum' => 1, 't_depends_tc' => 1, 't_table_schema' => 1, 't_provides' => 1}
    @bud_instance.options[:dbm_dir] = "DBM_#{@bud_instance.class}_#{bud_instance.options[:tag]}_#{bud_instance.object_id}_#{bud_instance.port}"
    @table_info = bud_instance.tables[:t_table_info]
    @table_schema = bud_instance.tables[:t_table_schema]
    @logtab = new_tab("the_big_log", [:table, :time, :contents], bud_instance)
    tmp_set = []
    @bud_instance.tables.each do |name, tbl|
      next if name == "the_big_log"
      # Temp collections don't have a schema until a fact has been inserted into
      # them; for now, we just include an empty schema for them in the viz
      if tbl.schema.nil?
        schema = [:a, :b, :c, :d]
      else
        schema = tbl.schema.clone
      end
      tmp_set << [name, schema, tbl.class.to_s]
    end

    tmp_set.each do |t|
      news = [:c_bud_time]
      snd_alias = t[0].to_s + "_snd"
{'fraction_non_alphanumeric': 0.14125650260104042, 'fraction_numerical': 0.007202881152460984, 'mean_word_length': 3.6641791044776117, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, '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': '567215', 'n_tokens_mistral': 945, 'n_tokens_neox': 916, 'n_words': 216}