2014-06-29 16:52:21 +00:00
|
|
|
package frame_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2014-07-14 18:30:04 +00:00
|
|
|
"github.com/davecheney/profile"
|
2014-08-04 23:02:08 +00:00
|
|
|
"github.com/derekparker/dbg/dwarf/_helper"
|
2014-06-29 16:52:21 +00:00
|
|
|
"github.com/derekparker/dbg/dwarf/frame"
|
|
|
|
)
|
|
|
|
|
2014-07-14 18:30:04 +00:00
|
|
|
func BenchmarkParse(b *testing.B) {
|
|
|
|
defer profile.Start(profile.CPUProfile).Stop()
|
2014-08-04 23:02:08 +00:00
|
|
|
data := dwarfhelper.GrabDebugFrameSection("../../_fixtures/testprog", nil)
|
2014-07-14 18:30:04 +00:00
|
|
|
|
|
|
|
b.ResetTimer()
|
|
|
|
for i := 0; i < b.N; i++ {
|
|
|
|
frame.Parse(data)
|
|
|
|
}
|
|
|
|
}
|