delve/pkg/dwarf/frame/parser_test.go
aarzilli 74c98bc961 proc: support position independent executables (PIE)
Support for position independent executables (PIE) on the native linux
backend, the gdbserver backend on linux and the core backend.
Also implemented in the windows native backend, but it can't be tested
because go doesn't support PIE on windows yet.
2018-10-11 11:21:27 -07:00

31 lines
488 B
Go

package frame_test
import (
"encoding/binary"
"io/ioutil"
"os"
"testing"
"github.com/derekparker/delve/pkg/dwarf/frame"
"github.com/pkg/profile"
)
func BenchmarkParse(b *testing.B) {
defer profile.Start(profile.CPUProfile).Stop()
f, err := os.Open("testdata/frame")
if err != nil {
b.Fatal(err)
}
defer f.Close()
data, err := ioutil.ReadAll(f)
if err != nil {
b.Fatal(err)
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
frame.Parse(data, binary.BigEndian, 0)
}
}