Beispiel #1
0
// NewStatement initializes a new Statement instance.
func NewStatement(ns string, set string, binNames ...string) *Statement {
	return &Statement{
		Namespace:  ns,
		SetName:    set,
		BinNames:   binNames,
		returnData: true,
		TaskId:     uint64(xornd.Int64()),
	}
}
func Benchmark_xor_rand_fast_pool(b *testing.B) {
	for i := 0; i < b.N; i++ {
		xor.Int64()
	}
}
Beispiel #3
0
// Always set the taskId client-side to a non-zero random value
func (stmt *Statement) setTaskId() {
	for stmt.TaskId == 0 {
		stmt.TaskId = uint64(xornd.Int64())
	}
}