mirror of
https://github.com/go-delve/delve.git
synced 2025-11-03 05:47:34 +08:00
Cleanup dwarf/frame tests
This commit is contained in:
@ -1,16 +1,26 @@
|
||||
package frame_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/davecheney/profile"
|
||||
"github.com/derekparker/dbg/dwarf/_helper"
|
||||
"github.com/derekparker/dbg/dwarf/frame"
|
||||
)
|
||||
|
||||
func BenchmarkParse(b *testing.B) {
|
||||
defer profile.Start(profile.CPUProfile).Stop()
|
||||
data := dwarfhelper.GrabDebugFrameSection("../../_fixtures/testprog", nil)
|
||||
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++ {
|
||||
|
||||
Reference in New Issue
Block a user