|
|
@ -17,20 +17,21 @@ |
|
|
|
package tests |
|
|
|
package tests |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
|
|
|
|
"os" |
|
|
|
"path/filepath" |
|
|
|
"path/filepath" |
|
|
|
"testing" |
|
|
|
"testing" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func BenchmarkVmAckermann32Tests(b *testing.B) { |
|
|
|
func BenchmarkVmAckermann32Tests(b *testing.B) { |
|
|
|
fn := filepath.Join(vmTestDir, "vmPerformanceTest.json") |
|
|
|
fn := filepath.Join(vmTestDir, "vmPerformanceTest.json") |
|
|
|
if err := BenchVmTest(fn, bconf{"ackermann32", true, false}, b); err != nil { |
|
|
|
if err := BenchVmTest(fn, bconf{"ackermann32", true, os.Getenv("JITVM") == "true"}, b); err != nil { |
|
|
|
b.Error(err) |
|
|
|
b.Error(err) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func BenchmarkVmFibonacci16Tests(b *testing.B) { |
|
|
|
func BenchmarkVmFibonacci16Tests(b *testing.B) { |
|
|
|
fn := filepath.Join(vmTestDir, "vmPerformanceTest.json") |
|
|
|
fn := filepath.Join(vmTestDir, "vmPerformanceTest.json") |
|
|
|
if err := BenchVmTest(fn, bconf{"fibonacci16", true, false}, b); err != nil { |
|
|
|
if err := BenchVmTest(fn, bconf{"fibonacci16", true, os.Getenv("JITVM") == "true"}, b); err != nil { |
|
|
|
b.Error(err) |
|
|
|
b.Error(err) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|