MCPcopy Create free account
hub / github.com/apple/foundationdb / Run

Method Run

bindings/go/src/_stacktester/stacktester.go:902–922  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

900}
901
902func (sm *StackMachine) Run() {
903 r, e := db.Transact(func(tr fdb.Transaction) (interface{}, error) {
904 return tr.GetRange(tuple.Tuple{sm.prefix}, fdb.RangeOptions{}).GetSliceOrPanic(), nil
905 })
906 if e != nil {
907 panic(e)
908 }
909
910 instructions := r.([]fdb.KeyValue)
911
912 for i, kv := range instructions {
913 inst, _ := tuple.Unpack(fdb.Key(kv.Value))
914
915 if sm.verbose {
916 fmt.Printf("Instruction %d\n", i)
917 }
918 sm.processInst(i, inst)
919 }
920
921 sm.threads.Wait()
922}
923
924var db fdb.Database
925

Callers 4

TestTuplePackingFunction · 0.45
BenchmarkTuplePackingFunction · 0.45
processInstMethod · 0.45
mainFunction · 0.45

Calls 6

processInstMethod · 0.95
GetSliceOrPanicMethod · 0.80
TransactMethod · 0.65
GetRangeMethod · 0.65
UnpackMethod · 0.65
KeyMethod · 0.45

Tested by 2

TestTuplePackingFunction · 0.36
BenchmarkTuplePackingFunction · 0.36