Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SortTags (0.2 sec)

  1. src/cmd/vendor/golang.org/x/text/internal/internal.go

    // packages in the text repository.
    package internal // import "golang.org/x/text/internal"
    
    import (
    	"sort"
    
    	"golang.org/x/text/language"
    )
    
    // SortTags sorts tags in place.
    func SortTags(tags []language.Tag) {
    	sort.Sort(sorter(tags))
    }
    
    type sorter []language.Tag
    
    func (s sorter) Len() int {
    	return len(s)
    }
    
    func (s sorter) Swap(i, j int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 1K bytes
    - Viewed (0)
  2. src/cmd/vendor/github.com/google/pprof/internal/graph/graph.go

    	if t.CumDiv == 0 {
    		return t.Cum
    	}
    	return t.Cum / t.CumDiv
    }
    
    // TagMap is a collection of tags, classified by their name.
    type TagMap map[string]*Tag
    
    // SortTags sorts a slice of tags based on their weight.
    func SortTags(t []*Tag, flat bool) []*Tag {
    	ts := tags{t, flat}
    	sort.Sort(ts)
    	return ts.t
    }
    
    // New summarizes performance data from a profile into a graph.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 31K bytes
    - Viewed (0)
  3. src/cmd/vendor/github.com/google/pprof/internal/report/report.go

    	for key := range tagMap {
    		tagKeys = append(tagKeys, &graph.Tag{Name: key})
    	}
    	tabw := tabwriter.NewWriter(w, 0, 0, 1, ' ', tabwriter.AlignRight)
    	for _, tagKey := range graph.SortTags(tagKeys, true) {
    		var total int64
    		key := tagKey.Name
    		tags := make([]*graph.Tag, 0, len(tagMap[key]))
    		for t, c := range tagMap[key] {
    			total += c
    			tags = append(tags, &graph.Tag{Name: t, Flat: c})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 37.5K bytes
    - Viewed (0)
Back to top