def dump
      out  = ""
      out << "Page #{current}\n"
      out << "  type:            #{MiqBdbPage.type2string(ptype)}\n"
      out << "  prev:            #{prev}\n"
      out << "  next:            #{@header['next_pgno']}\n"
      out << "  log seq num:     file=#{@header['lsn_file']}  offset=#{@header['lsn_offset']}\n"
      out << "  level:           #{level}\n"

      if @header['p_type'] == P_OVERFLOW
        out << "  ref cnt:         #{nentries}\n"
        out << "  len:             #{offset}\n"
      else
        out << "  entries:         #{nentries}\n"
        out << "  offset:          #{offset}\n"
      end
      out << "  data size:       #{@data.size}\n"
      out << "  data:            "

      @data.bytes.take(20).each do |c|
        out << sprintf("%.2x ", c)
      end
      out << "..." if @data.size > 20

      out << "\n\n"
      out
    end
def dump
      out  = ""
      out << "Page #{current}\n"
      out << "  type:            #{MiqBdbPage.type2string(ptype)}\n"
      out << "  prev:            #{prev}\n"
      out << "  next:            #{@header['next_pgno']}\n"
      out << "  log seq num:     file=#{@header['lsn_file']}  offset=#{@header['lsn_offset']}\n"
      out << "  level:           #{level}\n"

      if @header['p_type'] == P_OVERFLOW
        out << "  ref cnt:         #{nentries}\n"
        out << "  len:             #{offset}\n"
      else
        out << "  entries:         #{nentries}\n"
        out << "  offset:          #{offset}\n"
      end
      out << "  data size:       #{@data.size}\n"
      out << "  data:            "

      @data.bytes.take(20).each do |c|
        out << sprintf("%.2x ", c)
      end
      out << "..." if @data.size > 20

      out << "\n\n"
      out
    end
Dump page statistics like db_dump.