Example #1
0
func Benchmark_bigtable2(b *testing.B) {
	b.StopTimer()
	bytes, err := ioutil.ReadFile(filepath.Join(TestsDir, "bigtable2.dmsl"))
	if err != nil {
		b.Fatal(err)
	}
	b.StartTimer()
	for i := 0; i < b.N; i++ {
		tpl, _ := dmsl.Parse(bytes)
		tpl.Execute(nil)
	}
}
Example #2
0
func Benchmark_bigtable_go_stdlib(b *testing.B) {
	b.StopTimer()
	bytes, err := ioutil.ReadFile(filepath.Join(TestsDir, "bigtable.dmsl"))
	if err != nil {
		b.Fatal(err)
	}
	table := [1000][10]int{}
	tmpl, _ := dmsl.Parse(bytes)
	b.StartTimer()
	for i := 0; i < b.N; i++ {
		tmpl.Execute(table)
	}
}