Skip to content

Commit

Permalink
fix oom time metric (#3947)
Browse files Browse the repository at this point in the history
  • Loading branch information
lime-green authored Oct 24, 2023
1 parent 2ce3576 commit 61c2926
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sim/core/apl.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (apl *APLRotation) DoNextAction(sim *Simulation) {
apl.unit.DoNothing()
}

apl.unit.DoneAPLLoop(sim, gcdReady)
apl.unit.DoneAPLLoop(sim, !gcdReady)
}

func (apl *APLRotation) getNextAction(sim *Simulation) *APLAction {
Expand Down
4 changes: 3 additions & 1 deletion sim/core/gcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ func (unit *Unit) WaitUntil(sim *Simulation, readyTime time.Duration) {
if readyTime < sim.CurrentTime {
panic(unit.Label + ": cannot wait negative time")
}
unit.waitStartTime = sim.CurrentTime
if !unit.IsWaiting() {
unit.waitStartTime = sim.CurrentTime
}
unit.SetGCDTimer(sim, readyTime)
if sim.Log != nil && readyTime > sim.CurrentTime {
unit.Log(sim, "Pausing GCD for %s due to rotation / CDs.", readyTime-sim.CurrentTime)
Expand Down

0 comments on commit 61c2926

Please sign in to comment.