#!/usr/bin/env ruby
# Copyright (C) 2003-2005 Kouichirou Eto, All rights reserved.

$LOAD_PATH.unshift("../../compat") unless $LOAD_PATH.include?("../../compat")
$LOAD_PATH << "../../lib" unless $LOAD_PATH.include?("../../lib")
require "benchmark"
require "qwik/wabisabi"
require "bench-example"
require 'qwik/xmlformatter.so'

def main
  ws = XML_FORMATTER_EXAMPLE
  n = 1000
  formatter = Gonzui::XMLFormatter.new
  benchmark {
    n.times {
      result = formatter.format(ws)
    }
  }
end
main
