-
Notifications
You must be signed in to change notification settings - Fork 725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simulator: add statistics for simulator #1218
Conversation
@@ -179,6 +180,16 @@ func (t *transferLeader) Step(r *RaftEngine) { | |||
t.finished = true | |||
r.SetRegion(region) | |||
r.recordRegionChange(region) | |||
fromPeerID := t.fromPeer.GetId() | |||
toPeerID := t.peer.GetId() | |||
_, ok := r.schedulerStats.taskStats.transferLeader[fromPeerID] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we let the Stats just Observe
the task and the statistical behavior is handled in observe
?
cmd/simulator/main.go
Outdated
@@ -174,6 +174,7 @@ EXIT: | |||
} | |||
|
|||
fmt.Printf("%s [%s] total iteration: %d, time cost: %v\n", simResult, confName, driver.TickCount(), time.Since(start)) | |||
driver.Print() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about PrintStatistics
?
Could you post some output example? |
@disksing Here is an example of the
|
What have you changed? (required)
This PR add some statistics for simulator, such as task statistics and snapshot statistics.
What are the type of the changes (required)?
How has this PR been tested (required)?