func()

in qf.go [43:81]


func (qf *Filter) DebugDump(full bool) {
	fmt.Printf("\nquotient filter is %d large (%d q bits) with %d entries (loaded %0.3f)\n",
		qf.size, qf.qBits, qf.entries, float64(qf.entries)/float64(qf.size))

	if full {
		fmt.Printf("  bucket  O C S remainder->\n")
		skipped := 0
		for i := uint64(0); i < uint64(qf.size); i++ {
			o, c, s := 0, 0, 0
			sd := qf.read(i)
			if sd.occupied() {
				o = 1
			}
			if sd.continuation() {
				c = 1
			}
			if sd.shifted() {
				s = 1
			}
			if sd.empty() {
				skipped++
			} else {
				if skipped > 0 {
					fmt.Printf("          ...\n")
					skipped = 0
				}
				r := sd.r()
				v := uint64(0)
				if qf.storage != nil {
					v = qf.storage.Get(i)
				}
				fmt.Printf("%8d  %d %d %d %x (%d)\n", i, o, c, s, r, v)
			}
		}
		if skipped > 0 {
			fmt.Printf("          ...\n")
		}
	}
}