More embarrasing errors fixed
This commit is contained in:
parent
b8225def46
commit
daf8ea247b
4 changed files with 12 additions and 6 deletions
|
@ -61,8 +61,11 @@ class ProfileBranching extends FlatSpec with Matchers {
|
|||
|
||||
class ProfileCache extends FlatSpec with Matchers {
|
||||
it should "profile a cache" in {
|
||||
say("Warning, this test takes forever to run! 2 minutes on my machine at least.")
|
||||
say("This happens due to the less than optimal way of storing the update log. Sorry I guess")
|
||||
say("You probably want to debug this with a smaller program")
|
||||
TestRunner.profileCache(
|
||||
Manifest.singleTestOptions.copy(testName = "convolution.s", maxSteps = 50000)
|
||||
Manifest.singleTestOptions.copy(testName = "convolution.s", maxSteps = 150000)
|
||||
) should be(true)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ object PrintUtils {
|
|||
def binary: String = String.format("%" + 32 + "s", i.toBinaryString)
|
||||
.replace(' ', '0').grouped(4)
|
||||
.map(x => x + " ").mkString
|
||||
def binary(n: Int): String = String.format("%" + n + "s", i.toBinaryString).replace(' ', '0')
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -150,9 +150,9 @@ object TestRunner {
|
|||
// called an if guard.
|
||||
case Taken(from, to) :: t if( predictionTable(from)) => helper(t, predictionTable)
|
||||
case Taken(from, to) :: t if(!predictionTable(from)) => 1 + helper(t, predictionTable.updated(from, true))
|
||||
case NotTaken(addr) :: t if(!predictionTable(addr)) => 1 + helper(t, predictionTable.updated(addr, false))
|
||||
case NotTaken(addr) :: t if( predictionTable(addr)) => helper(t, predictionTable)
|
||||
case _ => 0
|
||||
case NotTaken(addr) :: t if( predictionTable(addr)) => 1 + helper(t, predictionTable.updated(addr, false))
|
||||
case NotTaken(addr) :: t if(!predictionTable(addr)) => helper(t, predictionTable)
|
||||
case Nil => 0
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,9 +164,11 @@ object TestRunner {
|
|||
|
||||
helper(events, initState)
|
||||
}
|
||||
|
||||
say(OneBitInfiniteSlots(events))
|
||||
}
|
||||
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue