
The repository is being switched from the personal account github.com/derekparker/delve to the organization account github.com/go-delve/delve. This patch updates imports and docs, while preserving things which should not be changed such as my name in the CHANGELOG and in TODO comments.
31 lines
485 B
Go
31 lines
485 B
Go
package frame_test
|
|
|
|
import (
|
|
"encoding/binary"
|
|
"io/ioutil"
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/go-delve/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)
|
|
}
|
|
}
|