甲醛影响战斗力

This commit is contained in:
eson 2023-08-02 19:05:23 +08:00
parent 1af5dba6e5
commit df96694e10
3 changed files with 5 additions and 8 deletions

View File

@ -16,7 +16,8 @@ type CmdDequeue struct {
} }
type Command struct { type Command struct {
Group string `json:"group"` Group string `json:"group"`
Version string `json:"version"`
} }
// func (cmd *Command) Encode() ([]byte, error) { // func (cmd *Command) Encode() ([]byte, error) {

View File

@ -22,10 +22,6 @@ func main() {
} }
func init() {
}
var Consumption = triggered.RegisterExecute(func(params *triggered.Params[bool]) { var Consumption = triggered.RegisterExecute(func(params *triggered.Params[bool]) {
var nh *dragonboat.NodeHost var nh *dragonboat.NodeHost
@ -60,7 +56,7 @@ var Consumption = triggered.RegisterExecute(func(params *triggered.Params[bool])
sysMB := float64(m.Sys) / 1024 / 1024 sysMB := float64(m.Sys) / 1024 / 1024
fmt.Printf("dequeue count %d, Alloc = %.2f MB, TotalAlloc = %.2f MB, Sys = %.2f MB\n", i, allocMB, totalAllocMB, sysMB) fmt.Printf("dequeue count %d, Alloc = %.2f MB, TotalAlloc = %.2f MB, Sys = %.2f MB\n", i, allocMB, totalAllocMB, sysMB)
time.Sleep(time.Second * 10) time.Sleep(time.Second * 5)
break break
} else { } else {
var item QueueItem var item QueueItem

View File

@ -32,7 +32,7 @@ func TestStartNodeA(t *testing.T) {
// this goroutine makes a linearizable read every 10 second. it returns the // this goroutine makes a linearizable read every 10 second. it returns the
// Count value maintained in IStateMachine. see datastore.go for details. // Count value maintained in IStateMachine. see datastore.go for details.
cs := nh.GetNoOPSession(128) cs := nh.GetNoOPSession(128)
ticker := time.NewTicker(10 * time.Millisecond) ticker := time.NewTicker(1 * time.Millisecond)
for { for {
select { select {
case <-ticker.C: case <-ticker.C:
@ -87,7 +87,7 @@ func TestStartNodeB(t *testing.T) {
// Count value maintained in IStateMachine. see datastore.go for details. // Count value maintained in IStateMachine. see datastore.go for details.
cs := nh.GetNoOPSession(128) cs := nh.GetNoOPSession(128)
ticker := time.NewTicker(10 * time.Millisecond) ticker := time.NewTicker(1 * time.Millisecond)
for { for {
select { select {
case <-ticker.C: case <-ticker.C: