mirror of
				https://github.com/go-delve/delve.git
				synced 2025-10-31 10:47:27 +08:00 
			
		
		
		
	 5bd46f34be
			
		
	
	5bd46f34be
	
	
	
		
			
			* pkg/proc: use golang.org/x/arch/x86/x86asm instead of rsc.io/x86/x86asm * pkg/dwarf: migrate to github.com/pkg/profile from github.com/davecheney/profile * scripts: keep script go files from being considered for the build scripts/gen-*.go files are scripts for generating documentation files and don't follow the typical Go package layout. Expected usage is like go run scripts/gen-cli-docs.go * vendor: update vendored packages There were many changes in delve, and go tool chains since last vendored package update. I just rerun godpes from scratch. $ rm vendor/* $ rm Godeps/Godeps.json $ go list ./... | grep -v /vendor/ | grep -v /scripts/ | go get -u -t $ go get -u github.com/mattn/go-colorable $ go get -u github.com/mattn/go-isatty $ go list ./... | grep -v /vendor/ | grep -v /scripts/ | godeps save
		
			
				
	
	
		
			31 lines
		
	
	
		
			485 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			485 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)
 | |
| 	}
 | |
| }
 |