844 changed files with 15763 additions and 202671 deletions
Binary file not shown.
Binary file not shown.
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
module lexis |
||||
|
||||
go 1.16 |
||||
|
||||
require ( |
||||
github.com/PuerkitoBio/goquery v1.6.1 |
||||
github.com/gorilla/mux v1.8.0 |
||||
) |
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
github.com/PuerkitoBio/goquery v1.6.1 h1:FgjbQZKl5HTmcn4sKBgvx8vv63nhyhIpv7lJpFGCWpk= |
||||
github.com/PuerkitoBio/goquery v1.6.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= |
||||
github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo= |
||||
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= |
||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= |
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= |
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= |
||||
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= |
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |
Binary file not shown.
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
testdata/* linguist-vendored |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
# editor temporary files |
||||
*.sublime-* |
||||
.DS_Store |
||||
*.swp |
||||
#*.*# |
||||
tags |
||||
|
||||
# direnv config |
||||
.env* |
||||
|
||||
# test binaries |
||||
*.test |
||||
|
||||
# coverage and profilte outputs |
||||
*.out |
||||
|
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
arch: |
||||
- amd64 |
||||
- ppc64le |
||||
language: go |
||||
|
||||
go: |
||||
- 1.2.x |
||||
- 1.3.x |
||||
- 1.4.x |
||||
- 1.5.x |
||||
- 1.6.x |
||||
- 1.7.x |
||||
- 1.8.x |
||||
- 1.9.x |
||||
- 1.10.x |
||||
- 1.11.x |
||||
- 1.12.x |
||||
- 1.13.x |
||||
- tip |
||||
|
||||
jobs: |
||||
exclude: |
||||
- arch: ppc64le |
||||
go: 1.2.x |
||||
- arch: ppc64le |
||||
go: 1.3.x |
||||
- arch: ppc64le |
||||
go: 1.4.x |
||||
- arch: ppc64le |
||||
go: 1.5.x |
||||
- arch: ppc64le |
||||
go: 1.6.x |
||||
- arch: ppc64le |
||||
go: 1.7.x |
||||
- arch: ppc64le |
||||
go: 1.8.x |
||||
- arch: ppc64le |
||||
go: 1.9.x |
||||
- arch: ppc64le |
||||
go: 1.10.x |
||||
- arch: ppc64le |
||||
go: 1.11.x |
||||
- arch: ppc64le |
||||
go: 1.12.x |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
module github.com/PuerkitoBio/goquery |
||||
|
||||
require ( |
||||
github.com/andybalholm/cascadia v1.1.0 |
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 |
||||
) |
||||
|
||||
go 1.13 |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo= |
||||
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= |
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= |
||||
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= |
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |
@ -0,0 +1,833 @@
@@ -0,0 +1,833 @@
|
||||
package cascadia |
||||
|
||||
import ( |
||||
"bytes" |
||||
"fmt" |
||||
"regexp" |
||||
"strings" |
||||
|
||||
"golang.org/x/net/html" |
||||
) |
||||
|
||||
// Matcher is the interface for basic selector functionality.
|
||||
// Match returns whether a selector matches n.
|
||||
type Matcher interface { |
||||
Match(n *html.Node) bool |
||||
} |
||||
|
||||
// Sel is the interface for all the functionality provided by selectors.
|
||||
// It is currently the same as Matcher, but other methods may be added in the
|
||||
// future.
|
||||
type Sel interface { |
||||
Matcher |
||||
Specificity() Specificity |
||||
} |
||||
|
||||
// Parse parses a selector.
|
||||
func Parse(sel string) (Sel, error) { |
||||
p := &parser{s: sel} |
||||
compiled, err := p.parseSelector() |
||||
if err != nil { |
||||
return nil, err |
||||
} |
||||
|
||||
if p.i < len(sel) { |
||||
return nil, fmt.Errorf("parsing %q: %d bytes left over", sel, len(sel)-p.i) |
||||
} |
||||
|
||||
return compiled, nil |
||||
} |
||||
|
||||
// ParseGroup parses a selector, or a group of selectors separated by commas.
|
||||
func ParseGroup(sel string) (SelectorGroup, error) { |
||||
p := &parser{s: sel} |
||||
compiled, err := p.parseSelectorGroup() |
||||
if err != nil { |
||||
return nil, err |
||||
} |
||||
|
||||
if p.i < len(sel) { |
||||
return nil, fmt.Errorf("parsing %q: %d bytes left over", sel, len(sel)-p.i) |
||||
} |
||||
|
||||
return compiled, nil |
||||
} |
||||
|
||||
// A Selector is a function which tells whether a node matches or not.
|
||||
//
|
||||
// This type is maintained for compatibility; I recommend using the newer and
|
||||
// more idiomatic interfaces Sel and Matcher.
|
||||
type Selector func(*html.Node) bool |
||||
|
||||
// Compile parses a selector and returns, if successful, a Selector object
|
||||
// that can be used to match against html.Node objects.
|
||||
func Compile(sel string) (Selector, error) { |
||||
compiled, err := ParseGroup(sel) |
||||
if err != nil { |
||||
return nil, err |
||||
} |
||||
|
||||
return Selector(compiled.Match), nil |
||||
} |
||||
|
||||
// MustCompile is like Compile, but panics instead of returning an error.
|
||||
func MustCompile(sel string) Selector { |
||||
compiled, err := Compile(sel) |
||||
if err != nil { |
||||
panic(err) |
||||
} |
||||
return compiled |
||||
} |
||||
|
||||
// MatchAll returns a slice of the nodes that match the selector,
|
||||
// from n and its children.
|
||||
func (s Selector) MatchAll(n *html.Node) []*html.Node { |
||||
return s.matchAllInto(n, nil) |
||||
} |
||||
|
||||
func (s Selector) matchAllInto(n *html.Node, storage []*html.Node) []*html.Node { |
||||
if s(n) { |
||||
storage = append(storage, n) |
||||
} |
||||
|
||||
for child := n.FirstChild; child != nil; child = child.NextSibling { |
||||
storage = s.matchAllInto(child, storage) |
||||
} |
||||
|
||||
return storage |
||||
} |
||||
|
||||
func queryInto(n *html.Node, m Matcher, storage []*html.Node) []*html.Node { |
||||
for child := n.FirstChild; child != nil; child = child.NextSibling { |
||||
if m.Match(child) { |
||||
storage = append(storage, child) |
||||
} |
||||
storage = queryInto(child, m, storage) |
||||
} |
||||
|
||||
return storage |
||||
} |
||||
|
||||
// QueryAll returns a slice of all the nodes that match m, from the descendants
|
||||
// of n.
|
||||
func QueryAll(n *html.Node, m Matcher) []*html.Node { |
||||
return queryInto(n, m, nil) |
||||
} |
||||
|
||||
// Match returns true if the node matches the selector.
|
||||
func (s Selector) Match(n *html.Node) bool { |
||||
return s(n) |
||||
} |
||||
|
||||
// MatchFirst returns the first node that matches s, from n and its children.
|
||||
func (s Selector) MatchFirst(n *html.Node) *html.Node { |
||||
if s.Match(n) { |
||||
return n |
||||
} |
||||
|
||||
for c := n.FirstChild; c != nil; c = c.NextSibling { |
||||
m := s.MatchFirst(c) |
||||
if m != nil { |
||||
return m |
||||
} |
||||
} |
||||
return nil |
||||
} |
||||
|
||||
// Query returns the first node that matches m, from the descendants of n.
|
||||
// If none matches, it returns nil.
|
||||
func Query(n *html.Node, m Matcher) *html.Node { |
||||
for c := n.FirstChild; c != nil; c = c.NextSibling { |
||||
if m.Match(c) { |
||||
return c |
||||
} |
||||
if matched := Query(c, m); matched != nil { |
||||
return matched |
||||
} |
||||
} |
||||
|
||||
return nil |
||||
} |
||||
|
||||
// Filter returns the nodes in nodes that match the selector.
|
||||
func (s Selector) Filter(nodes []*html.Node) (result []*html.Node) { |
||||
for _, n := range nodes { |
||||
if s(n) { |
||||
result = append(result, n) |
||||
} |
||||
} |
||||
return result |
||||
} |
||||
|
||||
// Filter returns the nodes that match m.
|
||||
func Filter(nodes []*html.Node, m Matcher) (result []*html.Node) { |
||||
for _, n := range nodes { |
||||
if m.Match(n) { |
||||
result = append(result, n) |
||||
} |
||||
} |
||||
return result |
||||
} |
||||
|
||||
type tagSelector struct { |
||||
tag string |
||||
} |
||||
|
||||
// Matches elements with a given tag name.
|
||||
func (t tagSelector) Match(n *html.Node) bool { |
||||
return n.Type == html.ElementNode && n.Data == t.tag |
||||
} |
||||
|
||||
func (c tagSelector) Specificity() Specificity { |
||||
return Specificity{0, 0, 1} |
||||
} |
||||
|
||||
type classSelector struct { |
||||
class string |
||||
} |
||||
|
||||
// Matches elements by class attribute.
|
||||
func (t classSelector) Match(n *html.Node) bool { |
||||
return matchAttribute(n, "class", func(s string) bool { |
||||
return matchInclude(t.class, s) |
||||
}) |
||||
} |
||||
|
||||
func (c classSelector) Specificity() Specificity { |
||||
return Specificity{0, 1, 0} |
||||
} |
||||
|
||||
type idSelector struct { |
||||
id string |
||||
} |
||||
|
||||
// Matches elements by id attribute.
|
||||
func (t idSelector) Match(n *html.Node) bool { |
||||
return matchAttribute(n, "id", func(s string) bool { |
||||
return s == t.id |
||||
}) |
||||
} |
||||
|
||||
func (c idSelector) Specificity() Specificity { |
||||
return Specificity{1, 0, 0} |
||||
} |
||||
|
||||
type attrSelector struct { |
||||
key, val, operation string |
||||
regexp *regexp.Regexp |
||||
} |
||||
|
||||
// Matches elements by attribute value.
|
||||
func (t attrSelector) Match(n *html.Node) bool { |
||||
switch t.operation { |
||||
case "": |
||||
return matchAttribute(n, t.key, func(string) bool { return true }) |
||||
case "=": |
||||
return matchAttribute(n, t.key, func(s string) bool { return s == t.val }) |
||||
case "!=": |
||||
return attributeNotEqualMatch(t.key, t.val, n) |
||||
case "~=": |
||||
// matches elements where the attribute named key is a whitespace-separated list that includes val.
|
||||
return matchAttribute(n, t.key, func(s string) bool { return matchInclude(t.val, s) }) |
||||
case "|=": |
||||
return attributeDashMatch(t.key, t.val, n) |
||||
case "^=": |
||||
return attributePrefixMatch(t.key, t.val, n) |
||||
case "$=": |
||||
return attributeSuffixMatch(t.key, t.val, n) |
||||
case "*=": |
||||
return attributeSubstringMatch(t.key, t.val, n) |
||||
case "#=": |
||||
return attributeRegexMatch(t.key, t.regexp, n) |
||||
default: |
||||
panic(fmt.Sprintf("unsuported operation : %s", t.operation)) |
||||
} |
||||
} |
||||
|
||||
// matches elements where the attribute named key satisifes the function f.
|
||||
func matchAttribute(n *html.Node, key string, f func(string) bool) bool { |
||||
if n.Type != html.ElementNode { |
||||
return false |
||||
} |
||||
for _, a := range n.Attr { |
||||
if a.Key == key && f(a.Val) { |
||||
return true |
||||
} |
||||
} |
||||
return false |
||||
} |
||||
|
||||
// attributeNotEqualMatch matches elements where
|
||||
// the attribute named key does not have the value val.
|
||||
func attributeNotEqualMatch(key, val string, n *html.Node) bool { |
||||
if n.Type != html.ElementNode { |
||||
return false |
||||
} |
||||
for _, a := range n.Attr { |
||||
if a.Key == key && a.Val == val { |
||||
return false |
||||
} |
||||
} |
||||
return true |
||||
} |
||||
|
||||
// returns true if s is a whitespace-separated list that includes val.
|
||||
func matchInclude(val, s string) bool { |
||||
for s != "" { |
||||
i := strings.IndexAny(s, " \t\r\n\f") |
||||
if i == -1 { |
||||
return s == val |
||||
} |
||||
if s[:i] == val { |
||||
return true |
||||
} |
||||
s = s[i+1:] |
||||
} |
||||
return false |
||||
} |
||||
|
||||
// matches elements where the attribute named key equals val or starts with val plus a hyphen.
|
||||
func attributeDashMatch(key, val string, n *html.Node) bool { |
||||
return matchAttribute(n, key, |
||||
func(s string) bool { |
||||
if s == val { |
||||
return true |
||||
} |
||||
if len(s) <= len(val) { |
||||
return false |
||||
} |
||||
if s[:len(val)] == val && s[len(val)] == '-' { |
||||
return true |
||||
} |
||||
return false |
||||
}) |
||||
} |
||||
|
||||
// attributePrefixMatch returns a Selector that matches elements where
|
||||
// the attribute named key starts with val.
|
||||
func attributePrefixMatch(key, val string, n *html.Node) bool { |
||||
return matchAttribute(n, key, |
||||
func(s string) bool { |
||||
if strings.TrimSpace(s) == "" { |
||||
return false |
||||
} |
||||
return strings.HasPrefix(s, val) |
||||
}) |
||||
} |
||||
|
||||
// attributeSuffixMatch matches elements where
|
||||
// the attribute named key ends with val.
|
||||
func attributeSuffixMatch(key, val string, n *html.Node) bool { |
||||
return matchAttribute(n, key, |
||||
func(s string) bool { |
||||
if strings.TrimSpace(s) == "" { |
||||
return false |
||||
} |
||||
return strings.HasSuffix(s, val) |
||||
}) |
||||
} |
||||
|
||||
// attributeSubstringMatch matches nodes where
|
||||
// the attribute named key contains val.
|
||||
func attributeSubstringMatch(key, val string, n *html.Node) bool { |
||||
return matchAttribute(n, key, |
||||
func(s string) bool { |
||||
if strings.TrimSpace(s) == "" { |
||||
return false |
||||
} |
||||
return strings.Contains(s, val) |
||||
}) |
||||
} |
||||
|
||||
// attributeRegexMatch matches nodes where
|
||||
// the attribute named key matches the regular expression rx
|
||||
func attributeRegexMatch(key string, rx *regexp.Regexp, n *html.Node) bool { |
||||
return matchAttribute(n, key, |
||||
func(s string) bool { |
||||
return rx.MatchString(s) |
||||
}) |
||||
} |
||||
|
||||
func (c attrSelector) Specificity() Specificity { |
||||
return Specificity{0, 1, 0} |
||||
} |
||||
|
||||
// ---------------- Pseudo class selectors ----------------
|
||||
// we use severals concrete types of pseudo-class selectors
|
||||
|
||||
type relativePseudoClassSelector struct { |
||||
name string // one of "not", "has", "haschild"
|
||||
match SelectorGroup |
||||
} |
||||
|
||||
func (s relativePseudoClassSelector) Match(n *html.Node) bool { |
||||
if n.Type != html.ElementNode { |
||||
return false |
||||
} |
||||
switch s.name { |
||||
case "not": |
||||
// matches elements that do not match a.
|
||||
return !s.match.Match(n) |
||||
case "has": |
||||
// matches elements with any descendant that matches a.
|
||||
return hasDescendantMatch(n, s.match) |
||||
case "haschild": |
||||
// matches elements with a child that matches a.
|
||||
return hasChildMatch(n, s.match) |
||||
default: |
||||
panic(fmt.Sprintf("unsupported relative pseudo class selector : %s", s.name)) |
||||
} |
||||
} |
||||
|
||||
// hasChildMatch returns whether n has any child that matches a.
|
||||
func hasChildMatch(n *html.Node, a Matcher) bool { |
||||
for c := n.FirstChild; c != nil; c = c.NextSibling { |
||||
if a.Match(c) { |
||||
return true |
||||
} |
||||
} |
||||
return false |
||||
} |
||||
|
||||
// hasDescendantMatch performs a depth-first search of n's descendants,
|
||||
// testing whether any of them match a. It returns true as soon as a match is
|
||||
// found, or false if no match is found.
|
||||
func hasDescendantMatch(n *html.Node, a Matcher) bool { |
||||
for c := n.FirstChild; c != nil; c = c.NextSibling { |
||||
if a.Match(c) || (c.Type == html.ElementNode && hasDescendantMatch(c, a)) { |
||||
return true |
||||
} |
||||
} |
||||
return false |
||||
} |
||||
|
||||
// Specificity returns the specificity of the most specific selectors
|
||||
// in the pseudo-class arguments.
|
||||
// See https://www.w3.org/TR/selectors/#specificity-rules
|
||||
func (s relativePseudoClassSelector) Specificity() Specificity { |
||||
var max Specificity |
||||
for _, sel := range s.match { |
||||
newSpe := sel.Specificity() |
||||
if max.Less(newSpe) { |
||||
max = newSpe |
||||
} |
||||
} |
||||
return max |
||||
} |
||||
|
||||
type containsPseudoClassSelector struct { |
||||
own bool |
||||
value string |
||||
} |
||||
|
||||
func (s containsPseudoClassSelector) Match(n *html.Node) bool { |
||||
var text string |
||||
if s.own { |
||||
// matches nodes that directly contain the given text
|
||||
text = strings.ToLower(nodeOwnText(n)) |
||||
} else { |
||||
// matches nodes that contain the given text.
|
||||
text = strings.ToLower(nodeText(n)) |
||||
} |
||||
return strings.Contains(text, s.value) |
||||
} |
||||
|
||||
func (s containsPseudoClassSelector) Specificity() Specificity { |
||||
return Specificity{0, 1, 0} |
||||
} |
||||
|
||||
type regexpPseudoClassSelector struct { |
||||
own bool |
||||
regexp *regexp.Regexp |
||||
} |
||||
|
||||
func (s regexpPseudoClassSelector) Match(n *html.Node) bool { |
||||
var text string |
||||
if s.own { |
||||
// matches nodes whose text directly matches the specified regular expression
|
||||
text = nodeOwnText(n) |
||||
} else { |
||||
// matches nodes whose text matches the specified regular expression
|
||||
text = nodeText(n) |
||||
} |
||||
return s.regexp.MatchString(text) |
||||
} |
||||
|
||||
// writeNodeText writes the text contained in n and its descendants to b.
|
||||
func writeNodeText(n *html.Node, b *bytes.Buffer) { |
||||
switch n.Type { |
||||
case html.TextNode: |
||||
b.WriteString(n.Data) |
||||
case html.ElementNode: |
||||
for c := n.FirstChild; c != nil; c = c.NextSibling { |
||||
writeNodeText(c, b) |
||||
} |
||||
} |
||||
} |
||||
|
||||
// nodeText returns the text contained in n and its descendants.
|
||||
func nodeText(n *html.Node) string { |
||||
var b bytes.Buffer |
||||
writeNodeText(n, &b) |
||||
return b.String() |
||||
} |
||||
|
||||
// nodeOwnText returns the contents of the text nodes that are direct
|
||||
// children of n.
|
||||
func nodeOwnText(n *html.Node) string { |
||||
var b bytes.Buffer |
||||
for c := n.FirstChild; c != nil; c = c.NextSibling { |
||||
if c.Type == html.TextNode { |
||||
b.WriteString(c.Data) |
||||
} |
||||
} |
||||
return b.String() |
||||
} |
||||
|
||||
func (s regexpPseudoClassSelector) Specificity() Specificity { |
||||
return Specificity{0, 1, 0} |
||||
} |
||||
|
||||
type nthPseudoClassSelector struct { |
||||
a, b int |
||||
last, ofType bool |
||||
} |
||||
|
||||
func (s nthPseudoClassSelector) Match(n *html.Node) bool { |
||||
if s.a == 0 { |
||||
if s.last { |
||||
return simpleNthLastChildMatch(s.b, s.ofType, n) |
||||
} else { |
||||
return simpleNthChildMatch(s.b, s.ofType, n) |
||||
} |
||||
} |
||||
return nthChildMatch(s.a, s.b, s.last, s.ofType, n) |
||||
} |
||||
|
||||
// nthChildMatch implements :nth-child(an+b).
|
||||
// If last is true, implements :nth-last-child instead.
|
||||
// If ofType is true, implements :nth-of-type instead.
|
||||
func nthChildMatch(a, b int, last, ofType bool, n *html.Node) bool { |
||||
if n.Type != html.ElementNode { |
||||
return false |
||||
} |
||||
|
||||
parent := n.Parent |
||||
if parent == nil { |
||||
return false |
||||
} |
||||
|
||||
if parent.Type == html.DocumentNode { |
||||
return false |
||||
} |
||||
|
||||
i := -1 |
||||
count := 0 |
||||
for c := parent.FirstChild; c != nil; c = c.NextSibling { |
||||
if (c.Type != html.ElementNode) || (ofType && c.Data != n.Data) { |
||||
continue |
||||
} |
||||
count++ |
||||
if c == n { |
||||
i = count |
||||
if !last { |
||||
break |
||||
} |
||||
} |
||||
} |
||||
|
||||
if i == -1 { |
||||
// This shouldn't happen, since n should always be one of its parent's children.
|
||||
return false |
||||
} |
||||
|
||||
if last { |
||||
i = count - i + 1 |
||||
} |
||||
|
||||
i -= b |
||||
if a == 0 { |
||||
return i == 0 |
||||
} |
||||
|
||||
return i%a == 0 && i/a >= 0 |
||||
} |
||||
|
||||
// simpleNthChildMatch implements :nth-child(b).
|
||||
// If ofType is true, implements :nth-of-type instead.
|
||||
func simpleNthChildMatch(b int, ofType bool, n *html.Node) bool { |
||||
if n.Type != html.ElementNode { |
||||
return false |
||||
} |
||||
|
||||
parent := n.Parent |
||||
if parent == nil { |
||||
return false |
||||
} |
||||
|
||||
if parent.Type == html.DocumentNode { |
||||
return false |
||||
} |
||||
|
||||
count := 0 |
||||
for c := parent.FirstChild; c != nil; c = c.NextSibling { |
||||
if c.Type != html.ElementNode || (ofType && c.Data != n.Data) { |
||||
continue |
||||
} |
||||
count++ |
||||
if c == n { |
||||
return count == b |
||||
} |
||||
if count >= b { |
||||
return false |
||||
} |
||||
} |
||||
return false |
||||
} |
||||
|
||||
// simpleNthLastChildMatch implements :nth-last-child(b).
|
||||
// If ofType is true, implements :nth-last-of-type instead.
|
||||
func simpleNthLastChildMatch(b int, ofType bool, n *html.Node) bool { |
||||
if n.Type != html.ElementNode { |
||||
return false |
||||
} |
||||
|
||||
parent := n.Parent |
||||
if parent == nil { |
||||
return false |
||||
} |
||||
|
||||
if parent.Type == html.DocumentNode { |
||||
return false |
||||
} |
||||
|
||||
count := 0 |
||||
for c := parent.LastChild; c != nil; c = c.PrevSibling { |
||||
if c.Type != html.ElementNode || (ofType && c.Data != n.Data) { |
||||
continue |
||||
} |
||||
count++ |
||||
if c == n { |
||||
return count == b |
||||
} |
||||
if count >= b { |
||||
return false |
||||
} |
||||
} |
||||
return false |
||||
} |
||||
|
||||
// Specificity for nth-child pseudo-class.
|
||||
// Does not support a list of selectors
|
||||
func (s nthPseudoClassSelector) Specificity() Specificity { |
||||
return Specificity{0, 1, 0} |
||||
} |
||||
|
||||
type onlyChildPseudoClassSelector struct { |
||||
ofType bool |
||||
} |
||||
|
||||
// Match implements :only-child.
|
||||
// If `ofType` is true, it implements :only-of-type instead.
|
||||
func (s onlyChildPseudoClassSelector) Match(n *html.Node) bool { |
||||
if n.Type != html.ElementNode { |
||||
return false |
||||
} |
||||
|
||||
parent := n.Parent |
||||
if parent == nil { |
||||
return false |
||||
} |
||||
|
||||
if parent.Type == html.DocumentNode { |
||||
return false |
||||
} |
||||
|
||||
count := 0 |
||||
for c := parent.FirstChild; c != nil; c = c.NextSibling { |
||||
if (c.Type != html.ElementNode) || (s.ofType && c.Data != n.Data) { |
||||
continue |
||||
} |
||||
count++ |
||||
if count > 1 { |
||||
return false |
||||
} |
||||
} |
||||
|
||||
return count == 1 |
||||
} |
||||
|
||||
func (s onlyChildPseudoClassSelector) Specificity() Specificity { |
||||
return Specificity{0, 1, 0} |
||||
} |
||||
|
||||
type inputPseudoClassSelector struct{} |
||||
|
||||
// Matches input, select, textarea and button elements.
|
||||
func (s inputPseudoClassSelector) Match(n *html.Node) bool { |
||||
return n.Type == html.ElementNode && (n.Data == "input" || n.Data == "select" || n.Data == "textarea" || n.Data == "button") |
||||
} |
||||
|
||||
func (s inputPseudoClassSelector) Specificity() Specificity { |
||||
return Specificity{0, 1, 0} |
||||
} |
||||
|
||||
type emptyElementPseudoClassSelector struct{} |
||||
|
||||
// Matches empty elements.
|
||||
func (s emptyElementPseudoClassSelector) Match(n *html.Node) bool { |
||||
if n.Type != html.ElementNode { |
||||
return false |
||||
} |
||||
|
||||
for c := n.FirstChild; c != nil; c = c.NextSibling { |
||||
switch c.Type { |
||||
case html.ElementNode, html.TextNode: |
||||
return false |
||||
} |
||||
} |
||||
|
||||
return true |
||||
} |
||||
|
||||
func (s emptyElementPseudoClassSelector) Specificity() Specificity { |
||||
return Specificity{0, 1, 0} |
||||
} |
||||
|
||||
type rootPseudoClassSelector struct{} |
||||
|
||||
// Match implements :root
|
||||
func (s rootPseudoClassSelector) Match(n *html.Node) bool { |
||||
if n.Type != html.ElementNode { |
||||
return false |
||||
} |
||||
if n.Parent == nil { |
||||
return false |
||||
} |
||||
return n.Parent.Type == html.DocumentNode |
||||
} |
||||
|
||||
func (s rootPseudoClassSelector) Specificity() Specificity { |
||||
return Specificity{0, 1, 0} |
||||
} |
||||
|
||||
type compoundSelector struct { |
||||
selectors []Sel |
||||
} |
||||
|
||||
// Matches elements if each sub-selectors matches.
|
||||
func (t compoundSelector) Match(n *html.Node) bool { |
||||
if len(t.selectors) == 0 { |
||||
return n.Type == html.ElementNode |
||||
} |
||||
|
||||
for _, sel := range t.selectors { |
||||
if !sel.Match(n) { |
||||
return false |
||||
} |
||||
} |
||||
return true |
||||
} |
||||
|
||||
func (s compoundSelector) Specificity() Specificity { |
||||
var out Specificity |
||||
for _, sel := range s.selectors { |
||||
out = out.Add(sel.Specificity()) |
||||
} |
||||
return out |
||||
} |
||||
|
||||
type combinedSelector struct { |
||||
first Sel |
||||
combinator byte |
||||
second Sel |
||||
} |
||||
|
||||
func (t combinedSelector) Match(n *html.Node) bool { |
||||
if t.first == nil { |
||||
return false // maybe we should panic
|
||||
} |
||||
switch t.combinator { |
||||
case 0: |
||||
return t.first.Match(n) |
||||
case ' ': |
||||
return descendantMatch(t.first, t.second, n) |
||||
case '>': |
||||
return childMatch(t.first, t.second, n) |
||||
case '+': |
||||
return siblingMatch(t.first, t.second, true, n) |
||||
case '~': |
||||
return siblingMatch(t.first, t.second, false, n) |
||||
default: |
||||
panic("unknown combinator") |
||||
} |
||||
} |
||||
|
||||
// matches an element if it matches d and has an ancestor that matches a.
|
||||
func descendantMatch(a, d Matcher, n *html.Node) bool { |
||||
if !d.Match(n) { |
||||
return false |
||||
} |
||||
|
||||
for p := n.Parent; p != nil; p = p.Parent { |
||||
if a.Match(p) { |
||||
return true |
||||
} |
||||
} |
||||
|
||||
return false |
||||
} |
||||
|
||||
// matches an element if it matches d and its parent matches a.
|
||||
func childMatch(a, d Matcher, n *html.Node) bool { |
||||
return d.Match(n) && n.Parent != nil && a.Match(n.Parent) |
||||
} |
||||
|
||||
// matches an element if it matches s2 and is preceded by an element that matches s1.
|
||||
// If adjacent is true, the sibling must be immediately before the element.
|
||||
func siblingMatch(s1, s2 Matcher, adjacent bool, n *html.Node) bool { |
||||
if !s2.Match(n) { |
||||
return false |
||||
} |
||||
|
||||
if adjacent { |
||||
for n = n.PrevSibling; n != nil; n = n.PrevSibling { |
||||
if n.Type == html.TextNode || n.Type == html.CommentNode { |
||||
continue |
||||
} |
||||
return s1.Match(n) |
||||
} |
||||
return false |
||||
} |
||||
|
||||
// Walk backwards looking for element that matches s1
|
||||
for c := n.PrevSibling; c != nil; c = c.PrevSibling { |
||||
if s1.Match(c) { |
||||
return true |
||||
} |
||||
} |
||||
|
||||
return false |
||||
} |
||||
|
||||
func (s combinedSelector) Specificity() Specificity { |
||||
spec := s.first.Specificity() |
||||
if s.second != nil { |
||||
spec = spec.Add(s.second.Specificity()) |
||||
} |
||||
return spec |
||||
} |
||||
|
||||
// A SelectorGroup is a list of selectors, which matches if any of the
|
||||
// individual selectors matches.
|
||||
type SelectorGroup []Sel |
||||
|
||||
// Match returns true if the node matches one of the single selectors.
|
||||
func (s SelectorGroup) Match(n *html.Node) bool { |
||||
for _, sel := range s { |
||||
if sel.Match(n) { |
||||
return true |
||||
} |
||||
} |
||||
return false |
||||
} |
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
package cascadia |
||||
|
||||
// Specificity is the CSS specificity as defined in
|
||||
// https://www.w3.org/TR/selectors/#specificity-rules
|
||||
// with the convention Specificity = [A,B,C].
|
||||
type Specificity [3]int |
||||
|
||||
// returns `true` if s < other (strictly), false otherwise
|
||||
func (s Specificity) Less(other Specificity) bool { |
||||
for i := range s { |
||||
if s[i] < other[i] { |
||||
return true |
||||
} |
||||
if s[i] > other[i] { |
||||
return false |
||||
} |
||||
} |
||||
return false |
||||
} |
||||
|
||||
func (s Specificity) Add(other Specificity) Specificity { |
||||
for i, sp := range other { |
||||
s[i] += sp |
||||
} |
||||
return s |
||||
} |
@ -1 +1,3 @@
@@ -1 +1,3 @@
|
||||
module github.com/gorilla/mux |
||||
|
||||
go 1.12 |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
# github.com/PuerkitoBio/goquery v1.6.1 |
||||
## explicit |
||||
github.com/PuerkitoBio/goquery |
||||
# github.com/andybalholm/cascadia v1.1.0 |
||||
github.com/andybalholm/cascadia |
||||
# github.com/gorilla/mux v1.8.0 |
||||
## explicit |
||||
github.com/gorilla/mux |
||||
# golang.org/x/net v0.0.0-20200202094626-16171245cfb2 |
||||
golang.org/x/net/html |
||||
golang.org/x/net/html/atom |
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
language: go |
||||
|
||||
go: |
||||
- 1.1 |
||||
- 1.2.x |
||||
- 1.3.x |
||||
- 1.4.x |
||||
- 1.5.x |
||||
- 1.6.x |
||||
- 1.7.x |
||||
- 1.8.x |
||||
- 1.9.x |
||||
- "1.10.x" |
||||
- 1.11.x |
||||
- tip |
||||
|
@ -1,234 +0,0 @@
@@ -1,234 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func TestFirst(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content").First() |
||||
assertLength(t, sel.Nodes, 1) |
||||
} |
||||
|
||||
func TestFirstEmpty(t *testing.T) { |
||||
sel := Doc().Find(".pvk-zzcontentzz").First() |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestFirstInvalid(t *testing.T) { |
||||
sel := Doc().Find("").First() |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestFirstRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.First().End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestLast(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content").Last() |
||||
assertLength(t, sel.Nodes, 1) |
||||
|
||||
// Should contain Footer
|
||||
foot := Doc().Find(".footer") |
||||
if !sel.Contains(foot.Nodes[0]) { |
||||
t.Error("Last .pvk-content should contain .footer.") |
||||
} |
||||
} |
||||
|
||||
func TestLastEmpty(t *testing.T) { |
||||
sel := Doc().Find(".pvk-zzcontentzz").Last() |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestLastInvalid(t *testing.T) { |
||||
sel := Doc().Find("").Last() |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestLastRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.Last().End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestEq(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content").Eq(1) |
||||
assertLength(t, sel.Nodes, 1) |
||||
} |
||||
|
||||
func TestEqNegative(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content").Eq(-1) |
||||
assertLength(t, sel.Nodes, 1) |
||||
|
||||
// Should contain Footer
|
||||
foot := Doc().Find(".footer") |
||||
if !sel.Contains(foot.Nodes[0]) { |
||||
t.Error("Index -1 of .pvk-content should contain .footer.") |
||||
} |
||||
} |
||||
|
||||
func TestEqEmpty(t *testing.T) { |
||||
sel := Doc().Find("something_random_that_does_not_exists").Eq(0) |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestEqInvalid(t *testing.T) { |
||||
sel := Doc().Find("").Eq(0) |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestEqInvalidPositive(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content").Eq(3) |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestEqInvalidNegative(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content").Eq(-4) |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestEqRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.Eq(1).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestSlice(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content").Slice(0, 2) |
||||
|
||||
assertLength(t, sel.Nodes, 2) |
||||
assertSelectionIs(t, sel, "#pc1", "#pc2") |
||||
} |
||||
|
||||
func TestSliceToEnd(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content").Slice(1, ToEnd) |
||||
|
||||
assertLength(t, sel.Nodes, 2) |
||||
assertSelectionIs(t, sel.Eq(0), "#pc2") |
||||
if _, ok := sel.Eq(1).Attr("id"); ok { |
||||
t.Error("Want no attribute ID, got one") |
||||
} |
||||
} |
||||
|
||||
func TestSliceEmpty(t *testing.T) { |
||||
defer assertPanic(t) |
||||
Doc().Find("x").Slice(0, 2) |
||||
} |
||||
|
||||
func TestSliceInvalid(t *testing.T) { |
||||
defer assertPanic(t) |
||||
Doc().Find("").Slice(0, 2) |
||||
} |
||||
|
||||
func TestSliceInvalidToEnd(t *testing.T) { |
||||
defer assertPanic(t) |
||||
Doc().Find("").Slice(2, ToEnd) |
||||
} |
||||
|
||||
func TestSliceOutOfBounds(t *testing.T) { |
||||
defer assertPanic(t) |
||||
Doc().Find(".pvk-content").Slice(2, 12) |
||||
} |
||||
|
||||
func TestNegativeSliceStart(t *testing.T) { |
||||
sel := Doc().Find(".container-fluid").Slice(-2, 3) |
||||
assertLength(t, sel.Nodes, 1) |
||||
assertSelectionIs(t, sel.Eq(0), "#cf3") |
||||
} |
||||
|
||||
func TestNegativeSliceEnd(t *testing.T) { |
||||
sel := Doc().Find(".container-fluid").Slice(1, -1) |
||||
assertLength(t, sel.Nodes, 2) |
||||
assertSelectionIs(t, sel.Eq(0), "#cf2") |
||||
assertSelectionIs(t, sel.Eq(1), "#cf3") |
||||
} |
||||
|
||||
func TestNegativeSliceBoth(t *testing.T) { |
||||
sel := Doc().Find(".container-fluid").Slice(-3, -1) |
||||
assertLength(t, sel.Nodes, 2) |
||||
assertSelectionIs(t, sel.Eq(0), "#cf2") |
||||
assertSelectionIs(t, sel.Eq(1), "#cf3") |
||||
} |
||||
|
||||
func TestNegativeSliceToEnd(t *testing.T) { |
||||
sel := Doc().Find(".container-fluid").Slice(-3, ToEnd) |
||||
assertLength(t, sel.Nodes, 3) |
||||
assertSelectionIs(t, sel, "#cf2", "#cf3", "#cf4") |
||||
} |
||||
|
||||
func TestNegativeSliceOutOfBounds(t *testing.T) { |
||||
defer assertPanic(t) |
||||
Doc().Find(".container-fluid").Slice(-12, -7) |
||||
} |
||||
|
||||
func TestSliceRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.Slice(0, 2).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestGet(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
node := sel.Get(1) |
||||
if sel.Nodes[1] != node { |
||||
t.Errorf("Expected node %v to be %v.", node, sel.Nodes[1]) |
||||
} |
||||
} |
||||
|
||||
func TestGetNegative(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
node := sel.Get(-3) |
||||
if sel.Nodes[0] != node { |
||||
t.Errorf("Expected node %v to be %v.", node, sel.Nodes[0]) |
||||
} |
||||
} |
||||
|
||||
func TestGetInvalid(t *testing.T) { |
||||
defer assertPanic(t) |
||||
sel := Doc().Find(".pvk-content") |
||||
sel.Get(129) |
||||
} |
||||
|
||||
func TestIndex(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
if i := sel.Index(); i != 1 { |
||||
t.Errorf("Expected index of 1, got %v.", i) |
||||
} |
||||
} |
||||
|
||||
func TestIndexSelector(t *testing.T) { |
||||
sel := Doc().Find(".hero-unit") |
||||
if i := sel.IndexSelector("div"); i != 4 { |
||||
t.Errorf("Expected index of 4, got %v.", i) |
||||
} |
||||
} |
||||
|
||||
func TestIndexSelectorInvalid(t *testing.T) { |
||||
sel := Doc().Find(".hero-unit") |
||||
if i := sel.IndexSelector(""); i != -1 { |
||||
t.Errorf("Expected index of -1, got %v.", i) |
||||
} |
||||
} |
||||
|
||||
func TestIndexOfNode(t *testing.T) { |
||||
sel := Doc().Find("div.pvk-gutter") |
||||
if i := sel.IndexOfNode(sel.Nodes[1]); i != 1 { |
||||
t.Errorf("Expected index of 1, got %v.", i) |
||||
} |
||||
} |
||||
|
||||
func TestIndexOfNilNode(t *testing.T) { |
||||
sel := Doc().Find("div.pvk-gutter") |
||||
if i := sel.IndexOfNode(nil); i != -1 { |
||||
t.Errorf("Expected index of -1, got %v.", i) |
||||
} |
||||
} |
||||
|
||||
func TestIndexOfSelection(t *testing.T) { |
||||
sel := Doc().Find("div") |
||||
sel2 := Doc().Find(".hero-unit") |
||||
if i := sel.IndexOfSelection(sel2); i != 4 { |
||||
t.Errorf("Expected index of 4, got %v.", i) |
||||
} |
||||
} |
@ -1,436 +0,0 @@
@@ -1,436 +0,0 @@
|
||||
PASS |
||||
BenchmarkFirst 20000000 92.9 ns/op |
||||
BenchmarkLast 20000000 91.6 ns/op |
||||
BenchmarkEq 20000000 90.6 ns/op |
||||
BenchmarkSlice 20000000 86.7 ns/op |
||||
BenchmarkGet 1000000000 2.14 ns/op |
||||
BenchmarkIndex 500000 5308 ns/op |
||||
--- BENCH: BenchmarkIndex |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
BenchmarkIndexSelector 50000 54962 ns/op |
||||
--- BENCH: BenchmarkIndexSelector |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
BenchmarkIndexOfNode 100000000 11.4 ns/op |
||||
--- BENCH: BenchmarkIndexOfNode |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
BenchmarkIndexOfSelection 100000000 12.1 ns/op |
||||
--- BENCH: BenchmarkIndexOfSelection |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
BenchmarkMetalReviewExample 5000 327144 ns/op |
||||
--- BENCH: BenchmarkMetalReviewExample |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
|
||||
bench_example_test.go:41: MetalReviewExample=10 |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
... [output truncated] |
||||
BenchmarkAdd 50000 52945 ns/op |
||||
--- BENCH: BenchmarkAdd |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
BenchmarkAddSelection 10000000 205 ns/op |
||||
--- BENCH: BenchmarkAddSelection |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
BenchmarkAddNodes 10000000 203 ns/op |
||||
--- BENCH: BenchmarkAddNodes |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
BenchmarkAndSelf 1000000 2639 ns/op |
||||
--- BENCH: BenchmarkAndSelf |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
BenchmarkFilter 50000 30182 ns/op |
||||
--- BENCH: BenchmarkFilter |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
BenchmarkNot 50000 34855 ns/op |
||||
--- BENCH: BenchmarkNot |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
BenchmarkFilterFunction 50000 66052 ns/op |
||||
--- BENCH: BenchmarkFilterFunction |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
BenchmarkNotFunction 50000 69721 ns/op |
||||
--- BENCH: BenchmarkNotFunction |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
BenchmarkFilterNodes 50000 66077 ns/op |
||||
--- BENCH: BenchmarkFilterNodes |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
BenchmarkNotNodes 20000 80021 ns/op |
||||
--- BENCH: BenchmarkNotNodes |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
BenchmarkFilterSelection 50000 66256 ns/op |
||||
--- BENCH: BenchmarkFilterSelection |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
BenchmarkNotSelection 20000 79568 ns/op |
||||
--- BENCH: BenchmarkNotSelection |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
BenchmarkHas 5000 569441 ns/op |
||||
--- BENCH: BenchmarkHas |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
BenchmarkHasNodes 10000 230585 ns/op |
||||
--- BENCH: BenchmarkHasNodes |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
BenchmarkHasSelection 10000 231470 ns/op |
||||
--- BENCH: BenchmarkHasSelection |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
BenchmarkEnd 500000000 4.65 ns/op |
||||
--- BENCH: BenchmarkEnd |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
BenchmarkEach 200000 9558 ns/op |
||||
--- BENCH: BenchmarkEach |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
BenchmarkMap 100000 16809 ns/op |
||||
--- BENCH: BenchmarkMap |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
BenchmarkAttr 50000000 37.5 ns/op |
||||
--- BENCH: BenchmarkAttr |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
BenchmarkText 100000 18583 ns/op |
||||
BenchmarkLength 2000000000 0.80 ns/op |
||||
--- BENCH: BenchmarkLength |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
BenchmarkHtml 5000000 666 ns/op |
||||
BenchmarkIs 50000 34328 ns/op |
||||
--- BENCH: BenchmarkIs |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
BenchmarkIsPositional 50000 32423 ns/op |
||||
--- BENCH: BenchmarkIsPositional |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
BenchmarkIsFunction 1000000 2707 ns/op |
||||
--- BENCH: BenchmarkIsFunction |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
BenchmarkIsSelection 50000 66976 ns/op |
||||
--- BENCH: BenchmarkIsSelection |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
BenchmarkIsNodes 50000 66740 ns/op |
||||
--- BENCH: BenchmarkIsNodes |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
BenchmarkHasClass 5000 701722 ns/op |
||||
--- BENCH: BenchmarkHasClass |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
BenchmarkContains 100000000 11.9 ns/op |
||||
--- BENCH: BenchmarkContains |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
BenchmarkFind 50000 55444 ns/op |
||||
--- BENCH: BenchmarkFind |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
BenchmarkFindWithinSelection 10000 127984 ns/op |
||||
--- BENCH: BenchmarkFindWithinSelection |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
BenchmarkFindSelection 5000 355944 ns/op |
||||
--- BENCH: BenchmarkFindSelection |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
BenchmarkFindNodes 5000 355596 ns/op |
||||
--- BENCH: BenchmarkFindNodes |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
BenchmarkContents 500000 5656 ns/op |
||||
--- BENCH: BenchmarkContents |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
BenchmarkContentsFiltered 200000 9007 ns/op |
||||
--- BENCH: BenchmarkContentsFiltered |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
BenchmarkChildren 1000000 1237 ns/op |
||||
--- BENCH: BenchmarkChildren |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
BenchmarkChildrenFiltered 500000 5613 ns/op |
||||
--- BENCH: BenchmarkChildrenFiltered |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
BenchmarkParent 50000 47026 ns/op |
||||
--- BENCH: BenchmarkParent |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
BenchmarkParentFiltered 50000 51438 ns/op |
||||
--- BENCH: BenchmarkParentFiltered |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
BenchmarkParents 20000 91820 ns/op |
||||
--- BENCH: BenchmarkParents |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
BenchmarkParentsFiltered 20000 95156 ns/op |
||||
--- BENCH: BenchmarkParentsFiltered |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
BenchmarkParentsUntil 10000 134383 ns/op |
||||
--- BENCH: BenchmarkParentsUntil |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
BenchmarkParentsUntilSelection 10000 235456 ns/op |
||||
--- BENCH: BenchmarkParentsUntilSelection |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
BenchmarkParentsUntilNodes 10000 235936 ns/op |
||||
--- BENCH: BenchmarkParentsUntilNodes |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
BenchmarkParentsFilteredUntil 50000 32451 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntil |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
BenchmarkParentsFilteredUntilSelection 50000 30570 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilSelection |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
BenchmarkParentsFilteredUntilNodes 50000 30729 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilNodes |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
BenchmarkSiblings 10000 106704 ns/op |
||||
--- BENCH: BenchmarkSiblings |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
BenchmarkSiblingsFiltered 10000 115592 ns/op |
||||
--- BENCH: BenchmarkSiblingsFiltered |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
BenchmarkNext 50000 54449 ns/op |
||||
--- BENCH: BenchmarkNext |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
BenchmarkNextFiltered 50000 58503 ns/op |
||||
--- BENCH: BenchmarkNextFiltered |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
BenchmarkNextAll 20000 77698 ns/op |
||||
--- BENCH: BenchmarkNextAll |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
BenchmarkNextAllFiltered 20000 85034 ns/op |
||||
--- BENCH: BenchmarkNextAllFiltered |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
BenchmarkPrev 50000 56458 ns/op |
||||
--- BENCH: BenchmarkPrev |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
BenchmarkPrevFiltered 50000 60163 ns/op |
||||
--- BENCH: BenchmarkPrevFiltered |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
BenchmarkPrevAll 50000 47679 ns/op |
||||
--- BENCH: BenchmarkPrevAll |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
BenchmarkPrevAllFiltered 50000 51563 ns/op |
||||
--- BENCH: BenchmarkPrevAllFiltered |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
BenchmarkNextUntil 10000 213998 ns/op |
||||
--- BENCH: BenchmarkNextUntil |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
BenchmarkNextUntilSelection 10000 140720 ns/op |
||||
--- BENCH: BenchmarkNextUntilSelection |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
BenchmarkNextUntilNodes 20000 90702 ns/op |
||||
--- BENCH: BenchmarkNextUntilNodes |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
BenchmarkPrevUntil 5000 456039 ns/op |
||||
--- BENCH: BenchmarkPrevUntil |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
BenchmarkPrevUntilSelection 10000 167944 ns/op |
||||
--- BENCH: BenchmarkPrevUntilSelection |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
BenchmarkPrevUntilNodes 20000 82059 ns/op |
||||
--- BENCH: BenchmarkPrevUntilNodes |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
BenchmarkNextFilteredUntil 10000 150883 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntil |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
BenchmarkNextFilteredUntilSelection 10000 146578 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilSelection |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
BenchmarkNextFilteredUntilNodes 10000 148284 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilNodes |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
BenchmarkPrevFilteredUntil 10000 154303 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntil |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
BenchmarkPrevFilteredUntilSelection 10000 149062 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilSelection |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
BenchmarkPrevFilteredUntilNodes 10000 150584 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilNodes |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
ok github.com/PuerkitoBio/goquery 188.326s |
@ -1,438 +0,0 @@
@@ -1,438 +0,0 @@
|
||||
PASS |
||||
BenchmarkFirst 20000000 96.2 ns/op |
||||
BenchmarkLast 20000000 95.8 ns/op |
||||
BenchmarkEq 20000000 94.4 ns/op |
||||
BenchmarkSlice 20000000 89.9 ns/op |
||||
BenchmarkGet 1000000000 2.31 ns/op |
||||
BenchmarkIndex 1000000 1911 ns/op |
||||
--- BENCH: BenchmarkIndex |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
BenchmarkIndexSelector 50000 56034 ns/op |
||||
--- BENCH: BenchmarkIndexSelector |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
BenchmarkIndexOfNode 100000000 11.8 ns/op |
||||
--- BENCH: BenchmarkIndexOfNode |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
BenchmarkIndexOfSelection 100000000 12.1 ns/op |
||||
--- BENCH: BenchmarkIndexOfSelection |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
BenchmarkMetalReviewExample 5000 336823 ns/op |
||||
--- BENCH: BenchmarkMetalReviewExample |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
|
||||
bench_example_test.go:41: MetalReviewExample=10 |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
... [output truncated] |
||||
BenchmarkAdd 50000 54709 ns/op |
||||
--- BENCH: BenchmarkAdd |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
BenchmarkAddSelection 10000000 209 ns/op |
||||
--- BENCH: BenchmarkAddSelection |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
BenchmarkAddNodes 10000000 202 ns/op |
||||
--- BENCH: BenchmarkAddNodes |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
BenchmarkAndSelf 1000000 2634 ns/op |
||||
--- BENCH: BenchmarkAndSelf |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
BenchmarkFilter 50000 31049 ns/op |
||||
--- BENCH: BenchmarkFilter |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
BenchmarkNot 50000 35167 ns/op |
||||
--- BENCH: BenchmarkNot |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
BenchmarkFilterFunction 50000 68974 ns/op |
||||
--- BENCH: BenchmarkFilterFunction |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
BenchmarkNotFunction 50000 74760 ns/op |
||||
--- BENCH: BenchmarkNotFunction |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
BenchmarkFilterNodes 50000 68670 ns/op |
||||
--- BENCH: BenchmarkFilterNodes |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
BenchmarkNotNodes 20000 81357 ns/op |
||||
--- BENCH: BenchmarkNotNodes |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
BenchmarkFilterSelection 50000 68388 ns/op |
||||
--- BENCH: BenchmarkFilterSelection |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
BenchmarkNotSelection 20000 82108 ns/op |
||||
--- BENCH: BenchmarkNotSelection |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
BenchmarkHas 5000 582934 ns/op |
||||
--- BENCH: BenchmarkHas |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
BenchmarkHasNodes 10000 241602 ns/op |
||||
--- BENCH: BenchmarkHasNodes |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
BenchmarkHasSelection 10000 243612 ns/op |
||||
--- BENCH: BenchmarkHasSelection |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
BenchmarkEnd 500000000 4.14 ns/op |
||||
--- BENCH: BenchmarkEnd |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
BenchmarkEach 200000 9848 ns/op |
||||
--- BENCH: BenchmarkEach |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
BenchmarkMap 100000 17569 ns/op |
||||
--- BENCH: BenchmarkMap |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
BenchmarkAttr 50000000 37.6 ns/op |
||||
--- BENCH: BenchmarkAttr |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
BenchmarkText 100000 19345 ns/op |
||||
BenchmarkLength 2000000000 0.80 ns/op |
||||
--- BENCH: BenchmarkLength |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
BenchmarkHtml 5000000 688 ns/op |
||||
BenchmarkIs 50000 35061 ns/op |
||||
--- BENCH: BenchmarkIs |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
BenchmarkIsPositional 50000 32789 ns/op |
||||
--- BENCH: BenchmarkIsPositional |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
BenchmarkIsFunction 1000000 2816 ns/op |
||||
--- BENCH: BenchmarkIsFunction |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
BenchmarkIsSelection 50000 68272 ns/op |
||||
--- BENCH: BenchmarkIsSelection |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
BenchmarkIsNodes 50000 68107 ns/op |
||||
--- BENCH: BenchmarkIsNodes |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
BenchmarkHasClass 5000 709386 ns/op |
||||
--- BENCH: BenchmarkHasClass |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
BenchmarkContains 100000000 12.4 ns/op |
||||
--- BENCH: BenchmarkContains |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
BenchmarkFind 50000 56342 ns/op |
||||
--- BENCH: BenchmarkFind |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
BenchmarkFindWithinSelection 10000 131878 ns/op |
||||
--- BENCH: BenchmarkFindWithinSelection |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
BenchmarkFindSelection 5000 374240 ns/op |
||||
--- BENCH: BenchmarkFindSelection |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
BenchmarkFindNodes 5000 374447 ns/op |
||||
--- BENCH: BenchmarkFindNodes |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
BenchmarkContents 200000 9721 ns/op |
||||
--- BENCH: BenchmarkContents |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
BenchmarkContentsFiltered 200000 12909 ns/op |
||||
--- BENCH: BenchmarkContentsFiltered |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
BenchmarkChildren 1000000 1869 ns/op |
||||
--- BENCH: BenchmarkChildren |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
BenchmarkChildrenFiltered 500000 5941 ns/op |
||||
--- BENCH: BenchmarkChildrenFiltered |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
BenchmarkParent 50000 46223 ns/op |
||||
--- BENCH: BenchmarkParent |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
BenchmarkParentFiltered 50000 51452 ns/op |
||||
--- BENCH: BenchmarkParentFiltered |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
BenchmarkParents 20000 93967 ns/op |
||||
--- BENCH: BenchmarkParents |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
BenchmarkParentsFiltered 20000 97617 ns/op |
||||
--- BENCH: BenchmarkParentsFiltered |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
BenchmarkParentsUntil 10000 138898 ns/op |
||||
--- BENCH: BenchmarkParentsUntil |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
BenchmarkParentsUntilSelection 10000 247817 ns/op |
||||
--- BENCH: BenchmarkParentsUntilSelection |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
BenchmarkParentsUntilNodes 10000 246055 ns/op |
||||
--- BENCH: BenchmarkParentsUntilNodes |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
BenchmarkParentsFilteredUntil 50000 33201 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntil |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
BenchmarkParentsFilteredUntilSelection 50000 31486 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilSelection |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
BenchmarkParentsFilteredUntilNodes 50000 31754 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilNodes |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
BenchmarkSiblings 20000 94749 ns/op |
||||
--- BENCH: BenchmarkSiblings |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
BenchmarkSiblingsFiltered 10000 103926 ns/op |
||||
--- BENCH: BenchmarkSiblingsFiltered |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
BenchmarkNext 50000 33782 ns/op |
||||
--- BENCH: BenchmarkNext |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
BenchmarkNextFiltered 50000 37108 ns/op |
||||
--- BENCH: BenchmarkNextFiltered |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
BenchmarkNextAll 50000 64769 ns/op |
||||
--- BENCH: BenchmarkNextAll |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
BenchmarkNextAllFiltered 50000 71050 ns/op |
||||
--- BENCH: BenchmarkNextAllFiltered |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
BenchmarkPrev 50000 33908 ns/op |
||||
--- BENCH: BenchmarkPrev |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
BenchmarkPrevFiltered 50000 37353 ns/op |
||||
--- BENCH: BenchmarkPrevFiltered |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
BenchmarkPrevAll 50000 31056 ns/op |
||||
--- BENCH: BenchmarkPrevAll |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
BenchmarkPrevAllFiltered 50000 34286 ns/op |
||||
--- BENCH: BenchmarkPrevAllFiltered |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
BenchmarkNextUntil 10000 202553 ns/op |
||||
--- BENCH: BenchmarkNextUntil |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
BenchmarkNextUntilSelection 20000 98693 ns/op |
||||
--- BENCH: BenchmarkNextUntilSelection |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
BenchmarkNextUntilNodes 50000 45532 ns/op |
||||
--- BENCH: BenchmarkNextUntilNodes |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
BenchmarkPrevUntil 5000 454378 ns/op |
||||
--- BENCH: BenchmarkPrevUntil |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
BenchmarkPrevUntilSelection 10000 123594 ns/op |
||||
--- BENCH: BenchmarkPrevUntilSelection |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
BenchmarkPrevUntilNodes 50000 37509 ns/op |
||||
--- BENCH: BenchmarkPrevUntilNodes |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
BenchmarkNextFilteredUntil 10000 109317 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntil |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
BenchmarkNextFilteredUntilSelection 10000 105959 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilSelection |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
BenchmarkNextFilteredUntilNodes 10000 107132 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilNodes |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
BenchmarkPrevFilteredUntil 10000 114474 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntil |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
BenchmarkPrevFilteredUntilSelection 10000 107592 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilSelection |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
BenchmarkPrevFilteredUntilNodes 10000 107495 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilNodes |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
ok github.com/PuerkitoBio/goquery 187.652s |
Before Width: | Height: | Size: 21 KiB |
@ -1,459 +0,0 @@
@@ -1,459 +0,0 @@
|
||||
PASS |
||||
BenchmarkFirst 20000000 94.3 ns/op |
||||
BenchmarkLast 20000000 94.7 ns/op |
||||
BenchmarkEq 20000000 93.7 ns/op |
||||
BenchmarkSlice 20000000 89.9 ns/op |
||||
BenchmarkGet 1000000000 2.72 ns/op |
||||
BenchmarkIndex 1000000 1834 ns/op |
||||
--- BENCH: BenchmarkIndex |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
BenchmarkIndexSelector 50000 53958 ns/op |
||||
--- BENCH: BenchmarkIndexSelector |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
BenchmarkIndexOfNode 100000000 10.1 ns/op |
||||
--- BENCH: BenchmarkIndexOfNode |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
BenchmarkIndexOfSelection 100000000 10.9 ns/op |
||||
--- BENCH: BenchmarkIndexOfSelection |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
BenchmarkMetalReviewExample 5000 326712 ns/op |
||||
--- BENCH: BenchmarkMetalReviewExample |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
|
||||
bench_example_test.go:41: MetalReviewExample=10 |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
... [output truncated] |
||||
BenchmarkAdd 50000 51776 ns/op |
||||
--- BENCH: BenchmarkAdd |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
BenchmarkAddSelection 10000000 196 ns/op |
||||
--- BENCH: BenchmarkAddSelection |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
BenchmarkAddNodes 10000000 191 ns/op |
||||
--- BENCH: BenchmarkAddNodes |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
BenchmarkAndSelf 1000000 2495 ns/op |
||||
--- BENCH: BenchmarkAndSelf |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
BenchmarkFilter 50000 30974 ns/op |
||||
--- BENCH: BenchmarkFilter |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
BenchmarkNot 50000 35322 ns/op |
||||
--- BENCH: BenchmarkNot |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
BenchmarkFilterFunction 50000 65644 ns/op |
||||
--- BENCH: BenchmarkFilterFunction |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
BenchmarkNotFunction 50000 69245 ns/op |
||||
--- BENCH: BenchmarkNotFunction |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
BenchmarkFilterNodes 50000 64824 ns/op |
||||
--- BENCH: BenchmarkFilterNodes |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
BenchmarkNotNodes 20000 76247 ns/op |
||||
--- BENCH: BenchmarkNotNodes |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
BenchmarkFilterSelection 50000 66154 ns/op |
||||
--- BENCH: BenchmarkFilterSelection |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
BenchmarkNotSelection 20000 76336 ns/op |
||||
--- BENCH: BenchmarkNotSelection |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
BenchmarkHas 5000 569495 ns/op |
||||
--- BENCH: BenchmarkHas |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
BenchmarkHasNodes 10000 227059 ns/op |
||||
--- BENCH: BenchmarkHasNodes |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
BenchmarkHasSelection 10000 227167 ns/op |
||||
--- BENCH: BenchmarkHasSelection |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
BenchmarkEnd 500000000 3.99 ns/op |
||||
--- BENCH: BenchmarkEnd |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
BenchmarkEach 200000 9354 ns/op |
||||
--- BENCH: BenchmarkEach |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
BenchmarkMap 100000 16557 ns/op |
||||
--- BENCH: BenchmarkMap |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
BenchmarkAttr 50000000 36.4 ns/op |
||||
--- BENCH: BenchmarkAttr |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
BenchmarkText 100000 18473 ns/op |
||||
BenchmarkLength 2000000000 0.76 ns/op |
||||
--- BENCH: BenchmarkLength |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
BenchmarkHtml 5000000 666 ns/op |
||||
BenchmarkIs 50000 35174 ns/op |
||||
--- BENCH: BenchmarkIs |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
BenchmarkIsPositional 50000 31814 ns/op |
||||
--- BENCH: BenchmarkIsPositional |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
BenchmarkIsFunction 1000000 2754 ns/op |
||||
--- BENCH: BenchmarkIsFunction |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
BenchmarkIsSelection 50000 66260 ns/op |
||||
--- BENCH: BenchmarkIsSelection |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
BenchmarkIsNodes 50000 64682 ns/op |
||||
--- BENCH: BenchmarkIsNodes |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
BenchmarkHasClass 5000 672953 ns/op |
||||
--- BENCH: BenchmarkHasClass |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
BenchmarkContains 100000000 11.3 ns/op |
||||
--- BENCH: BenchmarkContains |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
BenchmarkFind 50000 53780 ns/op |
||||
--- BENCH: BenchmarkFind |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
BenchmarkFindWithinSelection 10000 125963 ns/op |
||||
--- BENCH: BenchmarkFindWithinSelection |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
BenchmarkFindSelection 5000 357318 ns/op |
||||
--- BENCH: BenchmarkFindSelection |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
BenchmarkFindNodes 5000 357587 ns/op |
||||
--- BENCH: BenchmarkFindNodes |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
BenchmarkContents 200000 9135 ns/op |
||||
--- BENCH: BenchmarkContents |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
BenchmarkContentsFiltered 200000 12383 ns/op |
||||
--- BENCH: BenchmarkContentsFiltered |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
BenchmarkChildren 1000000 1809 ns/op |
||||
--- BENCH: BenchmarkChildren |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
BenchmarkChildrenFiltered 500000 5814 ns/op |
||||
--- BENCH: BenchmarkChildrenFiltered |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
BenchmarkParent 50000 44810 ns/op |
||||
--- BENCH: BenchmarkParent |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
BenchmarkParentFiltered 50000 48795 ns/op |
||||
--- BENCH: BenchmarkParentFiltered |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
BenchmarkParents 20000 89102 ns/op |
||||
--- BENCH: BenchmarkParents |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
BenchmarkParentsFiltered 20000 93953 ns/op |
||||
--- BENCH: BenchmarkParentsFiltered |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
BenchmarkParentsUntil 10000 130783 ns/op |
||||
--- BENCH: BenchmarkParentsUntil |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
BenchmarkParentsUntilSelection 10000 231797 ns/op |
||||
--- BENCH: BenchmarkParentsUntilSelection |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
BenchmarkParentsUntilNodes 10000 233761 ns/op |
||||
--- BENCH: BenchmarkParentsUntilNodes |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
BenchmarkParentsFilteredUntil 50000 31360 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntil |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
BenchmarkParentsFilteredUntilSelection 50000 30272 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilSelection |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
BenchmarkParentsFilteredUntilNodes 50000 30327 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilNodes |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
BenchmarkSiblings 20000 89862 ns/op |
||||
--- BENCH: BenchmarkSiblings |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
BenchmarkSiblingsFiltered 20000 97948 ns/op |
||||
--- BENCH: BenchmarkSiblingsFiltered |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
BenchmarkNext 50000 31975 ns/op |
||||
--- BENCH: BenchmarkNext |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
BenchmarkNextFiltered 50000 34887 ns/op |
||||
--- BENCH: BenchmarkNextFiltered |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
BenchmarkNextAll 50000 60734 ns/op |
||||
--- BENCH: BenchmarkNextAll |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
BenchmarkNextAllFiltered 50000 67428 ns/op |
||||
--- BENCH: BenchmarkNextAllFiltered |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
BenchmarkPrev 50000 32399 ns/op |
||||
--- BENCH: BenchmarkPrev |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
BenchmarkPrevFiltered 50000 34944 ns/op |
||||
--- BENCH: BenchmarkPrevFiltered |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
BenchmarkPrevAll 100000 29360 ns/op |
||||
--- BENCH: BenchmarkPrevAll |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
BenchmarkPrevAllFiltered 50000 32291 ns/op |
||||
--- BENCH: BenchmarkPrevAllFiltered |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
BenchmarkNextUntil 10000 191890 ns/op |
||||
--- BENCH: BenchmarkNextUntil |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
BenchmarkNextUntilSelection 20000 92054 ns/op |
||||
--- BENCH: BenchmarkNextUntilSelection |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
BenchmarkNextUntilNodes 50000 43401 ns/op |
||||
--- BENCH: BenchmarkNextUntilNodes |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
BenchmarkPrevUntil 5000 433383 ns/op |
||||
--- BENCH: BenchmarkPrevUntil |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
BenchmarkPrevUntilSelection 10000 116423 ns/op |
||||
--- BENCH: BenchmarkPrevUntilSelection |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
BenchmarkPrevUntilNodes 50000 35338 ns/op |
||||
--- BENCH: BenchmarkPrevUntilNodes |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
BenchmarkNextFilteredUntil 10000 104686 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntil |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
BenchmarkNextFilteredUntilSelection 20000 99485 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilSelection |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
BenchmarkNextFilteredUntilNodes 20000 99452 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilNodes |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
BenchmarkPrevFilteredUntil 10000 112640 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntil |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
BenchmarkPrevFilteredUntilSelection 10000 103702 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilSelection |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
BenchmarkPrevFilteredUntilNodes 10000 103277 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilNodes |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
BenchmarkClosest 500000 6530 ns/op |
||||
--- BENCH: BenchmarkClosest |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
BenchmarkClosestSelection 1000000 1135 ns/op |
||||
--- BENCH: BenchmarkClosestSelection |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
BenchmarkClosestNodes 1000000 1133 ns/op |
||||
--- BENCH: BenchmarkClosestNodes |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
ok github.com/PuerkitoBio/goquery 192.541s |
Before Width: | Height: | Size: 22 KiB |
@ -1,470 +0,0 @@
@@ -1,470 +0,0 @@
|
||||
PASS |
||||
BenchmarkFirst 20000000 96.3 ns/op |
||||
BenchmarkLast 20000000 95.7 ns/op |
||||
BenchmarkEq 20000000 97.1 ns/op |
||||
BenchmarkSlice 20000000 92.3 ns/op |
||||
BenchmarkGet 1000000000 2.06 ns/op |
||||
BenchmarkIndex 1000000 1069 ns/op |
||||
--- BENCH: BenchmarkIndex |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
BenchmarkIndexSelector 100000 26750 ns/op |
||||
--- BENCH: BenchmarkIndexSelector |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
BenchmarkIndexOfNode 100000000 10.7 ns/op |
||||
--- BENCH: BenchmarkIndexOfNode |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
BenchmarkIndexOfSelection 100000000 11.8 ns/op |
||||
--- BENCH: BenchmarkIndexOfSelection |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
BenchmarkMetalReviewExample 10000 219078 ns/op |
||||
--- BENCH: BenchmarkMetalReviewExample |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
|
||||
bench_example_test.go:41: MetalReviewExample=10 |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
... [output truncated] |
||||
BenchmarkAdd 100000 22345 ns/op |
||||
--- BENCH: BenchmarkAdd |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
BenchmarkAddSelection 10000000 209 ns/op |
||||
--- BENCH: BenchmarkAddSelection |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
BenchmarkAddNodes 10000000 209 ns/op |
||||
--- BENCH: BenchmarkAddNodes |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
BenchmarkAndSelf 1000000 2568 ns/op |
||||
--- BENCH: BenchmarkAndSelf |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
BenchmarkFilter 100000 26715 ns/op |
||||
--- BENCH: BenchmarkFilter |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
BenchmarkNot 50000 30058 ns/op |
||||
--- BENCH: BenchmarkNot |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
BenchmarkFilterFunction 50000 66346 ns/op |
||||
--- BENCH: BenchmarkFilterFunction |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
BenchmarkNotFunction 50000 72646 ns/op |
||||
--- BENCH: BenchmarkNotFunction |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
BenchmarkFilterNodes 50000 65493 ns/op |
||||
--- BENCH: BenchmarkFilterNodes |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
BenchmarkNotNodes 20000 79466 ns/op |
||||
--- BENCH: BenchmarkNotNodes |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
BenchmarkFilterSelection 50000 65494 ns/op |
||||
--- BENCH: BenchmarkFilterSelection |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
BenchmarkNotSelection 20000 79387 ns/op |
||||
--- BENCH: BenchmarkNotSelection |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
BenchmarkHas 5000 386571 ns/op |
||||
--- BENCH: BenchmarkHas |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
BenchmarkHasNodes 10000 230664 ns/op |
||||
--- BENCH: BenchmarkHasNodes |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
BenchmarkHasSelection 10000 230705 ns/op |
||||
--- BENCH: BenchmarkHasSelection |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
BenchmarkEnd 500000000 4.61 ns/op |
||||
--- BENCH: BenchmarkEnd |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
BenchmarkEach 200000 9520 ns/op |
||||
--- BENCH: BenchmarkEach |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
BenchmarkMap 100000 15960 ns/op |
||||
--- BENCH: BenchmarkMap |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
BenchmarkAttr 50000000 30.4 ns/op |
||||
--- BENCH: BenchmarkAttr |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
BenchmarkText 100000 18718 ns/op |
||||
BenchmarkLength 2000000000 0.31 ns/op |
||||
--- BENCH: BenchmarkLength |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
BenchmarkHtml 5000000 606 ns/op |
||||
BenchmarkIs 100000 29289 ns/op |
||||
--- BENCH: BenchmarkIs |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
BenchmarkIsPositional 100000 23834 ns/op |
||||
--- BENCH: BenchmarkIsPositional |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
BenchmarkIsFunction 1000000 2436 ns/op |
||||
--- BENCH: BenchmarkIsFunction |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
BenchmarkIsSelection 50000 67106 ns/op |
||||
--- BENCH: BenchmarkIsSelection |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
BenchmarkIsNodes 50000 66042 ns/op |
||||
--- BENCH: BenchmarkIsNodes |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
BenchmarkHasClass 5000 565347 ns/op |
||||
--- BENCH: BenchmarkHasClass |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
BenchmarkContains 100000000 11.0 ns/op |
||||
--- BENCH: BenchmarkContains |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
BenchmarkFind 100000 27677 ns/op |
||||
--- BENCH: BenchmarkFind |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
BenchmarkFindWithinSelection 50000 72162 ns/op |
||||
--- BENCH: BenchmarkFindWithinSelection |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
BenchmarkFindSelection 5000 460124 ns/op |
||||
--- BENCH: BenchmarkFindSelection |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
BenchmarkFindNodes 5000 459390 ns/op |
||||
--- BENCH: BenchmarkFindNodes |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
BenchmarkContents 500000 3395 ns/op |
||||
--- BENCH: BenchmarkContents |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
BenchmarkContentsFiltered 500000 5193 ns/op |
||||
--- BENCH: BenchmarkContentsFiltered |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
BenchmarkChildren 5000000 667 ns/op |
||||
--- BENCH: BenchmarkChildren |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
BenchmarkChildrenFiltered 500000 3591 ns/op |
||||
--- BENCH: BenchmarkChildrenFiltered |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
BenchmarkParent 50000 43168 ns/op |
||||
--- BENCH: BenchmarkParent |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
BenchmarkParentFiltered 50000 45836 ns/op |
||||
--- BENCH: BenchmarkParentFiltered |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
BenchmarkParents 20000 92348 ns/op |
||||
--- BENCH: BenchmarkParents |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
BenchmarkParentsFiltered 20000 95306 ns/op |
||||
--- BENCH: BenchmarkParentsFiltered |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
BenchmarkParentsUntil 50000 72782 ns/op |
||||
--- BENCH: BenchmarkParentsUntil |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
BenchmarkParentsUntilSelection 10000 157639 ns/op |
||||
--- BENCH: BenchmarkParentsUntilSelection |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
BenchmarkParentsUntilNodes 10000 157510 ns/op |
||||
--- BENCH: BenchmarkParentsUntilNodes |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
BenchmarkParentsFilteredUntil 100000 16987 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntil |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
BenchmarkParentsFilteredUntilSelection 100000 21174 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilSelection |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
BenchmarkParentsFilteredUntilNodes 100000 21238 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilNodes |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
BenchmarkSiblings 50000 66536 ns/op |
||||
--- BENCH: BenchmarkSiblings |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
BenchmarkSiblingsFiltered 50000 71822 ns/op |
||||
--- BENCH: BenchmarkSiblingsFiltered |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
BenchmarkNext 200000 10745 ns/op |
||||
--- BENCH: BenchmarkNext |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
BenchmarkNextFiltered 200000 12399 ns/op |
||||
--- BENCH: BenchmarkNextFiltered |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
BenchmarkNextAll 50000 44640 ns/op |
||||
--- BENCH: BenchmarkNextAll |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
BenchmarkNextAllFiltered 50000 49713 ns/op |
||||
--- BENCH: BenchmarkNextAllFiltered |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
BenchmarkPrev 200000 10743 ns/op |
||||
--- BENCH: BenchmarkPrev |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
BenchmarkPrevFiltered 200000 12456 ns/op |
||||
--- BENCH: BenchmarkPrevFiltered |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
BenchmarkPrevAll 100000 17600 ns/op |
||||
--- BENCH: BenchmarkPrevAll |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
BenchmarkPrevAllFiltered 100000 19460 ns/op |
||||
--- BENCH: BenchmarkPrevAllFiltered |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
BenchmarkNextUntil 20000 92630 ns/op |
||||
--- BENCH: BenchmarkNextUntil |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
BenchmarkNextUntilSelection 50000 61285 ns/op |
||||
--- BENCH: BenchmarkNextUntilSelection |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
BenchmarkNextUntilNodes 100000 25859 ns/op |
||||
--- BENCH: BenchmarkNextUntilNodes |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
BenchmarkPrevUntil 10000 230236 ns/op |
||||
--- BENCH: BenchmarkPrevUntil |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
BenchmarkPrevUntilSelection 20000 77837 ns/op |
||||
--- BENCH: BenchmarkPrevUntilSelection |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
BenchmarkPrevUntilNodes 100000 20784 ns/op |
||||
--- BENCH: BenchmarkPrevUntilNodes |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
BenchmarkNextFilteredUntil 50000 46147 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntil |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
BenchmarkNextFilteredUntilSelection 50000 67164 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilSelection |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
BenchmarkNextFilteredUntilNodes 50000 66628 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilNodes |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
BenchmarkPrevFilteredUntil 50000 46697 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntil |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
BenchmarkPrevFilteredUntilSelection 50000 68646 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilSelection |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
BenchmarkPrevFilteredUntilNodes 50000 68745 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilNodes |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
BenchmarkClosest 500000 4909 ns/op |
||||
--- BENCH: BenchmarkClosest |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
BenchmarkClosestSelection 5000000 744 ns/op |
||||
--- BENCH: BenchmarkClosestSelection |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
BenchmarkClosestNodes 5000000 733 ns/op |
||||
--- BENCH: BenchmarkClosestNodes |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
ok github.com/PuerkitoBio/goquery 220.793s |
@ -1,476 +0,0 @@
@@ -1,476 +0,0 @@
|
||||
PASS |
||||
BenchmarkFirst 20000000 95.5 ns/op |
||||
BenchmarkLast 20000000 94.9 ns/op |
||||
BenchmarkEq 20000000 95.7 ns/op |
||||
BenchmarkSlice 20000000 91.7 ns/op |
||||
BenchmarkGet 1000000000 2.05 ns/op |
||||
BenchmarkIndex 1000000 1079 ns/op |
||||
--- BENCH: BenchmarkIndex |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
BenchmarkIndexSelector 100000 26972 ns/op |
||||
--- BENCH: BenchmarkIndexSelector |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
BenchmarkIndexOfNode 100000000 10.8 ns/op |
||||
--- BENCH: BenchmarkIndexOfNode |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
BenchmarkIndexOfSelection 100000000 11.7 ns/op |
||||
--- BENCH: BenchmarkIndexOfSelection |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
BenchmarkMetalReviewExample 10000 213800 ns/op |
||||
--- BENCH: BenchmarkMetalReviewExample |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
|
||||
bench_example_test.go:41: MetalReviewExample=10 |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
... [output truncated] |
||||
BenchmarkAdd 100000 21811 ns/op |
||||
--- BENCH: BenchmarkAdd |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
BenchmarkAddSelection 10000000 205 ns/op |
||||
--- BENCH: BenchmarkAddSelection |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
BenchmarkAddNodes 10000000 202 ns/op |
||||
--- BENCH: BenchmarkAddNodes |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
BenchmarkAndSelf 1000000 2467 ns/op |
||||
--- BENCH: BenchmarkAndSelf |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
BenchmarkFilter 100000 25643 ns/op |
||||
--- BENCH: BenchmarkFilter |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
BenchmarkNot 100000 29566 ns/op |
||||
--- BENCH: BenchmarkNot |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
BenchmarkFilterFunction 50000 66894 ns/op |
||||
--- BENCH: BenchmarkFilterFunction |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
BenchmarkNotFunction 50000 72183 ns/op |
||||
--- BENCH: BenchmarkNotFunction |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
BenchmarkFilterNodes 50000 65516 ns/op |
||||
--- BENCH: BenchmarkFilterNodes |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
BenchmarkNotNodes 20000 78880 ns/op |
||||
--- BENCH: BenchmarkNotNodes |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
BenchmarkFilterSelection 50000 65232 ns/op |
||||
--- BENCH: BenchmarkFilterSelection |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
BenchmarkNotSelection 20000 78813 ns/op |
||||
--- BENCH: BenchmarkNotSelection |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
BenchmarkHas 5000 388834 ns/op |
||||
--- BENCH: BenchmarkHas |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
BenchmarkHasNodes 10000 228552 ns/op |
||||
--- BENCH: BenchmarkHasNodes |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
BenchmarkHasSelection 10000 228365 ns/op |
||||
--- BENCH: BenchmarkHasSelection |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
BenchmarkEnd 500000000 4.62 ns/op |
||||
--- BENCH: BenchmarkEnd |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
BenchmarkEach 200000 9548 ns/op |
||||
--- BENCH: BenchmarkEach |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
BenchmarkMap 100000 15900 ns/op |
||||
--- BENCH: BenchmarkMap |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
BenchmarkEachWithBreak 1000000 1650 ns/op |
||||
--- BENCH: BenchmarkEachWithBreak |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
BenchmarkAttr 50000000 30.5 ns/op |
||||
--- BENCH: BenchmarkAttr |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
BenchmarkText 100000 18873 ns/op |
||||
BenchmarkLength 2000000000 0.31 ns/op |
||||
--- BENCH: BenchmarkLength |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
BenchmarkHtml 5000000 616 ns/op |
||||
BenchmarkIs 100000 29499 ns/op |
||||
--- BENCH: BenchmarkIs |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
BenchmarkIsPositional 100000 23733 ns/op |
||||
--- BENCH: BenchmarkIsPositional |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
BenchmarkIsFunction 1000000 2404 ns/op |
||||
--- BENCH: BenchmarkIsFunction |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
BenchmarkIsSelection 50000 65376 ns/op |
||||
--- BENCH: BenchmarkIsSelection |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
BenchmarkIsNodes 50000 65322 ns/op |
||||
--- BENCH: BenchmarkIsNodes |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
BenchmarkHasClass 5000 558933 ns/op |
||||
--- BENCH: BenchmarkHasClass |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
BenchmarkContains 100000000 11.1 ns/op |
||||
--- BENCH: BenchmarkContains |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
BenchmarkFind 100000 27841 ns/op |
||||
--- BENCH: BenchmarkFind |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
BenchmarkFindWithinSelection 50000 72096 ns/op |
||||
--- BENCH: BenchmarkFindWithinSelection |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
BenchmarkFindSelection 5000 457349 ns/op |
||||
--- BENCH: BenchmarkFindSelection |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
BenchmarkFindNodes 5000 459324 ns/op |
||||
--- BENCH: BenchmarkFindNodes |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
BenchmarkContents 500000 3435 ns/op |
||||
--- BENCH: BenchmarkContents |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
BenchmarkContentsFiltered 500000 5241 ns/op |
||||
--- BENCH: BenchmarkContentsFiltered |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
BenchmarkChildren 5000000 667 ns/op |
||||
--- BENCH: BenchmarkChildren |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
BenchmarkChildrenFiltered 500000 3639 ns/op |
||||
--- BENCH: BenchmarkChildrenFiltered |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
BenchmarkParent 50000 44867 ns/op |
||||
--- BENCH: BenchmarkParent |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
BenchmarkParentFiltered 50000 46476 ns/op |
||||
--- BENCH: BenchmarkParentFiltered |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
BenchmarkParents 20000 92559 ns/op |
||||
--- BENCH: BenchmarkParents |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
BenchmarkParentsFiltered 20000 96142 ns/op |
||||
--- BENCH: BenchmarkParentsFiltered |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
BenchmarkParentsUntil 50000 73931 ns/op |
||||
--- BENCH: BenchmarkParentsUntil |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
BenchmarkParentsUntilSelection 10000 159820 ns/op |
||||
--- BENCH: BenchmarkParentsUntilSelection |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
BenchmarkParentsUntilNodes 10000 158811 ns/op |
||||
--- BENCH: BenchmarkParentsUntilNodes |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
BenchmarkParentsFilteredUntil 100000 17203 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntil |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
BenchmarkParentsFilteredUntilSelection 100000 21358 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilSelection |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
BenchmarkParentsFilteredUntilNodes 100000 21338 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilNodes |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
BenchmarkSiblings 50000 66463 ns/op |
||||
--- BENCH: BenchmarkSiblings |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
BenchmarkSiblingsFiltered 50000 72503 ns/op |
||||
--- BENCH: BenchmarkSiblingsFiltered |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
BenchmarkNext 200000 10881 ns/op |
||||
--- BENCH: BenchmarkNext |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
BenchmarkNextFiltered 200000 12588 ns/op |
||||
--- BENCH: BenchmarkNextFiltered |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
BenchmarkNextAll 50000 45075 ns/op |
||||
--- BENCH: BenchmarkNextAll |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
BenchmarkNextAllFiltered 50000 50455 ns/op |
||||
--- BENCH: BenchmarkNextAllFiltered |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
BenchmarkPrev 200000 10933 ns/op |
||||
--- BENCH: BenchmarkPrev |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
BenchmarkPrevFiltered 200000 12579 ns/op |
||||
--- BENCH: BenchmarkPrevFiltered |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
BenchmarkPrevAll 100000 17751 ns/op |
||||
--- BENCH: BenchmarkPrevAll |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
BenchmarkPrevAllFiltered 100000 19702 ns/op |
||||
--- BENCH: BenchmarkPrevAllFiltered |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
BenchmarkNextUntil 20000 93586 ns/op |
||||
--- BENCH: BenchmarkNextUntil |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
BenchmarkNextUntilSelection 50000 61155 ns/op |
||||
--- BENCH: BenchmarkNextUntilSelection |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
BenchmarkNextUntilNodes 100000 25805 ns/op |
||||
--- BENCH: BenchmarkNextUntilNodes |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
BenchmarkPrevUntil 10000 232225 ns/op |
||||
--- BENCH: BenchmarkPrevUntil |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
BenchmarkPrevUntilSelection 20000 78316 ns/op |
||||
--- BENCH: BenchmarkPrevUntilSelection |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
BenchmarkPrevUntilNodes 100000 20657 ns/op |
||||
--- BENCH: BenchmarkPrevUntilNodes |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
BenchmarkNextFilteredUntil 50000 46567 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntil |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
BenchmarkNextFilteredUntilSelection 50000 67227 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilSelection |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
BenchmarkNextFilteredUntilNodes 50000 66995 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilNodes |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
BenchmarkPrevFilteredUntil 50000 47361 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntil |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
BenchmarkPrevFilteredUntilSelection 50000 68802 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilSelection |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
BenchmarkPrevFilteredUntilNodes 50000 68928 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilNodes |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
BenchmarkClosest 500000 4922 ns/op |
||||
--- BENCH: BenchmarkClosest |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
BenchmarkClosestSelection 5000000 738 ns/op |
||||
--- BENCH: BenchmarkClosestSelection |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
BenchmarkClosestNodes 5000000 737 ns/op |
||||
--- BENCH: BenchmarkClosestNodes |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
ok github.com/PuerkitoBio/goquery 224.003s |
@ -1,478 +0,0 @@
@@ -1,478 +0,0 @@
|
||||
PASS |
||||
BenchmarkFirst 20000000 88.4 ns/op |
||||
BenchmarkLast 20000000 88.2 ns/op |
||||
BenchmarkEq 20000000 87.4 ns/op |
||||
BenchmarkSlice 20000000 84.9 ns/op |
||||
BenchmarkGet 2000000000 1.99 ns/op |
||||
BenchmarkIndex 2000000 906 ns/op |
||||
--- BENCH: BenchmarkIndex |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
BenchmarkIndexSelector 100000 22276 ns/op |
||||
--- BENCH: BenchmarkIndexSelector |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
BenchmarkIndexOfNode 200000000 9.72 ns/op |
||||
--- BENCH: BenchmarkIndexOfNode |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
BenchmarkIndexOfSelection 100000000 10.4 ns/op |
||||
--- BENCH: BenchmarkIndexOfSelection |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
BenchmarkMetalReviewExample 10000 199277 ns/op |
||||
--- BENCH: BenchmarkMetalReviewExample |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
|
||||
bench_example_test.go:41: MetalReviewExample=10 |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
... [output truncated] |
||||
BenchmarkAdd 100000 18277 ns/op |
||||
--- BENCH: BenchmarkAdd |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
BenchmarkAddSelection 10000000 200 ns/op |
||||
--- BENCH: BenchmarkAddSelection |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
BenchmarkAddNodes 10000000 189 ns/op |
||||
--- BENCH: BenchmarkAddNodes |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
BenchmarkAndSelf 1000000 2569 ns/op |
||||
--- BENCH: BenchmarkAndSelf |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
BenchmarkFilter 100000 25195 ns/op |
||||
--- BENCH: BenchmarkFilter |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
BenchmarkNot 100000 29003 ns/op |
||||
--- BENCH: BenchmarkNot |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
BenchmarkFilterFunction 50000 60690 ns/op |
||||
--- BENCH: BenchmarkFilterFunction |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
BenchmarkNotFunction 50000 66008 ns/op |
||||
--- BENCH: BenchmarkNotFunction |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
BenchmarkFilterNodes 50000 59723 ns/op |
||||
--- BENCH: BenchmarkFilterNodes |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
BenchmarkNotNodes 50000 72698 ns/op |
||||
--- BENCH: BenchmarkNotNodes |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
BenchmarkFilterSelection 50000 59598 ns/op |
||||
--- BENCH: BenchmarkFilterSelection |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
BenchmarkNotSelection 50000 72526 ns/op |
||||
--- BENCH: BenchmarkNotSelection |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
BenchmarkHas 5000 367076 ns/op |
||||
--- BENCH: BenchmarkHas |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
BenchmarkHasNodes 10000 219710 ns/op |
||||
--- BENCH: BenchmarkHasNodes |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
BenchmarkHasSelection 10000 219105 ns/op |
||||
--- BENCH: BenchmarkHasSelection |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
BenchmarkEnd 500000000 4.58 ns/op |
||||
--- BENCH: BenchmarkEnd |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
BenchmarkEach 200000 8615 ns/op |
||||
--- BENCH: BenchmarkEach |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
BenchmarkMap 200000 14271 ns/op |
||||
--- BENCH: BenchmarkMap |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
BenchmarkEachWithBreak 1000000 1497 ns/op |
||||
--- BENCH: BenchmarkEachWithBreak |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
BenchmarkAttr 50000000 30.9 ns/op |
||||
--- BENCH: BenchmarkAttr |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
BenchmarkText 200000 13729 ns/op |
||||
BenchmarkLength 2000000000 0.31 ns/op |
||||
--- BENCH: BenchmarkLength |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
BenchmarkHtml 5000000 537 ns/op |
||||
BenchmarkIs 100000 28904 ns/op |
||||
--- BENCH: BenchmarkIs |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
BenchmarkIsPositional 100000 23556 ns/op |
||||
--- BENCH: BenchmarkIsPositional |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
BenchmarkIsFunction 1000000 2195 ns/op |
||||
--- BENCH: BenchmarkIsFunction |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
BenchmarkIsSelection 50000 60100 ns/op |
||||
--- BENCH: BenchmarkIsSelection |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
BenchmarkIsNodes 50000 59962 ns/op |
||||
--- BENCH: BenchmarkIsNodes |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
BenchmarkHasClass 5000 388679 ns/op |
||||
--- BENCH: BenchmarkHasClass |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
BenchmarkContains 100000000 11.0 ns/op |
||||
--- BENCH: BenchmarkContains |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
BenchmarkFind 100000 22779 ns/op |
||||
--- BENCH: BenchmarkFind |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
BenchmarkFindWithinSelection 50000 62033 ns/op |
||||
--- BENCH: BenchmarkFindWithinSelection |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
BenchmarkFindSelection 5000 446918 ns/op |
||||
--- BENCH: BenchmarkFindSelection |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
BenchmarkFindNodes 5000 441753 ns/op |
||||
--- BENCH: BenchmarkFindNodes |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
BenchmarkContents 1000000 2807 ns/op |
||||
--- BENCH: BenchmarkContents |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
BenchmarkContentsFiltered 500000 4477 ns/op |
||||
--- BENCH: BenchmarkContentsFiltered |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
BenchmarkChildren 5000000 548 ns/op |
||||
--- BENCH: BenchmarkChildren |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
BenchmarkChildrenFiltered 500000 3304 ns/op |
||||
--- BENCH: BenchmarkChildrenFiltered |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
BenchmarkParent 50000 38248 ns/op |
||||
--- BENCH: BenchmarkParent |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
BenchmarkParentFiltered 50000 40677 ns/op |
||||
--- BENCH: BenchmarkParentFiltered |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
BenchmarkParents 20000 83043 ns/op |
||||
--- BENCH: BenchmarkParents |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
BenchmarkParentsFiltered 20000 85391 ns/op |
||||
--- BENCH: BenchmarkParentsFiltered |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
BenchmarkParentsUntil 50000 65118 ns/op |
||||
--- BENCH: BenchmarkParentsUntil |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
BenchmarkParentsUntilSelection 10000 144028 ns/op |
||||
--- BENCH: BenchmarkParentsUntilSelection |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
BenchmarkParentsUntilNodes 10000 146713 ns/op |
||||
--- BENCH: BenchmarkParentsUntilNodes |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
BenchmarkParentsFilteredUntil 100000 15113 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntil |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
BenchmarkParentsFilteredUntilSelection 100000 18881 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilSelection |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
BenchmarkParentsFilteredUntilNodes 100000 18926 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilNodes |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
BenchmarkSiblings 50000 63221 ns/op |
||||
--- BENCH: BenchmarkSiblings |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
BenchmarkSiblingsFiltered 50000 69028 ns/op |
||||
--- BENCH: BenchmarkSiblingsFiltered |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
BenchmarkNext 200000 9133 ns/op |
||||
--- BENCH: BenchmarkNext |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
BenchmarkNextFiltered 200000 10601 ns/op |
||||
--- BENCH: BenchmarkNextFiltered |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
BenchmarkNextAll 50000 43089 ns/op |
||||
--- BENCH: BenchmarkNextAll |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
BenchmarkNextAllFiltered 50000 47867 ns/op |
||||
--- BENCH: BenchmarkNextAllFiltered |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
BenchmarkPrev 200000 9104 ns/op |
||||
--- BENCH: BenchmarkPrev |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
BenchmarkPrevFiltered 200000 10579 ns/op |
||||
--- BENCH: BenchmarkPrevFiltered |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
BenchmarkPrevAll 100000 15185 ns/op |
||||
--- BENCH: BenchmarkPrevAll |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
BenchmarkPrevAllFiltered 100000 17108 ns/op |
||||
--- BENCH: BenchmarkPrevAllFiltered |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
BenchmarkNextUntil 20000 81087 ns/op |
||||
--- BENCH: BenchmarkNextUntil |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
BenchmarkNextUntilSelection 50000 55831 ns/op |
||||
--- BENCH: BenchmarkNextUntilSelection |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
BenchmarkNextUntilNodes 100000 23130 ns/op |
||||
--- BENCH: BenchmarkNextUntilNodes |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
BenchmarkPrevUntil 10000 204673 ns/op |
||||
--- BENCH: BenchmarkPrevUntil |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
BenchmarkPrevUntilSelection 50000 70965 ns/op |
||||
--- BENCH: BenchmarkPrevUntilSelection |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
BenchmarkPrevUntilNodes 100000 18591 ns/op |
||||
--- BENCH: BenchmarkPrevUntilNodes |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
BenchmarkNextFilteredUntil 50000 42004 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntil |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
BenchmarkNextFilteredUntilSelection 50000 61953 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilSelection |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
BenchmarkNextFilteredUntilNodes 50000 62124 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilNodes |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
BenchmarkPrevFilteredUntil 50000 42861 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntil |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
BenchmarkPrevFilteredUntilSelection 50000 62451 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilSelection |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
BenchmarkPrevFilteredUntilNodes 50000 62631 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilNodes |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
BenchmarkClosest 500000 4684 ns/op |
||||
--- BENCH: BenchmarkClosest |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
BenchmarkClosestSelection 5000000 622 ns/op |
||||
--- BENCH: BenchmarkClosestSelection |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
BenchmarkClosestNodes 5000000 617 ns/op |
||||
--- BENCH: BenchmarkClosestNodes |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
ok github.com/PuerkitoBio/goquery 218.724s |
@ -1,477 +0,0 @@
@@ -1,477 +0,0 @@
|
||||
PASS |
||||
BenchmarkFirst 20000000 88.3 ns/op |
||||
BenchmarkLast 20000000 88.9 ns/op |
||||
BenchmarkEq 20000000 86.7 ns/op |
||||
BenchmarkSlice 20000000 84.1 ns/op |
||||
BenchmarkGet 2000000000 1.99 ns/op |
||||
BenchmarkIndex 2000000 907 ns/op |
||||
--- BENCH: BenchmarkIndex |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
BenchmarkIndexSelector 200000 13052 ns/op |
||||
--- BENCH: BenchmarkIndexSelector |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
BenchmarkIndexOfNode 100000000 10.5 ns/op |
||||
--- BENCH: BenchmarkIndexOfNode |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
BenchmarkIndexOfSelection 100000000 11.6 ns/op |
||||
--- BENCH: BenchmarkIndexOfSelection |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
BenchmarkMetalReviewExample 10000 189556 ns/op |
||||
--- BENCH: BenchmarkMetalReviewExample |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
|
||||
bench_example_test.go:41: MetalReviewExample=10 |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
... [output truncated] |
||||
BenchmarkAdd 200000 13714 ns/op |
||||
--- BENCH: BenchmarkAdd |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
BenchmarkAddSelection 10000000 200 ns/op |
||||
--- BENCH: BenchmarkAddSelection |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
BenchmarkAddNodes 10000000 186 ns/op |
||||
--- BENCH: BenchmarkAddNodes |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
BenchmarkAndSelf 1000000 2532 ns/op |
||||
--- BENCH: BenchmarkAndSelf |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
BenchmarkFilter 100000 25199 ns/op |
||||
--- BENCH: BenchmarkFilter |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
BenchmarkNot 100000 29162 ns/op |
||||
--- BENCH: BenchmarkNot |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
BenchmarkFilterFunction 50000 60733 ns/op |
||||
--- BENCH: BenchmarkFilterFunction |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
BenchmarkNotFunction 50000 66124 ns/op |
||||
--- BENCH: BenchmarkNotFunction |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
BenchmarkFilterNodes 50000 59489 ns/op |
||||
--- BENCH: BenchmarkFilterNodes |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
BenchmarkNotNodes 50000 73623 ns/op |
||||
--- BENCH: BenchmarkNotNodes |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
BenchmarkFilterSelection 50000 60053 ns/op |
||||
--- BENCH: BenchmarkFilterSelection |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
BenchmarkNotSelection 50000 73477 ns/op |
||||
--- BENCH: BenchmarkNotSelection |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
BenchmarkHas 5000 364859 ns/op |
||||
--- BENCH: BenchmarkHas |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
BenchmarkHasNodes 10000 226980 ns/op |
||||
--- BENCH: BenchmarkHasNodes |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
BenchmarkHasSelection 10000 220471 ns/op |
||||
--- BENCH: BenchmarkHasSelection |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
BenchmarkEnd 500000000 4.64 ns/op |
||||
--- BENCH: BenchmarkEnd |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
BenchmarkEach 200000 8811 ns/op |
||||
--- BENCH: BenchmarkEach |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
BenchmarkMap 100000 15365 ns/op |
||||
--- BENCH: BenchmarkMap |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
BenchmarkEachWithBreak 1000000 1559 ns/op |
||||
--- BENCH: BenchmarkEachWithBreak |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
BenchmarkAttr 50000000 31.7 ns/op |
||||
--- BENCH: BenchmarkAttr |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
BenchmarkText 200000 13901 ns/op |
||||
BenchmarkLength 2000000000 0.31 ns/op |
||||
--- BENCH: BenchmarkLength |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
BenchmarkHtml 5000000 541 ns/op |
||||
BenchmarkIs 100000 29435 ns/op |
||||
--- BENCH: BenchmarkIs |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
BenchmarkIsPositional 100000 22938 ns/op |
||||
--- BENCH: BenchmarkIsPositional |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
BenchmarkIsFunction 1000000 2185 ns/op |
||||
--- BENCH: BenchmarkIsFunction |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
BenchmarkIsSelection 50000 60607 ns/op |
||||
--- BENCH: BenchmarkIsSelection |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
BenchmarkIsNodes 50000 61599 ns/op |
||||
--- BENCH: BenchmarkIsNodes |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
BenchmarkHasClass 5000 395436 ns/op |
||||
--- BENCH: BenchmarkHasClass |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
BenchmarkContains 100000000 11.0 ns/op |
||||
--- BENCH: BenchmarkContains |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
BenchmarkFind 200000 13788 ns/op |
||||
--- BENCH: BenchmarkFind |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
BenchmarkFindWithinSelection 50000 54253 ns/op |
||||
--- BENCH: BenchmarkFindWithinSelection |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
BenchmarkFindSelection 5000 438879 ns/op |
||||
--- BENCH: BenchmarkFindSelection |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
BenchmarkFindNodes 5000 437225 ns/op |
||||
--- BENCH: BenchmarkFindNodes |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
BenchmarkContents 1000000 2844 ns/op |
||||
--- BENCH: BenchmarkContents |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
BenchmarkContentsFiltered 500000 4528 ns/op |
||||
--- BENCH: BenchmarkContentsFiltered |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
BenchmarkChildren 5000000 552 ns/op |
||||
--- BENCH: BenchmarkChildren |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
BenchmarkChildrenFiltered 500000 3345 ns/op |
||||
--- BENCH: BenchmarkChildrenFiltered |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
BenchmarkParent 50000 39482 ns/op |
||||
--- BENCH: BenchmarkParent |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
BenchmarkParentFiltered 50000 42113 ns/op |
||||
--- BENCH: BenchmarkParentFiltered |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
BenchmarkParents 20000 84136 ns/op |
||||
--- BENCH: BenchmarkParents |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
BenchmarkParentsFiltered 20000 86041 ns/op |
||||
--- BENCH: BenchmarkParentsFiltered |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
BenchmarkParentsUntil 50000 65844 ns/op |
||||
--- BENCH: BenchmarkParentsUntil |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
BenchmarkParentsUntilSelection 10000 146903 ns/op |
||||
--- BENCH: BenchmarkParentsUntilSelection |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
BenchmarkParentsUntilNodes 10000 146638 ns/op |
||||
--- BENCH: BenchmarkParentsUntilNodes |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
BenchmarkParentsFilteredUntil 100000 16413 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntil |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
BenchmarkParentsFilteredUntilSelection 100000 20366 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilSelection |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
BenchmarkParentsFilteredUntilNodes 100000 18800 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilNodes |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
BenchmarkSiblings 50000 63443 ns/op |
||||
--- BENCH: BenchmarkSiblings |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
BenchmarkSiblingsFiltered 50000 69250 ns/op |
||||
--- BENCH: BenchmarkSiblingsFiltered |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
BenchmarkNext 200000 9193 ns/op |
||||
--- BENCH: BenchmarkNext |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
BenchmarkNextFiltered 200000 10767 ns/op |
||||
--- BENCH: BenchmarkNextFiltered |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
BenchmarkNextAll 50000 42829 ns/op |
||||
--- BENCH: BenchmarkNextAll |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
BenchmarkNextAllFiltered 50000 48174 ns/op |
||||
--- BENCH: BenchmarkNextAllFiltered |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
BenchmarkPrev 200000 9114 ns/op |
||||
--- BENCH: BenchmarkPrev |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
BenchmarkPrevFiltered 200000 11114 ns/op |
||||
--- BENCH: BenchmarkPrevFiltered |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
BenchmarkPrevAll 100000 16387 ns/op |
||||
--- BENCH: BenchmarkPrevAll |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
BenchmarkPrevAllFiltered 100000 18322 ns/op |
||||
--- BENCH: BenchmarkPrevAllFiltered |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
BenchmarkNextUntil 20000 83828 ns/op |
||||
--- BENCH: BenchmarkNextUntil |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
BenchmarkNextUntilSelection 50000 58822 ns/op |
||||
--- BENCH: BenchmarkNextUntilSelection |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
BenchmarkNextUntilNodes 100000 23173 ns/op |
||||
--- BENCH: BenchmarkNextUntilNodes |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
BenchmarkPrevUntil 10000 219407 ns/op |
||||
--- BENCH: BenchmarkPrevUntil |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
BenchmarkPrevUntilSelection 20000 76033 ns/op |
||||
--- BENCH: BenchmarkPrevUntilSelection |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
BenchmarkPrevUntilNodes 100000 19417 ns/op |
||||
--- BENCH: BenchmarkPrevUntilNodes |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
BenchmarkNextFilteredUntil 50000 44648 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntil |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
BenchmarkNextFilteredUntilSelection 50000 62751 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilSelection |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
BenchmarkNextFilteredUntilNodes 50000 62035 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilNodes |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
BenchmarkPrevFilteredUntil 50000 43331 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntil |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
BenchmarkPrevFilteredUntilSelection 50000 64767 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilSelection |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
BenchmarkPrevFilteredUntilNodes 50000 67808 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilNodes |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
BenchmarkClosest 500000 4870 ns/op |
||||
--- BENCH: BenchmarkClosest |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
BenchmarkClosestSelection 5000000 656 ns/op |
||||
--- BENCH: BenchmarkClosestSelection |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
BenchmarkClosestNodes 5000000 663 ns/op |
||||
--- BENCH: BenchmarkClosestNodes |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
ok github.com/PuerkitoBio/goquery 218.007s |
@ -1,477 +0,0 @@
@@ -1,477 +0,0 @@
|
||||
PASS |
||||
BenchmarkFirst 20000000 91.0 ns/op |
||||
BenchmarkLast 20000000 90.5 ns/op |
||||
BenchmarkEq 20000000 90.2 ns/op |
||||
BenchmarkSlice 20000000 88.0 ns/op |
||||
BenchmarkGet 1000000000 2.04 ns/op |
||||
BenchmarkIndex 2000000 935 ns/op |
||||
--- BENCH: BenchmarkIndex |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
bench_array_test.go:73: Index=3 |
||||
BenchmarkIndexSelector 100000 23613 ns/op |
||||
--- BENCH: BenchmarkIndexSelector |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
bench_array_test.go:85: IndexSelector=4 |
||||
BenchmarkIndexOfNode 100000000 10.2 ns/op |
||||
--- BENCH: BenchmarkIndexOfNode |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
bench_array_test.go:99: IndexOfNode=2 |
||||
BenchmarkIndexOfSelection 100000000 11.0 ns/op |
||||
--- BENCH: BenchmarkIndexOfSelection |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
bench_array_test.go:111: IndexOfSelection=2 |
||||
BenchmarkMetalReviewExample 10000 213843 ns/op |
||||
--- BENCH: BenchmarkMetalReviewExample |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
|
||||
bench_example_test.go:41: MetalReviewExample=10 |
||||
bench_example_test.go:40: Review 0: Midnight - Complete and Total Hell (8.5). |
||||
Review 1: Over Your Threshold - Facticity (6.0). |
||||
Review 2: Nuclear Death Terror - Chaos Reigns (7.5). |
||||
Review 3: Evoken - Atra Mors (9.5). |
||||
... [output truncated] |
||||
BenchmarkAdd 100000 18671 ns/op |
||||
--- BENCH: BenchmarkAdd |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
bench_expand_test.go:20: Add=43 |
||||
BenchmarkAddSelection 10000000 204 ns/op |
||||
--- BENCH: BenchmarkAddSelection |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
bench_expand_test.go:37: AddSelection=43 |
||||
BenchmarkAddNodes 10000000 195 ns/op |
||||
--- BENCH: BenchmarkAddNodes |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
bench_expand_test.go:55: AddNodes=43 |
||||
BenchmarkAndSelf 1000000 2611 ns/op |
||||
--- BENCH: BenchmarkAndSelf |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
bench_expand_test.go:71: AndSelf=44 |
||||
BenchmarkFilter 100000 27571 ns/op |
||||
--- BENCH: BenchmarkFilter |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
bench_filter_test.go:20: Filter=13 |
||||
BenchmarkNot 50000 32006 ns/op |
||||
--- BENCH: BenchmarkNot |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
bench_filter_test.go:36: Not=371 |
||||
BenchmarkFilterFunction 50000 61388 ns/op |
||||
--- BENCH: BenchmarkFilterFunction |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
bench_filter_test.go:55: FilterFunction=112 |
||||
BenchmarkNotFunction 50000 66702 ns/op |
||||
--- BENCH: BenchmarkNotFunction |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
bench_filter_test.go:74: NotFunction=261 |
||||
BenchmarkFilterNodes 50000 59699 ns/op |
||||
--- BENCH: BenchmarkFilterNodes |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
bench_filter_test.go:92: FilterNodes=2 |
||||
BenchmarkNotNodes 50000 73248 ns/op |
||||
--- BENCH: BenchmarkNotNodes |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
bench_filter_test.go:110: NotNodes=360 |
||||
BenchmarkFilterSelection 50000 59242 ns/op |
||||
--- BENCH: BenchmarkFilterSelection |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
bench_filter_test.go:127: FilterSelection=2 |
||||
BenchmarkNotSelection 50000 73211 ns/op |
||||
--- BENCH: BenchmarkNotSelection |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
bench_filter_test.go:144: NotSelection=360 |
||||
BenchmarkHas 5000 395087 ns/op |
||||
--- BENCH: BenchmarkHas |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
bench_filter_test.go:160: Has=13 |
||||
BenchmarkHasNodes 10000 215849 ns/op |
||||
--- BENCH: BenchmarkHasNodes |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
bench_filter_test.go:178: HasNodes=15 |
||||
BenchmarkHasSelection 10000 215612 ns/op |
||||
--- BENCH: BenchmarkHasSelection |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
bench_filter_test.go:195: HasSelection=15 |
||||
BenchmarkEnd 500000000 4.59 ns/op |
||||
--- BENCH: BenchmarkEnd |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
bench_filter_test.go:211: End=373 |
||||
BenchmarkEach 200000 8588 ns/op |
||||
--- BENCH: BenchmarkEach |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
bench_iteration_test.go:22: Each=59 |
||||
BenchmarkMap 200000 14444 ns/op |
||||
--- BENCH: BenchmarkMap |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
bench_iteration_test.go:41: Map=59 |
||||
BenchmarkEachWithBreak 1000000 1490 ns/op |
||||
--- BENCH: BenchmarkEachWithBreak |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
bench_iteration_test.go:61: Each=10 |
||||
BenchmarkAttr 50000000 30.9 ns/op |
||||
--- BENCH: BenchmarkAttr |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
bench_property_test.go:16: Attr=firstHeading |
||||
BenchmarkText 200000 14017 ns/op |
||||
BenchmarkLength 2000000000 0.31 ns/op |
||||
--- BENCH: BenchmarkLength |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
bench_property_test.go:37: Length=14 |
||||
BenchmarkHtml 5000000 577 ns/op |
||||
BenchmarkIs 50000 31936 ns/op |
||||
--- BENCH: BenchmarkIs |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
bench_query_test.go:16: Is=true |
||||
BenchmarkIsPositional 100000 23372 ns/op |
||||
--- BENCH: BenchmarkIsPositional |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
bench_query_test.go:28: IsPositional=true |
||||
BenchmarkIsFunction 1000000 2170 ns/op |
||||
--- BENCH: BenchmarkIsFunction |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
bench_query_test.go:43: IsFunction=true |
||||
BenchmarkIsSelection 50000 59814 ns/op |
||||
--- BENCH: BenchmarkIsSelection |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
bench_query_test.go:56: IsSelection=true |
||||
BenchmarkIsNodes 50000 59629 ns/op |
||||
--- BENCH: BenchmarkIsNodes |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
bench_query_test.go:70: IsNodes=true |
||||
BenchmarkHasClass 5000 384894 ns/op |
||||
--- BENCH: BenchmarkHasClass |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
bench_query_test.go:82: HasClass=true |
||||
BenchmarkContains 100000000 11.4 ns/op |
||||
--- BENCH: BenchmarkContains |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
bench_query_test.go:96: Contains=true |
||||
BenchmarkFind 100000 23545 ns/op |
||||
--- BENCH: BenchmarkFind |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
bench_traversal_test.go:18: Find=41 |
||||
BenchmarkFindWithinSelection 50000 63775 ns/op |
||||
--- BENCH: BenchmarkFindWithinSelection |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
bench_traversal_test.go:34: FindWithinSelection=39 |
||||
BenchmarkFindSelection 5000 441958 ns/op |
||||
--- BENCH: BenchmarkFindSelection |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
bench_traversal_test.go:51: FindSelection=73 |
||||
BenchmarkFindNodes 5000 437717 ns/op |
||||
--- BENCH: BenchmarkFindNodes |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
bench_traversal_test.go:69: FindNodes=73 |
||||
BenchmarkContents 1000000 2799 ns/op |
||||
--- BENCH: BenchmarkContents |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
bench_traversal_test.go:85: Contents=16 |
||||
BenchmarkContentsFiltered 500000 4489 ns/op |
||||
--- BENCH: BenchmarkContentsFiltered |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
bench_traversal_test.go:101: ContentsFiltered=1 |
||||
BenchmarkChildren 5000000 546 ns/op |
||||
--- BENCH: BenchmarkChildren |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
bench_traversal_test.go:117: Children=2 |
||||
BenchmarkChildrenFiltered 500000 3472 ns/op |
||||
--- BENCH: BenchmarkChildrenFiltered |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
bench_traversal_test.go:133: ChildrenFiltered=2 |
||||
BenchmarkParent 50000 39067 ns/op |
||||
--- BENCH: BenchmarkParent |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
bench_traversal_test.go:149: Parent=55 |
||||
BenchmarkParentFiltered 50000 41450 ns/op |
||||
--- BENCH: BenchmarkParentFiltered |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
bench_traversal_test.go:165: ParentFiltered=4 |
||||
BenchmarkParents 20000 84864 ns/op |
||||
--- BENCH: BenchmarkParents |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
bench_traversal_test.go:181: Parents=73 |
||||
BenchmarkParentsFiltered 20000 87823 ns/op |
||||
--- BENCH: BenchmarkParentsFiltered |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
bench_traversal_test.go:197: ParentsFiltered=18 |
||||
BenchmarkParentsUntil 50000 65986 ns/op |
||||
--- BENCH: BenchmarkParentsUntil |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
bench_traversal_test.go:213: ParentsUntil=52 |
||||
BenchmarkParentsUntilSelection 10000 149798 ns/op |
||||
--- BENCH: BenchmarkParentsUntilSelection |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
bench_traversal_test.go:230: ParentsUntilSelection=70 |
||||
BenchmarkParentsUntilNodes 10000 148144 ns/op |
||||
--- BENCH: BenchmarkParentsUntilNodes |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
bench_traversal_test.go:248: ParentsUntilNodes=70 |
||||
BenchmarkParentsFilteredUntil 100000 15579 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntil |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
bench_traversal_test.go:264: ParentsFilteredUntil=2 |
||||
BenchmarkParentsFilteredUntilSelection 100000 19094 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilSelection |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
bench_traversal_test.go:281: ParentsFilteredUntilSelection=2 |
||||
BenchmarkParentsFilteredUntilNodes 100000 19037 ns/op |
||||
--- BENCH: BenchmarkParentsFilteredUntilNodes |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
bench_traversal_test.go:299: ParentsFilteredUntilNodes=2 |
||||
BenchmarkSiblings 50000 63891 ns/op |
||||
--- BENCH: BenchmarkSiblings |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
bench_traversal_test.go:315: Siblings=293 |
||||
BenchmarkSiblingsFiltered 50000 70424 ns/op |
||||
--- BENCH: BenchmarkSiblingsFiltered |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
bench_traversal_test.go:331: SiblingsFiltered=46 |
||||
BenchmarkNext 200000 9350 ns/op |
||||
--- BENCH: BenchmarkNext |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
bench_traversal_test.go:347: Next=49 |
||||
BenchmarkNextFiltered 200000 10929 ns/op |
||||
--- BENCH: BenchmarkNextFiltered |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
bench_traversal_test.go:363: NextFiltered=6 |
||||
BenchmarkNextAll 50000 43398 ns/op |
||||
--- BENCH: BenchmarkNextAll |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
bench_traversal_test.go:379: NextAll=234 |
||||
BenchmarkNextAllFiltered 50000 48519 ns/op |
||||
--- BENCH: BenchmarkNextAllFiltered |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
bench_traversal_test.go:395: NextAllFiltered=33 |
||||
BenchmarkPrev 200000 9181 ns/op |
||||
--- BENCH: BenchmarkPrev |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
bench_traversal_test.go:411: Prev=49 |
||||
BenchmarkPrevFiltered 200000 10811 ns/op |
||||
--- BENCH: BenchmarkPrevFiltered |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
bench_traversal_test.go:429: PrevFiltered=7 |
||||
BenchmarkPrevAll 100000 15589 ns/op |
||||
--- BENCH: BenchmarkPrevAll |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
bench_traversal_test.go:445: PrevAll=78 |
||||
BenchmarkPrevAllFiltered 100000 17341 ns/op |
||||
--- BENCH: BenchmarkPrevAllFiltered |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
bench_traversal_test.go:461: PrevAllFiltered=6 |
||||
BenchmarkNextUntil 20000 80663 ns/op |
||||
--- BENCH: BenchmarkNextUntil |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
bench_traversal_test.go:477: NextUntil=84 |
||||
BenchmarkNextUntilSelection 50000 56496 ns/op |
||||
--- BENCH: BenchmarkNextUntilSelection |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
bench_traversal_test.go:494: NextUntilSelection=42 |
||||
BenchmarkNextUntilNodes 100000 23729 ns/op |
||||
--- BENCH: BenchmarkNextUntilNodes |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
bench_traversal_test.go:512: NextUntilNodes=12 |
||||
BenchmarkPrevUntil 10000 208267 ns/op |
||||
--- BENCH: BenchmarkPrevUntil |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
bench_traversal_test.go:528: PrevUntil=238 |
||||
BenchmarkPrevUntilSelection 50000 72119 ns/op |
||||
--- BENCH: BenchmarkPrevUntilSelection |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
bench_traversal_test.go:545: PrevUntilSelection=49 |
||||
BenchmarkPrevUntilNodes 100000 18549 ns/op |
||||
--- BENCH: BenchmarkPrevUntilNodes |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
bench_traversal_test.go:563: PrevUntilNodes=11 |
||||
BenchmarkNextFilteredUntil 50000 42339 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntil |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
bench_traversal_test.go:579: NextFilteredUntil=22 |
||||
BenchmarkNextFilteredUntilSelection 50000 61916 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilSelection |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
bench_traversal_test.go:596: NextFilteredUntilSelection=22 |
||||
BenchmarkNextFilteredUntilNodes 50000 62139 ns/op |
||||
--- BENCH: BenchmarkNextFilteredUntilNodes |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
bench_traversal_test.go:614: NextFilteredUntilNodes=22 |
||||
BenchmarkPrevFilteredUntil 50000 43409 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntil |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
bench_traversal_test.go:630: PrevFilteredUntil=20 |
||||
BenchmarkPrevFilteredUntilSelection 50000 63768 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilSelection |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
bench_traversal_test.go:647: PrevFilteredUntilSelection=20 |
||||
BenchmarkPrevFilteredUntilNodes 50000 63543 ns/op |
||||
--- BENCH: BenchmarkPrevFilteredUntilNodes |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
bench_traversal_test.go:665: PrevFilteredUntilNodes=20 |
||||
BenchmarkClosest 500000 5110 ns/op |
||||
--- BENCH: BenchmarkClosest |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
bench_traversal_test.go:681: Closest=2 |
||||
BenchmarkClosestSelection 5000000 629 ns/op |
||||
--- BENCH: BenchmarkClosestSelection |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
bench_traversal_test.go:698: ClosestSelection=2 |
||||
BenchmarkClosestNodes 5000000 627 ns/op |
||||
--- BENCH: BenchmarkClosestNodes |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
bench_traversal_test.go:715: ClosestNodes=2 |
||||
ok github.com/PuerkitoBio/goquery 215.785s |
@ -1,85 +0,0 @@
@@ -1,85 +0,0 @@
|
||||
BenchmarkFirst-4 30000000 50.7 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkLast-4 30000000 50.9 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkEq-4 30000000 55.7 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkSlice-4 500000000 3.45 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkGet-4 2000000000 1.68 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkIndex-4 3000000 541 ns/op 248 B/op 10 allocs/op |
||||
BenchmarkIndexSelector-4 200000 10749 ns/op 2464 B/op 17 allocs/op |
||||
BenchmarkIndexOfNode-4 200000000 6.47 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkIndexOfSelection-4 200000000 7.27 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkMetalReviewExample-4 10000 138426 ns/op 12240 B/op 319 allocs/op |
||||
BenchmarkAdd-4 200000 10192 ns/op 208 B/op 9 allocs/op |
||||
BenchmarkAddSelection-4 10000000 158 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkAddNodes-4 10000000 156 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkAndSelf-4 1000000 1588 ns/op 1008 B/op 5 allocs/op |
||||
BenchmarkFilter-4 100000 20427 ns/op 360 B/op 8 allocs/op |
||||
BenchmarkNot-4 100000 23508 ns/op 136 B/op 5 allocs/op |
||||
BenchmarkFilterFunction-4 50000 34178 ns/op 22976 B/op 755 allocs/op |
||||
BenchmarkNotFunction-4 50000 38173 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkFilterNodes-4 50000 34001 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkNotNodes-4 30000 40344 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkFilterSelection-4 50000 33308 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkNotSelection-4 30000 40748 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkHas-4 5000 263346 ns/op 1816 B/op 48 allocs/op |
||||
BenchmarkHasNodes-4 10000 160840 ns/op 21184 B/op 752 allocs/op |
||||
BenchmarkHasSelection-4 10000 165410 ns/op 21184 B/op 752 allocs/op |
||||
BenchmarkEnd-4 2000000000 1.01 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkEach-4 300000 4664 ns/op 3304 B/op 118 allocs/op |
||||
BenchmarkMap-4 200000 8286 ns/op 5572 B/op 184 allocs/op |
||||
BenchmarkEachWithBreak-4 2000000 806 ns/op 560 B/op 20 allocs/op |
||||
BenchmarkAttr-4 100000000 21.6 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkText-4 200000 8909 ns/op 7536 B/op 110 allocs/op |
||||
BenchmarkLength-4 2000000000 0.34 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkHtml-4 3000000 422 ns/op 120 B/op 2 allocs/op |
||||
BenchmarkIs-4 100000 22615 ns/op 88 B/op 4 allocs/op |
||||
BenchmarkIsPositional-4 50000 26655 ns/op 1112 B/op 10 allocs/op |
||||
BenchmarkIsFunction-4 1000000 1208 ns/op 784 B/op 28 allocs/op |
||||
BenchmarkIsSelection-4 50000 33497 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkIsNodes-4 50000 33572 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkHasClass-4 10000 232802 ns/op 14944 B/op 976 allocs/op |
||||
BenchmarkContains-4 200000000 7.33 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkFind-4 200000 10715 ns/op 2464 B/op 17 allocs/op |
||||
BenchmarkFindWithinSelection-4 50000 35878 ns/op 2176 B/op 78 allocs/op |
||||
BenchmarkFindSelection-4 10000 194356 ns/op 2672 B/op 82 allocs/op |
||||
BenchmarkFindNodes-4 10000 195510 ns/op 2672 B/op 82 allocs/op |
||||
BenchmarkContents-4 1000000 2252 ns/op 864 B/op 34 allocs/op |
||||
BenchmarkContentsFiltered-4 500000 3015 ns/op 1016 B/op 39 allocs/op |
||||
BenchmarkChildren-4 5000000 364 ns/op 152 B/op 7 allocs/op |
||||
BenchmarkChildrenFiltered-4 1000000 2212 ns/op 352 B/op 15 allocs/op |
||||
BenchmarkParent-4 50000 24643 ns/op 4048 B/op 381 allocs/op |
||||
BenchmarkParentFiltered-4 50000 25967 ns/op 4248 B/op 388 allocs/op |
||||
BenchmarkParents-4 30000 50000 ns/op 27776 B/op 830 allocs/op |
||||
BenchmarkParentsFiltered-4 30000 53107 ns/op 28360 B/op 838 allocs/op |
||||
BenchmarkParentsUntil-4 100000 22423 ns/op 10352 B/op 353 allocs/op |
||||
BenchmarkParentsUntilSelection-4 20000 86925 ns/op 51144 B/op 1516 allocs/op |
||||
BenchmarkParentsUntilNodes-4 20000 87597 ns/op 51144 B/op 1516 allocs/op |
||||
BenchmarkParentsFilteredUntil-4 300000 5568 ns/op 2232 B/op 86 allocs/op |
||||
BenchmarkParentsFilteredUntilSelection-4 200000 10966 ns/op 5440 B/op 190 allocs/op |
||||
BenchmarkParentsFilteredUntilNodes-4 200000 10919 ns/op 5440 B/op 190 allocs/op |
||||
BenchmarkSiblings-4 30000 46018 ns/op 15400 B/op 204 allocs/op |
||||
BenchmarkSiblingsFiltered-4 30000 50566 ns/op 16496 B/op 213 allocs/op |
||||
BenchmarkNext-4 200000 7921 ns/op 3216 B/op 112 allocs/op |
||||
BenchmarkNextFiltered-4 200000 8804 ns/op 3416 B/op 118 allocs/op |
||||
BenchmarkNextAll-4 50000 31098 ns/op 9912 B/op 138 allocs/op |
||||
BenchmarkNextAllFiltered-4 50000 34677 ns/op 11008 B/op 147 allocs/op |
||||
BenchmarkPrev-4 200000 7920 ns/op 3216 B/op 112 allocs/op |
||||
BenchmarkPrevFiltered-4 200000 8913 ns/op 3416 B/op 118 allocs/op |
||||
BenchmarkPrevAll-4 200000 10845 ns/op 4376 B/op 113 allocs/op |
||||
BenchmarkPrevAllFiltered-4 100000 12030 ns/op 4576 B/op 119 allocs/op |
||||
BenchmarkNextUntil-4 100000 19193 ns/op 5760 B/op 260 allocs/op |
||||
BenchmarkNextUntilSelection-4 50000 34829 ns/op 18480 B/op 542 allocs/op |
||||
BenchmarkNextUntilNodes-4 100000 14459 ns/op 7944 B/op 248 allocs/op |
||||
BenchmarkPrevUntil-4 20000 66296 ns/op 12856 B/op 448 allocs/op |
||||
BenchmarkPrevUntilSelection-4 30000 45037 ns/op 23432 B/op 689 allocs/op |
||||
BenchmarkPrevUntilNodes-4 200000 11525 ns/op 6152 B/op 203 allocs/op |
||||
BenchmarkNextFilteredUntil-4 100000 12940 ns/op 4512 B/op 173 allocs/op |
||||
BenchmarkNextFilteredUntilSelection-4 50000 38924 ns/op 19160 B/op 567 allocs/op |
||||
BenchmarkNextFilteredUntilNodes-4 50000 38528 ns/op 19160 B/op 567 allocs/op |
||||
BenchmarkPrevFilteredUntil-4 100000 12980 ns/op 4664 B/op 175 allocs/op |
||||
BenchmarkPrevFilteredUntilSelection-4 50000 39671 ns/op 19936 B/op 587 allocs/op |
||||
BenchmarkPrevFilteredUntilNodes-4 50000 39484 ns/op 19936 B/op 587 allocs/op |
||||
BenchmarkClosest-4 500000 3310 ns/op 160 B/op 8 allocs/op |
||||
BenchmarkClosestSelection-4 5000000 361 ns/op 96 B/op 6 allocs/op |
||||
BenchmarkClosestNodes-4 5000000 359 ns/op 96 B/op 6 allocs/op |
||||
PASS |
||||
ok github.com/PuerkitoBio/goquery 163.718s |
@ -1,85 +0,0 @@
@@ -1,85 +0,0 @@
|
||||
BenchmarkFirst-4 30000000 50.9 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkLast-4 30000000 50.0 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkEq-4 30000000 50.5 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkSlice-4 500000000 3.53 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkGet-4 2000000000 1.66 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkIndex-4 2000000 832 ns/op 248 B/op 10 allocs/op |
||||
BenchmarkIndexSelector-4 100000 16073 ns/op 3839 B/op 21 allocs/op |
||||
BenchmarkIndexOfNode-4 200000000 6.38 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkIndexOfSelection-4 200000000 7.14 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkMetalReviewExample-4 10000 140737 ns/op 12418 B/op 320 allocs/op |
||||
BenchmarkAdd-4 100000 13162 ns/op 974 B/op 10 allocs/op |
||||
BenchmarkAddSelection-4 500000 3160 ns/op 814 B/op 2 allocs/op |
||||
BenchmarkAddNodes-4 500000 3159 ns/op 814 B/op 2 allocs/op |
||||
BenchmarkAndSelf-4 200000 7423 ns/op 2404 B/op 9 allocs/op |
||||
BenchmarkFilter-4 100000 19671 ns/op 360 B/op 8 allocs/op |
||||
BenchmarkNot-4 100000 22577 ns/op 136 B/op 5 allocs/op |
||||
BenchmarkFilterFunction-4 50000 33960 ns/op 22976 B/op 755 allocs/op |
||||
BenchmarkNotFunction-4 50000 37909 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkFilterNodes-4 50000 34196 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkNotNodes-4 30000 40446 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkFilterSelection-4 50000 33091 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkNotSelection-4 30000 40609 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkHas-4 5000 262936 ns/op 2371 B/op 50 allocs/op |
||||
BenchmarkHasNodes-4 10000 148631 ns/op 21184 B/op 752 allocs/op |
||||
BenchmarkHasSelection-4 10000 153117 ns/op 21184 B/op 752 allocs/op |
||||
BenchmarkEnd-4 2000000000 1.02 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkEach-4 300000 4653 ns/op 3304 B/op 118 allocs/op |
||||
BenchmarkMap-4 200000 8257 ns/op 5572 B/op 184 allocs/op |
||||
BenchmarkEachWithBreak-4 2000000 806 ns/op 560 B/op 20 allocs/op |
||||
BenchmarkAttr-4 100000000 22.0 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkText-4 200000 8913 ns/op 7536 B/op 110 allocs/op |
||||
BenchmarkLength-4 2000000000 0.35 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkHtml-4 5000000 398 ns/op 120 B/op 2 allocs/op |
||||
BenchmarkIs-4 100000 22392 ns/op 88 B/op 4 allocs/op |
||||
BenchmarkIsPositional-4 50000 26259 ns/op 1112 B/op 10 allocs/op |
||||
BenchmarkIsFunction-4 1000000 1212 ns/op 784 B/op 28 allocs/op |
||||
BenchmarkIsSelection-4 50000 33222 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkIsNodes-4 50000 33408 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkHasClass-4 10000 233208 ns/op 14944 B/op 976 allocs/op |
||||
BenchmarkContains-4 200000000 7.57 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkFind-4 100000 16121 ns/op 3839 B/op 21 allocs/op |
||||
BenchmarkFindWithinSelection-4 20000 68019 ns/op 11521 B/op 97 allocs/op |
||||
BenchmarkFindSelection-4 5000 387582 ns/op 59787 B/op 176 allocs/op |
||||
BenchmarkFindNodes-4 5000 389246 ns/op 59797 B/op 176 allocs/op |
||||
BenchmarkContents-4 200000 11475 ns/op 2878 B/op 42 allocs/op |
||||
BenchmarkContentsFiltered-4 200000 11222 ns/op 2498 B/op 46 allocs/op |
||||
BenchmarkChildren-4 2000000 650 ns/op 152 B/op 7 allocs/op |
||||
BenchmarkChildrenFiltered-4 500000 2568 ns/op 352 B/op 15 allocs/op |
||||
BenchmarkParent-4 2000 702513 ns/op 194478 B/op 828 allocs/op |
||||
BenchmarkParentFiltered-4 2000 690778 ns/op 194658 B/op 835 allocs/op |
||||
BenchmarkParents-4 10000 124855 ns/op 49869 B/op 868 allocs/op |
||||
BenchmarkParentsFiltered-4 10000 128535 ns/op 50456 B/op 876 allocs/op |
||||
BenchmarkParentsUntil-4 20000 72982 ns/op 23802 B/op 388 allocs/op |
||||
BenchmarkParentsUntilSelection-4 10000 156099 ns/op 72453 B/op 1549 allocs/op |
||||
BenchmarkParentsUntilNodes-4 10000 156610 ns/op 72455 B/op 1549 allocs/op |
||||
BenchmarkParentsFilteredUntil-4 100000 15549 ns/op 4068 B/op 94 allocs/op |
||||
BenchmarkParentsFilteredUntilSelection-4 100000 20564 ns/op 7276 B/op 198 allocs/op |
||||
BenchmarkParentsFilteredUntilNodes-4 100000 20635 ns/op 7276 B/op 198 allocs/op |
||||
BenchmarkSiblings-4 3000 565114 ns/op 205910 B/op 336 allocs/op |
||||
BenchmarkSiblingsFiltered-4 3000 580264 ns/op 206993 B/op 345 allocs/op |
||||
BenchmarkNext-4 20000 93177 ns/op 26810 B/op 169 allocs/op |
||||
BenchmarkNextFiltered-4 20000 94171 ns/op 27013 B/op 175 allocs/op |
||||
BenchmarkNextAll-4 5000 270320 ns/op 89289 B/op 237 allocs/op |
||||
BenchmarkNextAllFiltered-4 5000 275283 ns/op 90375 B/op 246 allocs/op |
||||
BenchmarkPrev-4 20000 92777 ns/op 26810 B/op 169 allocs/op |
||||
BenchmarkPrevFiltered-4 20000 95577 ns/op 27007 B/op 175 allocs/op |
||||
BenchmarkPrevAll-4 20000 86339 ns/op 27515 B/op 151 allocs/op |
||||
BenchmarkPrevAllFiltered-4 20000 87759 ns/op 27715 B/op 157 allocs/op |
||||
BenchmarkNextUntil-4 10000 163930 ns/op 48541 B/op 330 allocs/op |
||||
BenchmarkNextUntilSelection-4 30000 56382 ns/op 23880 B/op 556 allocs/op |
||||
BenchmarkNextUntilNodes-4 100000 18883 ns/op 8703 B/op 252 allocs/op |
||||
BenchmarkPrevUntil-4 3000 484668 ns/op 145402 B/op 611 allocs/op |
||||
BenchmarkPrevUntilSelection-4 20000 72125 ns/op 28865 B/op 705 allocs/op |
||||
BenchmarkPrevUntilNodes-4 100000 14722 ns/op 6510 B/op 205 allocs/op |
||||
BenchmarkNextFilteredUntil-4 50000 39006 ns/op 10990 B/op 192 allocs/op |
||||
BenchmarkNextFilteredUntilSelection-4 20000 66048 ns/op 25641 B/op 586 allocs/op |
||||
BenchmarkNextFilteredUntilNodes-4 20000 65314 ns/op 25640 B/op 586 allocs/op |
||||
BenchmarkPrevFilteredUntil-4 50000 33312 ns/op 9709 B/op 189 allocs/op |
||||
BenchmarkPrevFilteredUntilSelection-4 20000 64197 ns/op 24981 B/op 601 allocs/op |
||||
BenchmarkPrevFilteredUntilNodes-4 20000 64505 ns/op 24982 B/op 601 allocs/op |
||||
BenchmarkClosest-4 500000 4065 ns/op 160 B/op 8 allocs/op |
||||
BenchmarkClosestSelection-4 2000000 756 ns/op 96 B/op 6 allocs/op |
||||
BenchmarkClosestNodes-4 2000000 753 ns/op 96 B/op 6 allocs/op |
||||
PASS |
||||
ok github.com/PuerkitoBio/goquery 162.053s |
@ -1,85 +0,0 @@
@@ -1,85 +0,0 @@
|
||||
BenchmarkFirst-4 30000000 51.8 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkLast-4 30000000 50.1 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkEq-4 30000000 51.4 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkSlice-4 500000000 3.52 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkGet-4 2000000000 1.65 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkIndex-4 2000000 787 ns/op 248 B/op 10 allocs/op |
||||
BenchmarkIndexSelector-4 100000 16952 ns/op 3839 B/op 21 allocs/op |
||||
BenchmarkIndexOfNode-4 200000000 6.42 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkIndexOfSelection-4 200000000 7.12 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkMetalReviewExample-4 10000 141994 ns/op 12418 B/op 320 allocs/op |
||||
BenchmarkAdd-4 200000 10367 ns/op 208 B/op 9 allocs/op |
||||
BenchmarkAddSelection-4 10000000 152 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkAddNodes-4 10000000 147 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkAndSelf-4 1000000 1647 ns/op 1008 B/op 5 allocs/op |
||||
BenchmarkFilter-4 100000 19522 ns/op 360 B/op 8 allocs/op |
||||
BenchmarkNot-4 100000 22546 ns/op 136 B/op 5 allocs/op |
||||
BenchmarkFilterFunction-4 50000 35087 ns/op 22976 B/op 755 allocs/op |
||||
BenchmarkNotFunction-4 50000 39123 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkFilterNodes-4 50000 34890 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkNotNodes-4 30000 41145 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkFilterSelection-4 50000 33735 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkNotSelection-4 30000 41334 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkHas-4 5000 264058 ns/op 2370 B/op 50 allocs/op |
||||
BenchmarkHasNodes-4 10000 151718 ns/op 21184 B/op 752 allocs/op |
||||
BenchmarkHasSelection-4 10000 156955 ns/op 21184 B/op 752 allocs/op |
||||
BenchmarkEnd-4 2000000000 1.01 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkEach-4 300000 4660 ns/op 3304 B/op 118 allocs/op |
||||
BenchmarkMap-4 200000 8404 ns/op 5572 B/op 184 allocs/op |
||||
BenchmarkEachWithBreak-4 2000000 806 ns/op 560 B/op 20 allocs/op |
||||
BenchmarkAttr-4 100000000 21.6 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkText-4 200000 8911 ns/op 7536 B/op 110 allocs/op |
||||
BenchmarkLength-4 2000000000 0.34 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkHtml-4 3000000 405 ns/op 120 B/op 2 allocs/op |
||||
BenchmarkIs-4 100000 22228 ns/op 88 B/op 4 allocs/op |
||||
BenchmarkIsPositional-4 50000 26469 ns/op 1112 B/op 10 allocs/op |
||||
BenchmarkIsFunction-4 1000000 1240 ns/op 784 B/op 28 allocs/op |
||||
BenchmarkIsSelection-4 50000 33709 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkIsNodes-4 50000 33711 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkHasClass-4 10000 236005 ns/op 14944 B/op 976 allocs/op |
||||
BenchmarkContains-4 200000000 7.47 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkFind-4 100000 16075 ns/op 3839 B/op 21 allocs/op |
||||
BenchmarkFindWithinSelection-4 30000 41418 ns/op 3539 B/op 82 allocs/op |
||||
BenchmarkFindSelection-4 10000 209490 ns/op 5616 B/op 89 allocs/op |
||||
BenchmarkFindNodes-4 10000 208206 ns/op 5614 B/op 89 allocs/op |
||||
BenchmarkContents-4 300000 4751 ns/op 1420 B/op 36 allocs/op |
||||
BenchmarkContentsFiltered-4 300000 5454 ns/op 1570 B/op 41 allocs/op |
||||
BenchmarkChildren-4 3000000 527 ns/op 152 B/op 7 allocs/op |
||||
BenchmarkChildrenFiltered-4 1000000 2484 ns/op 352 B/op 15 allocs/op |
||||
BenchmarkParent-4 50000 34724 ns/op 6940 B/op 387 allocs/op |
||||
BenchmarkParentFiltered-4 50000 35596 ns/op 7141 B/op 394 allocs/op |
||||
BenchmarkParents-4 20000 62094 ns/op 30720 B/op 837 allocs/op |
||||
BenchmarkParentsFiltered-4 20000 63223 ns/op 31304 B/op 845 allocs/op |
||||
BenchmarkParentsUntil-4 50000 30391 ns/op 11828 B/op 358 allocs/op |
||||
BenchmarkParentsUntilSelection-4 20000 99962 ns/op 54075 B/op 1523 allocs/op |
||||
BenchmarkParentsUntilNodes-4 20000 98763 ns/op 54073 B/op 1523 allocs/op |
||||
BenchmarkParentsFilteredUntil-4 200000 7982 ns/op 2787 B/op 88 allocs/op |
||||
BenchmarkParentsFilteredUntilSelection-4 100000 13618 ns/op 5995 B/op 192 allocs/op |
||||
BenchmarkParentsFilteredUntilNodes-4 100000 13639 ns/op 5994 B/op 192 allocs/op |
||||
BenchmarkSiblings-4 20000 75287 ns/op 28453 B/op 225 allocs/op |
||||
BenchmarkSiblingsFiltered-4 20000 80139 ns/op 29543 B/op 234 allocs/op |
||||
BenchmarkNext-4 100000 14270 ns/op 4659 B/op 117 allocs/op |
||||
BenchmarkNextFiltered-4 100000 15352 ns/op 4860 B/op 123 allocs/op |
||||
BenchmarkNextAll-4 20000 60811 ns/op 22771 B/op 157 allocs/op |
||||
BenchmarkNextAllFiltered-4 20000 69079 ns/op 23871 B/op 166 allocs/op |
||||
BenchmarkPrev-4 100000 14417 ns/op 4659 B/op 117 allocs/op |
||||
BenchmarkPrevFiltered-4 100000 15443 ns/op 4859 B/op 123 allocs/op |
||||
BenchmarkPrevAll-4 100000 22008 ns/op 7346 B/op 120 allocs/op |
||||
BenchmarkPrevAllFiltered-4 100000 23212 ns/op 7544 B/op 126 allocs/op |
||||
BenchmarkNextUntil-4 50000 30589 ns/op 8767 B/op 267 allocs/op |
||||
BenchmarkNextUntilSelection-4 30000 40875 ns/op 19862 B/op 546 allocs/op |
||||
BenchmarkNextUntilNodes-4 100000 15987 ns/op 8134 B/op 249 allocs/op |
||||
BenchmarkPrevUntil-4 20000 98799 ns/op 25727 B/op 467 allocs/op |
||||
BenchmarkPrevUntilSelection-4 30000 51874 ns/op 24875 B/op 694 allocs/op |
||||
BenchmarkPrevUntilNodes-4 100000 12901 ns/op 6334 B/op 204 allocs/op |
||||
BenchmarkNextFilteredUntil-4 100000 19869 ns/op 5909 B/op 177 allocs/op |
||||
BenchmarkNextFilteredUntilSelection-4 30000 45412 ns/op 20557 B/op 571 allocs/op |
||||
BenchmarkNextFilteredUntilNodes-4 30000 45363 ns/op 20557 B/op 571 allocs/op |
||||
BenchmarkPrevFilteredUntil-4 100000 19357 ns/op 6033 B/op 179 allocs/op |
||||
BenchmarkPrevFilteredUntilSelection-4 30000 46396 ns/op 21305 B/op 591 allocs/op |
||||
BenchmarkPrevFilteredUntilNodes-4 30000 46133 ns/op 21305 B/op 591 allocs/op |
||||
BenchmarkClosest-4 500000 3448 ns/op 160 B/op 8 allocs/op |
||||
BenchmarkClosestSelection-4 3000000 528 ns/op 96 B/op 6 allocs/op |
||||
BenchmarkClosestNodes-4 3000000 523 ns/op 96 B/op 6 allocs/op |
||||
PASS |
||||
ok github.com/PuerkitoBio/goquery 162.012s |
@ -1,86 +0,0 @@
@@ -1,86 +0,0 @@
|
||||
BenchmarkFirst-4 30000000 51.7 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkLast-4 30000000 51.9 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkEq-4 30000000 50.0 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkSlice-4 500000000 3.47 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkGet-4 2000000000 1.68 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkIndex-4 2000000 804 ns/op 248 B/op 10 allocs/op |
||||
BenchmarkIndexSelector-4 100000 16285 ns/op 3839 B/op 21 allocs/op |
||||
BenchmarkIndexOfNode-4 200000000 6.50 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkIndexOfSelection-4 200000000 7.02 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkMetalReviewExample-4 10000 143160 ns/op 12417 B/op 320 allocs/op |
||||
BenchmarkAdd-4 200000 10326 ns/op 208 B/op 9 allocs/op |
||||
BenchmarkAddSelection-4 10000000 155 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkAddNodes-4 10000000 156 ns/op 48 B/op 1 allocs/op |
||||
BenchmarkAddNodesBig-4 20000 94439 ns/op 21847 B/op 37 allocs/op |
||||
BenchmarkAndSelf-4 1000000 1791 ns/op 1008 B/op 5 allocs/op |
||||
BenchmarkFilter-4 100000 19470 ns/op 360 B/op 8 allocs/op |
||||
BenchmarkNot-4 100000 22500 ns/op 136 B/op 5 allocs/op |
||||
BenchmarkFilterFunction-4 50000 34578 ns/op 22976 B/op 755 allocs/op |
||||
BenchmarkNotFunction-4 50000 38703 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkFilterNodes-4 50000 34486 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkNotNodes-4 30000 41094 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkFilterSelection-4 50000 33623 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkNotSelection-4 30000 41483 ns/op 29120 B/op 757 allocs/op |
||||
BenchmarkHas-4 5000 266628 ns/op 2371 B/op 50 allocs/op |
||||
BenchmarkHasNodes-4 10000 152617 ns/op 21184 B/op 752 allocs/op |
||||
BenchmarkHasSelection-4 10000 156682 ns/op 21184 B/op 752 allocs/op |
||||
BenchmarkEnd-4 2000000000 1.00 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkEach-4 300000 4712 ns/op 3304 B/op 118 allocs/op |
||||
BenchmarkMap-4 200000 8434 ns/op 5572 B/op 184 allocs/op |
||||
BenchmarkEachWithBreak-4 2000000 819 ns/op 560 B/op 20 allocs/op |
||||
BenchmarkAttr-4 100000000 21.7 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkText-4 200000 9376 ns/op 7536 B/op 110 allocs/op |
||||
BenchmarkLength-4 2000000000 0.35 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkHtml-4 5000000 401 ns/op 120 B/op 2 allocs/op |
||||
BenchmarkIs-4 100000 22214 ns/op 88 B/op 4 allocs/op |
||||
BenchmarkIsPositional-4 50000 26559 ns/op 1112 B/op 10 allocs/op |
||||
BenchmarkIsFunction-4 1000000 1228 ns/op 784 B/op 28 allocs/op |
||||
BenchmarkIsSelection-4 50000 33471 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkIsNodes-4 50000 34461 ns/op 20960 B/op 749 allocs/op |
||||
BenchmarkHasClass-4 10000 232429 ns/op 14944 B/op 976 allocs/op |
||||
BenchmarkContains-4 200000000 7.62 ns/op 0 B/op 0 allocs/op |
||||
BenchmarkFind-4 100000 16114 ns/op 3839 B/op 21 allocs/op |
||||
BenchmarkFindWithinSelection-4 30000 42520 ns/op 3540 B/op 82 allocs/op |
||||
BenchmarkFindSelection-4 10000 209801 ns/op 5615 B/op 89 allocs/op |
||||
BenchmarkFindNodes-4 10000 209082 ns/op 5614 B/op 89 allocs/op |
||||
BenchmarkContents-4 300000 4836 ns/op 1420 B/op 36 allocs/op |
||||
BenchmarkContentsFiltered-4 200000 5495 ns/op 1570 B/op 41 allocs/op |
||||
BenchmarkChildren-4 3000000 527 ns/op 152 B/op 7 allocs/op |
||||
BenchmarkChildrenFiltered-4 500000 2499 ns/op 352 B/op 15 allocs/op |
||||
BenchmarkParent-4 50000 34072 ns/op 6942 B/op 387 allocs/op |
||||
BenchmarkParentFiltered-4 50000 36077 ns/op 7141 B/op 394 allocs/op |
||||
BenchmarkParents-4 20000 64118 ns/op 30719 B/op 837 allocs/op |
||||
BenchmarkParentsFiltered-4 20000 63432 ns/op 31303 B/op 845 allocs/op |
||||
BenchmarkParentsUntil-4 50000 29589 ns/op 11829 B/op 358 allocs/op |
||||
BenchmarkParentsUntilSelection-4 10000 101033 ns/op 54076 B/op 1523 allocs/op |
||||
BenchmarkParentsUntilNodes-4 10000 100584 ns/op 54076 B/op 1523 allocs/op |
||||
BenchmarkParentsFilteredUntil-4 200000 8061 ns/op 2787 B/op 88 allocs/op |
||||
BenchmarkParentsFilteredUntilSelection-4 100000 13848 ns/op 5995 B/op 192 allocs/op |
||||
BenchmarkParentsFilteredUntilNodes-4 100000 13766 ns/op 5995 B/op 192 allocs/op |
||||
BenchmarkSiblings-4 20000 75135 ns/op 28453 B/op 225 allocs/op |
||||
BenchmarkSiblingsFiltered-4 20000 80532 ns/op 29544 B/op 234 allocs/op |
||||
BenchmarkNext-4 100000 14200 ns/op 4660 B/op 117 allocs/op |
||||
BenchmarkNextFiltered-4 100000 15284 ns/op 4859 B/op 123 allocs/op |
||||
BenchmarkNextAll-4 20000 60889 ns/op 22774 B/op 157 allocs/op |
||||
BenchmarkNextAllFiltered-4 20000 65125 ns/op 23869 B/op 166 allocs/op |
||||
BenchmarkPrev-4 100000 14448 ns/op 4659 B/op 117 allocs/op |
||||
BenchmarkPrevFiltered-4 100000 15444 ns/op 4859 B/op 123 allocs/op |
||||
BenchmarkPrevAll-4 100000 22019 ns/op 7344 B/op 120 allocs/op |
||||
BenchmarkPrevAllFiltered-4 100000 23307 ns/op 7545 B/op 126 allocs/op |
||||
BenchmarkNextUntil-4 50000 30287 ns/op 8766 B/op 267 allocs/op |
||||
BenchmarkNextUntilSelection-4 30000 41476 ns/op 19862 B/op 546 allocs/op |
||||
BenchmarkNextUntilNodes-4 100000 16106 ns/op 8133 B/op 249 allocs/op |
||||
BenchmarkPrevUntil-4 20000 98951 ns/op 25728 B/op 467 allocs/op |
||||
BenchmarkPrevUntilSelection-4 30000 52390 ns/op 24875 B/op 694 allocs/op |
||||
BenchmarkPrevUntilNodes-4 100000 12986 ns/op 6334 B/op 204 allocs/op |
||||
BenchmarkNextFilteredUntil-4 100000 19365 ns/op 5908 B/op 177 allocs/op |
||||
BenchmarkNextFilteredUntilSelection-4 30000 45334 ns/op 20555 B/op 571 allocs/op |
||||
BenchmarkNextFilteredUntilNodes-4 30000 45292 ns/op 20556 B/op 571 allocs/op |
||||
BenchmarkPrevFilteredUntil-4 100000 19412 ns/op 6032 B/op 179 allocs/op |
||||
BenchmarkPrevFilteredUntilSelection-4 30000 46286 ns/op 21304 B/op 591 allocs/op |
||||
BenchmarkPrevFilteredUntilNodes-4 30000 46554 ns/op 21305 B/op 591 allocs/op |
||||
BenchmarkClosest-4 500000 3480 ns/op 160 B/op 8 allocs/op |
||||
BenchmarkClosestSelection-4 2000000 722 ns/op 96 B/op 6 allocs/op |
||||
BenchmarkClosestNodes-4 2000000 719 ns/op 96 B/op 6 allocs/op |
||||
PASS |
||||
ok github.com/PuerkitoBio/goquery 160.565s |
@ -1,120 +0,0 @@
@@ -1,120 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func BenchmarkFirst(b *testing.B) { |
||||
b.StopTimer() |
||||
sel := DocB().Find("dd") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
sel.First() |
||||
} |
||||
} |
||||
|
||||
func BenchmarkLast(b *testing.B) { |
||||
b.StopTimer() |
||||
sel := DocB().Find("dd") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
sel.Last() |
||||
} |
||||
} |
||||
|
||||
func BenchmarkEq(b *testing.B) { |
||||
b.StopTimer() |
||||
sel := DocB().Find("dd") |
||||
j := 0 |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
sel.Eq(j) |
||||
if j++; j >= sel.Length() { |
||||
j = 0 |
||||
} |
||||
} |
||||
} |
||||
|
||||
func BenchmarkSlice(b *testing.B) { |
||||
b.StopTimer() |
||||
sel := DocB().Find("dd") |
||||
j := 0 |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
sel.Slice(j, j+4) |
||||
if j++; j >= (sel.Length() - 4) { |
||||
j = 0 |
||||
} |
||||
} |
||||
} |
||||
|
||||
func BenchmarkGet(b *testing.B) { |
||||
b.StopTimer() |
||||
sel := DocB().Find("dd") |
||||
j := 0 |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
sel.Get(j) |
||||
if j++; j >= sel.Length() { |
||||
j = 0 |
||||
} |
||||
} |
||||
} |
||||
|
||||
func BenchmarkIndex(b *testing.B) { |
||||
var j int |
||||
|
||||
b.StopTimer() |
||||
sel := DocB().Find("#Main") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
j = sel.Index() |
||||
} |
||||
if j != 3 { |
||||
b.Fatalf("want 3, got %d", j) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkIndexSelector(b *testing.B) { |
||||
var j int |
||||
|
||||
b.StopTimer() |
||||
sel := DocB().Find("#manual-nav dl dd:nth-child(1)") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
j = sel.IndexSelector("dd") |
||||
} |
||||
if j != 4 { |
||||
b.Fatalf("want 4, got %d", j) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkIndexOfNode(b *testing.B) { |
||||
var j int |
||||
|
||||
b.StopTimer() |
||||
sel := DocB().Find("span a") |
||||
sel2 := DocB().Find("span a:nth-child(3)") |
||||
n := sel2.Get(0) |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
j = sel.IndexOfNode(n) |
||||
} |
||||
if j != 2 { |
||||
b.Fatalf("want 2, got %d", j) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkIndexOfSelection(b *testing.B) { |
||||
var j int |
||||
b.StopTimer() |
||||
sel := DocB().Find("span a") |
||||
sel2 := DocB().Find("span a:nth-child(3)") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
j = sel.IndexOfSelection(sel2) |
||||
} |
||||
if j != 2 { |
||||
b.Fatalf("want 2, got %d", j) |
||||
} |
||||
} |
@ -1,40 +0,0 @@
@@ -1,40 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"bytes" |
||||
"fmt" |
||||
"strconv" |
||||
"testing" |
||||
) |
||||
|
||||
func BenchmarkMetalReviewExample(b *testing.B) { |
||||
var n int |
||||
var buf bytes.Buffer |
||||
|
||||
b.StopTimer() |
||||
doc := loadDoc("metalreview.html") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
doc.Find(".slider-row:nth-child(1) .slider-item").Each(func(i int, s *Selection) { |
||||
var band, title string |
||||
var score float64 |
||||
var e error |
||||
|
||||
n++ |
||||
// For each item found, get the band, title and score, and print it
|
||||
band = s.Find("strong").Text() |
||||
title = s.Find("em").Text() |
||||
if score, e = strconv.ParseFloat(s.Find(".score").Text(), 64); e != nil { |
||||
// Not a valid float, ignore score
|
||||
if n <= 4 { |
||||
buf.WriteString(fmt.Sprintf("Review %d: %s - %s.\n", i, band, title)) |
||||
} |
||||
} else { |
||||
// Print all, including score
|
||||
if n <= 4 { |
||||
buf.WriteString(fmt.Sprintf("Review %d: %s - %s (%2.1f).\n", i, band, title, score)) |
||||
} |
||||
} |
||||
}) |
||||
} |
||||
} |
@ -1,104 +0,0 @@
@@ -1,104 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func BenchmarkAdd(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocB().Find("dd") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Add("h2[title]").Length() |
||||
} else { |
||||
sel.Add("h2[title]") |
||||
} |
||||
} |
||||
if n != 43 { |
||||
b.Fatalf("want 43, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkAddSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocB().Find("dd") |
||||
sel2 := DocB().Find("h2[title]") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.AddSelection(sel2).Length() |
||||
} else { |
||||
sel.AddSelection(sel2) |
||||
} |
||||
} |
||||
if n != 43 { |
||||
b.Fatalf("want 43, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkAddNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocB().Find("dd") |
||||
sel2 := DocB().Find("h2[title]") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.AddNodes(nodes...).Length() |
||||
} else { |
||||
sel.AddNodes(nodes...) |
||||
} |
||||
} |
||||
if n != 43 { |
||||
b.Fatalf("want 43, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkAddNodesBig(b *testing.B) { |
||||
var n int |
||||
|
||||
doc := DocW() |
||||
sel := doc.Find("li") |
||||
// make nodes > 1000
|
||||
nodes := sel.Nodes |
||||
nodes = append(nodes, nodes...) |
||||
nodes = append(nodes, nodes...) |
||||
sel = doc.Find("xyz") |
||||
b.ResetTimer() |
||||
|
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.AddNodes(nodes...).Length() |
||||
} else { |
||||
sel.AddNodes(nodes...) |
||||
} |
||||
} |
||||
if n != 373 { |
||||
b.Fatalf("want 373, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkAndSelf(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocB().Find("dd").Parent() |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.AndSelf().Length() |
||||
} else { |
||||
sel.AndSelf() |
||||
} |
||||
} |
||||
if n != 44 { |
||||
b.Fatalf("want 44, got %d", n) |
||||
} |
||||
} |
@ -1,236 +0,0 @@
@@ -1,236 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func BenchmarkFilter(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Filter(".toclevel-1").Length() |
||||
} else { |
||||
sel.Filter(".toclevel-1") |
||||
} |
||||
} |
||||
if n != 13 { |
||||
b.Fatalf("want 13, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNot(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Not(".toclevel-2").Length() |
||||
} else { |
||||
sel.Filter(".toclevel-2") |
||||
} |
||||
} |
||||
if n != 371 { |
||||
b.Fatalf("want 371, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkFilterFunction(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
f := func(i int, s *Selection) bool { |
||||
return len(s.Get(0).Attr) > 0 |
||||
} |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.FilterFunction(f).Length() |
||||
} else { |
||||
sel.FilterFunction(f) |
||||
} |
||||
} |
||||
if n != 112 { |
||||
b.Fatalf("want 112, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNotFunction(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
f := func(i int, s *Selection) bool { |
||||
return len(s.Get(0).Attr) > 0 |
||||
} |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NotFunction(f).Length() |
||||
} else { |
||||
sel.NotFunction(f) |
||||
} |
||||
} |
||||
if n != 261 { |
||||
b.Fatalf("want 261, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkFilterNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
sel2 := DocW().Find(".toclevel-2") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.FilterNodes(nodes...).Length() |
||||
} else { |
||||
sel.FilterNodes(nodes...) |
||||
} |
||||
} |
||||
if n != 2 { |
||||
b.Fatalf("want 2, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNotNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
sel2 := DocW().Find(".toclevel-1") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NotNodes(nodes...).Length() |
||||
} else { |
||||
sel.NotNodes(nodes...) |
||||
} |
||||
} |
||||
if n != 360 { |
||||
b.Fatalf("want 360, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkFilterSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
sel2 := DocW().Find(".toclevel-2") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.FilterSelection(sel2).Length() |
||||
} else { |
||||
sel.FilterSelection(sel2) |
||||
} |
||||
} |
||||
if n != 2 { |
||||
b.Fatalf("want 2, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNotSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
sel2 := DocW().Find(".toclevel-1") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NotSelection(sel2).Length() |
||||
} else { |
||||
sel.NotSelection(sel2) |
||||
} |
||||
} |
||||
if n != 360 { |
||||
b.Fatalf("want 360, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkHas(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Has(".editsection").Length() |
||||
} else { |
||||
sel.Has(".editsection") |
||||
} |
||||
} |
||||
if n != 13 { |
||||
b.Fatalf("want 13, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkHasNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
sel2 := DocW().Find(".tocnumber") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.HasNodes(nodes...).Length() |
||||
} else { |
||||
sel.HasNodes(nodes...) |
||||
} |
||||
} |
||||
if n != 15 { |
||||
b.Fatalf("want 15, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkHasSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
sel2 := DocW().Find(".tocnumber") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.HasSelection(sel2).Length() |
||||
} else { |
||||
sel.HasSelection(sel2) |
||||
} |
||||
} |
||||
if n != 15 { |
||||
b.Fatalf("want 15, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkEnd(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li").Has(".tocnumber") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.End().Length() |
||||
} else { |
||||
sel.End() |
||||
} |
||||
} |
||||
if n != 373 { |
||||
b.Fatalf("want 373, got %d", n) |
||||
} |
||||
} |
@ -1,68 +0,0 @@
@@ -1,68 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func BenchmarkEach(b *testing.B) { |
||||
var tmp, n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("td") |
||||
f := func(i int, s *Selection) { |
||||
tmp++ |
||||
} |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
sel.Each(f) |
||||
if n == 0 { |
||||
n = tmp |
||||
} |
||||
} |
||||
if n != 59 { |
||||
b.Fatalf("want 59, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkMap(b *testing.B) { |
||||
var tmp, n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("td") |
||||
f := func(i int, s *Selection) string { |
||||
tmp++ |
||||
return string(tmp) |
||||
} |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
sel.Map(f) |
||||
if n == 0 { |
||||
n = tmp |
||||
} |
||||
} |
||||
if n != 59 { |
||||
b.Fatalf("want 59, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkEachWithBreak(b *testing.B) { |
||||
var tmp, n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("td") |
||||
f := func(i int, s *Selection) bool { |
||||
tmp++ |
||||
return tmp < 10 |
||||
} |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
tmp = 0 |
||||
sel.EachWithBreak(f) |
||||
if n == 0 { |
||||
n = tmp |
||||
} |
||||
} |
||||
if n != 10 { |
||||
b.Fatalf("want 10, got %d", n) |
||||
} |
||||
} |
@ -1,51 +0,0 @@
@@ -1,51 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func BenchmarkAttr(b *testing.B) { |
||||
var s string |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h1") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
s, _ = sel.Attr("id") |
||||
} |
||||
if s != "firstHeading" { |
||||
b.Fatalf("want firstHeading, got %q", s) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkText(b *testing.B) { |
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
sel.Text() |
||||
} |
||||
} |
||||
|
||||
func BenchmarkLength(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
n = sel.Length() |
||||
} |
||||
if n != 14 { |
||||
b.Fatalf("want 14, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkHtml(b *testing.B) { |
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
sel.Html() |
||||
} |
||||
} |
@ -1,111 +0,0 @@
@@ -1,111 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func BenchmarkIs(b *testing.B) { |
||||
var y bool |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
y = sel.Is(".toclevel-2") |
||||
} |
||||
if !y { |
||||
b.Fatal("want true") |
||||
} |
||||
} |
||||
|
||||
func BenchmarkIsPositional(b *testing.B) { |
||||
var y bool |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
y = sel.Is("li:nth-child(2)") |
||||
} |
||||
if !y { |
||||
b.Fatal("want true") |
||||
} |
||||
} |
||||
|
||||
func BenchmarkIsFunction(b *testing.B) { |
||||
var y bool |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find(".toclevel-1") |
||||
f := func(i int, s *Selection) bool { |
||||
return i == 8 |
||||
} |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
y = sel.IsFunction(f) |
||||
} |
||||
if !y { |
||||
b.Fatal("want true") |
||||
} |
||||
} |
||||
|
||||
func BenchmarkIsSelection(b *testing.B) { |
||||
var y bool |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
sel2 := DocW().Find(".toclevel-2") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
y = sel.IsSelection(sel2) |
||||
} |
||||
if !y { |
||||
b.Fatal("want true") |
||||
} |
||||
} |
||||
|
||||
func BenchmarkIsNodes(b *testing.B) { |
||||
var y bool |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
sel2 := DocW().Find(".toclevel-2") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
y = sel.IsNodes(nodes...) |
||||
} |
||||
if !y { |
||||
b.Fatal("want true") |
||||
} |
||||
} |
||||
|
||||
func BenchmarkHasClass(b *testing.B) { |
||||
var y bool |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("span") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
y = sel.HasClass("official") |
||||
} |
||||
if !y { |
||||
b.Fatal("want true") |
||||
} |
||||
} |
||||
|
||||
func BenchmarkContains(b *testing.B) { |
||||
var y bool |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("span.url") |
||||
sel2 := DocW().Find("a[rel=\"nofollow\"]") |
||||
node := sel2.Nodes[0] |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
y = sel.Contains(node) |
||||
} |
||||
if !y { |
||||
b.Fatal("want true") |
||||
} |
||||
} |
@ -1,802 +0,0 @@
@@ -1,802 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func BenchmarkFind(b *testing.B) { |
||||
var n int |
||||
|
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = DocB().Find("dd").Length() |
||||
|
||||
} else { |
||||
DocB().Find("dd") |
||||
} |
||||
} |
||||
if n != 41 { |
||||
b.Fatalf("want 41, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkFindWithinSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("ul") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Find("a[class]").Length() |
||||
} else { |
||||
sel.Find("a[class]") |
||||
} |
||||
} |
||||
if n != 39 { |
||||
b.Fatalf("want 39, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkFindSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("ul") |
||||
sel2 := DocW().Find("span") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.FindSelection(sel2).Length() |
||||
} else { |
||||
sel.FindSelection(sel2) |
||||
} |
||||
} |
||||
if n != 73 { |
||||
b.Fatalf("want 73, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkFindNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("ul") |
||||
sel2 := DocW().Find("span") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.FindNodes(nodes...).Length() |
||||
} else { |
||||
sel.FindNodes(nodes...) |
||||
} |
||||
} |
||||
if n != 73 { |
||||
b.Fatalf("want 73, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkContents(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find(".toclevel-1") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Contents().Length() |
||||
} else { |
||||
sel.Contents() |
||||
} |
||||
} |
||||
if n != 16 { |
||||
b.Fatalf("want 16, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkContentsFiltered(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find(".toclevel-1") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ContentsFiltered("a[href=\"#Examples\"]").Length() |
||||
} else { |
||||
sel.ContentsFiltered("a[href=\"#Examples\"]") |
||||
} |
||||
} |
||||
if n != 1 { |
||||
b.Fatalf("want 1, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkChildren(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find(".toclevel-2") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Children().Length() |
||||
} else { |
||||
sel.Children() |
||||
} |
||||
} |
||||
if n != 2 { |
||||
b.Fatalf("want 2, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkChildrenFiltered(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h3") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ChildrenFiltered(".editsection").Length() |
||||
} else { |
||||
sel.ChildrenFiltered(".editsection") |
||||
} |
||||
} |
||||
if n != 2 { |
||||
b.Fatalf("want 2, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkParent(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Parent().Length() |
||||
} else { |
||||
sel.Parent() |
||||
} |
||||
} |
||||
if n != 55 { |
||||
b.Fatalf("want 55, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkParentFiltered(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ParentFiltered("ul[id]").Length() |
||||
} else { |
||||
sel.ParentFiltered("ul[id]") |
||||
} |
||||
} |
||||
if n != 4 { |
||||
b.Fatalf("want 4, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkParents(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("th a") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Parents().Length() |
||||
} else { |
||||
sel.Parents() |
||||
} |
||||
} |
||||
if n != 73 { |
||||
b.Fatalf("want 73, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkParentsFiltered(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("th a") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ParentsFiltered("tr").Length() |
||||
} else { |
||||
sel.ParentsFiltered("tr") |
||||
} |
||||
} |
||||
if n != 18 { |
||||
b.Fatalf("want 18, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkParentsUntil(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("th a") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ParentsUntil("table").Length() |
||||
} else { |
||||
sel.ParentsUntil("table") |
||||
} |
||||
} |
||||
if n != 52 { |
||||
b.Fatalf("want 52, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkParentsUntilSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("th a") |
||||
sel2 := DocW().Find("#content") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ParentsUntilSelection(sel2).Length() |
||||
} else { |
||||
sel.ParentsUntilSelection(sel2) |
||||
} |
||||
} |
||||
if n != 70 { |
||||
b.Fatalf("want 70, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkParentsUntilNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("th a") |
||||
sel2 := DocW().Find("#content") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ParentsUntilNodes(nodes...).Length() |
||||
} else { |
||||
sel.ParentsUntilNodes(nodes...) |
||||
} |
||||
} |
||||
if n != 70 { |
||||
b.Fatalf("want 70, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkParentsFilteredUntil(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find(".toclevel-1 a") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ParentsFilteredUntil(":nth-child(1)", "ul").Length() |
||||
} else { |
||||
sel.ParentsFilteredUntil(":nth-child(1)", "ul") |
||||
} |
||||
} |
||||
if n != 2 { |
||||
b.Fatalf("want 2, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkParentsFilteredUntilSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find(".toclevel-1 a") |
||||
sel2 := DocW().Find("ul") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ParentsFilteredUntilSelection(":nth-child(1)", sel2).Length() |
||||
} else { |
||||
sel.ParentsFilteredUntilSelection(":nth-child(1)", sel2) |
||||
} |
||||
} |
||||
if n != 2 { |
||||
b.Fatalf("want 2, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkParentsFilteredUntilNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find(".toclevel-1 a") |
||||
sel2 := DocW().Find("ul") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ParentsFilteredUntilNodes(":nth-child(1)", nodes...).Length() |
||||
} else { |
||||
sel.ParentsFilteredUntilNodes(":nth-child(1)", nodes...) |
||||
} |
||||
} |
||||
if n != 2 { |
||||
b.Fatalf("want 2, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkSiblings(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("ul li:nth-child(1)") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Siblings().Length() |
||||
} else { |
||||
sel.Siblings() |
||||
} |
||||
} |
||||
if n != 293 { |
||||
b.Fatalf("want 293, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkSiblingsFiltered(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("ul li:nth-child(1)") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.SiblingsFiltered("[class]").Length() |
||||
} else { |
||||
sel.SiblingsFiltered("[class]") |
||||
} |
||||
} |
||||
if n != 46 { |
||||
b.Fatalf("want 46, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNext(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li:nth-child(1)") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Next().Length() |
||||
} else { |
||||
sel.Next() |
||||
} |
||||
} |
||||
if n != 49 { |
||||
b.Fatalf("want 49, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNextFiltered(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li:nth-child(1)") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NextFiltered("[class]").Length() |
||||
} else { |
||||
sel.NextFiltered("[class]") |
||||
} |
||||
} |
||||
if n != 6 { |
||||
b.Fatalf("want 6, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNextAll(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li:nth-child(3)") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NextAll().Length() |
||||
} else { |
||||
sel.NextAll() |
||||
} |
||||
} |
||||
if n != 234 { |
||||
b.Fatalf("want 234, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNextAllFiltered(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li:nth-child(3)") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NextAllFiltered("[class]").Length() |
||||
} else { |
||||
sel.NextAllFiltered("[class]") |
||||
} |
||||
} |
||||
if n != 33 { |
||||
b.Fatalf("want 33, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkPrev(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li:last-child") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Prev().Length() |
||||
} else { |
||||
sel.Prev() |
||||
} |
||||
} |
||||
if n != 49 { |
||||
b.Fatalf("want 49, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkPrevFiltered(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li:last-child") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.PrevFiltered("[class]").Length() |
||||
} else { |
||||
sel.PrevFiltered("[class]") |
||||
} |
||||
} |
||||
// There is one more Prev li with a class, compared to Next li with a class
|
||||
// (confirmed by looking at the HTML, this is ok)
|
||||
if n != 7 { |
||||
b.Fatalf("want 7, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkPrevAll(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li:nth-child(4)") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.PrevAll().Length() |
||||
} else { |
||||
sel.PrevAll() |
||||
} |
||||
} |
||||
if n != 78 { |
||||
b.Fatalf("want 78, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkPrevAllFiltered(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li:nth-child(4)") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.PrevAllFiltered("[class]").Length() |
||||
} else { |
||||
sel.PrevAllFiltered("[class]") |
||||
} |
||||
} |
||||
if n != 6 { |
||||
b.Fatalf("want 6, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNextUntil(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li:first-child") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NextUntil(":nth-child(4)").Length() |
||||
} else { |
||||
sel.NextUntil(":nth-child(4)") |
||||
} |
||||
} |
||||
if n != 84 { |
||||
b.Fatalf("want 84, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNextUntilSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
sel2 := DocW().Find("ul") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NextUntilSelection(sel2).Length() |
||||
} else { |
||||
sel.NextUntilSelection(sel2) |
||||
} |
||||
} |
||||
if n != 42 { |
||||
b.Fatalf("want 42, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNextUntilNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
sel2 := DocW().Find("p") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NextUntilNodes(nodes...).Length() |
||||
} else { |
||||
sel.NextUntilNodes(nodes...) |
||||
} |
||||
} |
||||
if n != 12 { |
||||
b.Fatalf("want 12, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkPrevUntil(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("li:last-child") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.PrevUntil(":nth-child(4)").Length() |
||||
} else { |
||||
sel.PrevUntil(":nth-child(4)") |
||||
} |
||||
} |
||||
if n != 238 { |
||||
b.Fatalf("want 238, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkPrevUntilSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
sel2 := DocW().Find("ul") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.PrevUntilSelection(sel2).Length() |
||||
} else { |
||||
sel.PrevUntilSelection(sel2) |
||||
} |
||||
} |
||||
if n != 49 { |
||||
b.Fatalf("want 49, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkPrevUntilNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
sel2 := DocW().Find("p") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.PrevUntilNodes(nodes...).Length() |
||||
} else { |
||||
sel.PrevUntilNodes(nodes...) |
||||
} |
||||
} |
||||
if n != 11 { |
||||
b.Fatalf("want 11, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNextFilteredUntil(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NextFilteredUntil("p", "div").Length() |
||||
} else { |
||||
sel.NextFilteredUntil("p", "div") |
||||
} |
||||
} |
||||
if n != 22 { |
||||
b.Fatalf("want 22, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNextFilteredUntilSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
sel2 := DocW().Find("div") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NextFilteredUntilSelection("p", sel2).Length() |
||||
} else { |
||||
sel.NextFilteredUntilSelection("p", sel2) |
||||
} |
||||
} |
||||
if n != 22 { |
||||
b.Fatalf("want 22, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkNextFilteredUntilNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
sel2 := DocW().Find("div") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.NextFilteredUntilNodes("p", nodes...).Length() |
||||
} else { |
||||
sel.NextFilteredUntilNodes("p", nodes...) |
||||
} |
||||
} |
||||
if n != 22 { |
||||
b.Fatalf("want 22, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkPrevFilteredUntil(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.PrevFilteredUntil("p", "div").Length() |
||||
} else { |
||||
sel.PrevFilteredUntil("p", "div") |
||||
} |
||||
} |
||||
if n != 20 { |
||||
b.Fatalf("want 20, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkPrevFilteredUntilSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
sel2 := DocW().Find("div") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.PrevFilteredUntilSelection("p", sel2).Length() |
||||
} else { |
||||
sel.PrevFilteredUntilSelection("p", sel2) |
||||
} |
||||
} |
||||
if n != 20 { |
||||
b.Fatalf("want 20, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkPrevFilteredUntilNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := DocW().Find("h2") |
||||
sel2 := DocW().Find("div") |
||||
nodes := sel2.Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.PrevFilteredUntilNodes("p", nodes...).Length() |
||||
} else { |
||||
sel.PrevFilteredUntilNodes("p", nodes...) |
||||
} |
||||
} |
||||
if n != 20 { |
||||
b.Fatalf("want 20, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkClosest(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := Doc().Find(".container-fluid") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.Closest(".pvk-content").Length() |
||||
} else { |
||||
sel.Closest(".pvk-content") |
||||
} |
||||
} |
||||
if n != 2 { |
||||
b.Fatalf("want 2, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkClosestSelection(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := Doc().Find(".container-fluid") |
||||
sel2 := Doc().Find(".pvk-content") |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ClosestSelection(sel2).Length() |
||||
} else { |
||||
sel.ClosestSelection(sel2) |
||||
} |
||||
} |
||||
if n != 2 { |
||||
b.Fatalf("want 2, got %d", n) |
||||
} |
||||
} |
||||
|
||||
func BenchmarkClosestNodes(b *testing.B) { |
||||
var n int |
||||
|
||||
b.StopTimer() |
||||
sel := Doc().Find(".container-fluid") |
||||
nodes := Doc().Find(".pvk-content").Nodes |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
if n == 0 { |
||||
n = sel.ClosestNodes(nodes...).Length() |
||||
} else { |
||||
sel.ClosestNodes(nodes...) |
||||
} |
||||
} |
||||
if n != 2 { |
||||
b.Fatalf("want 2, got %d", n) |
||||
} |
||||
} |
@ -1,68 +0,0 @@
@@ -1,68 +0,0 @@
|
||||
# Tips and tricks |
||||
|
||||
## Handle Non-UTF8 html Pages |
||||
|
||||
The `go.net/html` package used by `goquery` requires that the html document is UTF-8 encoded. When you know the encoding of the html page is not UTF-8, you can use the `iconv` package to convert it to UTF-8 (there are various implementation of the `iconv` API, see [godoc.org][iconv] for other options): |
||||
|
||||
``` |
||||
$ go get -u github.com/djimenez/iconv-go |
||||
``` |
||||
|
||||
and then: |
||||
|
||||
``` |
||||
// Load the URL |
||||
res, err := http.Get(url) |
||||
if err != nil { |
||||
// handle error |
||||
} |
||||
defer res.Body.Close() |
||||
|
||||
// Convert the designated charset HTML to utf-8 encoded HTML. |
||||
// `charset` being one of the charsets known by the iconv package. |
||||
utfBody, err := iconv.NewReader(res.Body, charset, "utf-8") |
||||
if err != nil { |
||||
// handler error |
||||
} |
||||
|
||||
// use utfBody using goquery |
||||
doc, err := goquery.NewDocumentFromReader(utfBody) |
||||
if err != nil { |
||||
// handler error |
||||
} |
||||
// use doc... |
||||
``` |
||||
|
||||
Thanks to github user @YuheiNakasaka. |
||||
|
||||
Actually, the official go.text repository covers this use case too, see its [godoc page][text] for the details. |
||||
|
||||
|
||||
## Handle Javascript-based Pages |
||||
|
||||
`goquery` is great to handle normal html pages, but when most of the page is build dynamically using javascript, there's not much it can do. There are various options when faced with this problem: |
||||
|
||||
* Use a headless browser such as [webloop][]. |
||||
* Use a Go javascript parser package, such as [otto][]. |
||||
|
||||
You can find a code example using `otto` [in this gist][exotto]. Thanks to github user @cryptix. |
||||
|
||||
## For Loop |
||||
|
||||
If all you need is a normal `for` loop over all nodes in the current selection, where `Map/Each`-style iteration is not necessary, you can use the following: |
||||
|
||||
``` |
||||
sel := Doc().Find(".selector") |
||||
for i := range sel.Nodes { |
||||
single := sel.Eq(i) |
||||
// use `single` as a selection of 1 node |
||||
} |
||||
``` |
||||
|
||||
Thanks to github user @jmoiron. |
||||
|
||||
[webloop]: https://github.com/sourcegraph/webloop |
||||
[otto]: https://github.com/robertkrimen/otto |
||||
[exotto]: https://gist.github.com/cryptix/87127f76a94183747b53 |
||||
[iconv]: http://godoc.org/?q=iconv |
||||
[text]: https://godoc.org/golang.org/x/text/encoding |
@ -1,82 +0,0 @@
@@ -1,82 +0,0 @@
|
||||
package goquery_test |
||||
|
||||
import ( |
||||
"fmt" |
||||
"log" |
||||
"net/http" |
||||
"os" |
||||
"strings" |
||||
|
||||
"github.com/PuerkitoBio/goquery" |
||||
) |
||||
|
||||
// This example scrapes the reviews shown on the home page of metalsucks.net.
|
||||
func Example() { |
||||
// Request the HTML page.
|
||||
res, err := http.Get("http://metalsucks.net") |
||||
if err != nil { |
||||
log.Fatal(err) |
||||
} |
||||
defer res.Body.Close() |
||||
if res.StatusCode != 200 { |
||||
log.Fatalf("status code error: %d %s", res.StatusCode, res.Status) |
||||
} |
||||
|
||||
// Load the HTML document
|
||||
doc, err := goquery.NewDocumentFromReader(res.Body) |
||||
if err != nil { |
||||
log.Fatal(err) |
||||
} |
||||
|
||||
// Find the review items
|
||||
doc.Find(".sidebar-reviews article .content-block").Each(func(i int, s *goquery.Selection) { |
||||
// For each item found, get the band and title
|
||||
band := s.Find("a").Text() |
||||
title := s.Find("i").Text() |
||||
fmt.Printf("Review %d: %s - %s\n", i, band, title) |
||||
}) |
||||
// To see the output of the Example while running the test suite (go test), simply
|
||||
// remove the leading "x" before Output on the next line. This will cause the
|
||||
// example to fail (all the "real" tests should pass).
|
||||
|
||||
// xOutput: voluntarily fail the Example output.
|
||||
} |
||||
|
||||
// This example shows how to use NewDocumentFromReader from a file.
|
||||
func ExampleNewDocumentFromReader_file() { |
||||
// create from a file
|
||||
f, err := os.Open("some/file.html") |
||||
if err != nil { |
||||
log.Fatal(err) |
||||
} |
||||
defer f.Close() |
||||
doc, err := goquery.NewDocumentFromReader(f) |
||||
if err != nil { |
||||
log.Fatal(err) |
||||
} |
||||
// use the goquery document...
|
||||
_ = doc.Find("h1") |
||||
} |
||||
|
||||
// This example shows how to use NewDocumentFromReader from a string.
|
||||
func ExampleNewDocumentFromReader_string() { |
||||
// create from a string
|
||||
data := ` |
||||
<html> |
||||
<head> |
||||
<title>My document</title> |
||||
</head> |
||||
<body> |
||||
<h1>Header</h1> |
||||
</body> |
||||
</html>` |
||||
|
||||
doc, err := goquery.NewDocumentFromReader(strings.NewReader(data)) |
||||
if err != nil { |
||||
log.Fatal(err) |
||||
} |
||||
header := doc.Find("h1").Text() |
||||
fmt.Println(header) |
||||
|
||||
// Output: Header
|
||||
} |
@ -1,118 +0,0 @@
@@ -1,118 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func TestAdd(t *testing.T) { |
||||
sel := Doc().Find("div.row-fluid").Add("a") |
||||
assertLength(t, sel.Nodes, 19) |
||||
} |
||||
|
||||
func TestAddInvalid(t *testing.T) { |
||||
sel1 := Doc().Find("div.row-fluid") |
||||
sel2 := sel1.Add("") |
||||
assertLength(t, sel1.Nodes, 9) |
||||
assertLength(t, sel2.Nodes, 9) |
||||
if sel1 == sel2 { |
||||
t.Errorf("selections should not be the same") |
||||
} |
||||
} |
||||
|
||||
func TestAddRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.Add("a").End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestAddSelection(t *testing.T) { |
||||
sel := Doc().Find("div.row-fluid") |
||||
sel2 := Doc().Find("a") |
||||
sel = sel.AddSelection(sel2) |
||||
assertLength(t, sel.Nodes, 19) |
||||
} |
||||
|
||||
func TestAddSelectionNil(t *testing.T) { |
||||
sel := Doc().Find("div.row-fluid") |
||||
assertLength(t, sel.Nodes, 9) |
||||
|
||||
sel = sel.AddSelection(nil) |
||||
assertLength(t, sel.Nodes, 9) |
||||
} |
||||
|
||||
func TestAddSelectionRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.Find("a") |
||||
sel2 = sel.AddSelection(sel2).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestAddNodes(t *testing.T) { |
||||
sel := Doc().Find("div.pvk-gutter") |
||||
sel2 := Doc().Find(".pvk-content") |
||||
sel = sel.AddNodes(sel2.Nodes...) |
||||
assertLength(t, sel.Nodes, 9) |
||||
} |
||||
|
||||
func TestAddNodesNone(t *testing.T) { |
||||
sel := Doc().Find("div.pvk-gutter").AddNodes() |
||||
assertLength(t, sel.Nodes, 6) |
||||
} |
||||
|
||||
func TestAddNodesRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.Find("a") |
||||
sel2 = sel.AddNodes(sel2.Nodes...).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestAddNodesBig(t *testing.T) { |
||||
doc := DocW() |
||||
sel := doc.Find("li") |
||||
assertLength(t, sel.Nodes, 373) |
||||
sel2 := doc.Find("xyz") |
||||
assertLength(t, sel2.Nodes, 0) |
||||
|
||||
nodes := sel.Nodes |
||||
sel2 = sel2.AddNodes(nodes...) |
||||
assertLength(t, sel2.Nodes, 373) |
||||
nodes2 := append(nodes, nodes...) |
||||
sel2 = sel2.End().AddNodes(nodes2...) |
||||
assertLength(t, sel2.Nodes, 373) |
||||
nodes3 := append(nodes2, nodes...) |
||||
sel2 = sel2.End().AddNodes(nodes3...) |
||||
assertLength(t, sel2.Nodes, 373) |
||||
} |
||||
|
||||
func TestAndSelf(t *testing.T) { |
||||
sel := Doc().Find(".span12").Last().AndSelf() |
||||
assertLength(t, sel.Nodes, 2) |
||||
} |
||||
|
||||
func TestAndSelfRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.Find("a").AndSelf().End().End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestAddBack(t *testing.T) { |
||||
sel := Doc().Find(".span12").Last().AddBack() |
||||
assertLength(t, sel.Nodes, 2) |
||||
} |
||||
|
||||
func TestAddBackRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.Find("a").AddBack().End().End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestAddBackFiltered(t *testing.T) { |
||||
sel := Doc().Find(".span12, .footer").Find("h1").AddBackFiltered(".footer") |
||||
assertLength(t, sel.Nodes, 2) |
||||
} |
||||
|
||||
func TestAddBackFilteredRollback(t *testing.T) { |
||||
sel := Doc().Find(".span12, .footer") |
||||
sel2 := sel.Find("h1").AddBackFiltered(".footer").End().End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
@ -1,206 +0,0 @@
@@ -1,206 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func TestFilter(t *testing.T) { |
||||
sel := Doc().Find(".span12").Filter(".alert") |
||||
assertLength(t, sel.Nodes, 1) |
||||
} |
||||
|
||||
func TestFilterNone(t *testing.T) { |
||||
sel := Doc().Find(".span12").Filter(".zzalert") |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestFilterInvalid(t *testing.T) { |
||||
sel := Doc().Find(".span12").Filter("") |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestFilterRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.Filter(".alert").End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestFilterFunction(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content").FilterFunction(func(i int, s *Selection) bool { |
||||
return i > 0 |
||||
}) |
||||
assertLength(t, sel.Nodes, 2) |
||||
} |
||||
|
||||
func TestFilterFunctionRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.FilterFunction(func(i int, s *Selection) bool { |
||||
return i > 0 |
||||
}).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestFilterNode(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.FilterNodes(sel.Nodes[2]) |
||||
assertLength(t, sel2.Nodes, 1) |
||||
} |
||||
|
||||
func TestFilterNodeRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.FilterNodes(sel.Nodes[2]).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestFilterSelection(t *testing.T) { |
||||
sel := Doc().Find(".link") |
||||
sel2 := Doc().Find("a[ng-click]") |
||||
sel3 := sel.FilterSelection(sel2) |
||||
assertLength(t, sel3.Nodes, 1) |
||||
} |
||||
|
||||
func TestFilterSelectionRollback(t *testing.T) { |
||||
sel := Doc().Find(".link") |
||||
sel2 := Doc().Find("a[ng-click]") |
||||
sel2 = sel.FilterSelection(sel2).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestFilterSelectionNil(t *testing.T) { |
||||
var sel2 *Selection |
||||
|
||||
sel := Doc().Find(".link") |
||||
sel3 := sel.FilterSelection(sel2) |
||||
assertLength(t, sel3.Nodes, 0) |
||||
} |
||||
|
||||
func TestNot(t *testing.T) { |
||||
sel := Doc().Find(".span12").Not(".alert") |
||||
assertLength(t, sel.Nodes, 1) |
||||
} |
||||
|
||||
func TestNotInvalid(t *testing.T) { |
||||
sel := Doc().Find(".span12").Not("") |
||||
assertLength(t, sel.Nodes, 2) |
||||
} |
||||
|
||||
func TestNotRollback(t *testing.T) { |
||||
sel := Doc().Find(".span12") |
||||
sel2 := sel.Not(".alert").End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestNotNone(t *testing.T) { |
||||
sel := Doc().Find(".span12").Not(".zzalert") |
||||
assertLength(t, sel.Nodes, 2) |
||||
} |
||||
|
||||
func TestNotFunction(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content").NotFunction(func(i int, s *Selection) bool { |
||||
return i > 0 |
||||
}) |
||||
assertLength(t, sel.Nodes, 1) |
||||
} |
||||
|
||||
func TestNotFunctionRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.NotFunction(func(i int, s *Selection) bool { |
||||
return i > 0 |
||||
}).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestNotNode(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.NotNodes(sel.Nodes[2]) |
||||
assertLength(t, sel2.Nodes, 2) |
||||
} |
||||
|
||||
func TestNotNodeRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
sel2 := sel.NotNodes(sel.Nodes[2]).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestNotSelection(t *testing.T) { |
||||
sel := Doc().Find(".link") |
||||
sel2 := Doc().Find("a[ng-click]") |
||||
sel3 := sel.NotSelection(sel2) |
||||
assertLength(t, sel3.Nodes, 6) |
||||
} |
||||
|
||||
func TestNotSelectionRollback(t *testing.T) { |
||||
sel := Doc().Find(".link") |
||||
sel2 := Doc().Find("a[ng-click]") |
||||
sel2 = sel.NotSelection(sel2).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestIntersection(t *testing.T) { |
||||
sel := Doc().Find(".pvk-gutter") |
||||
sel2 := Doc().Find("div").Intersection(sel) |
||||
assertLength(t, sel2.Nodes, 6) |
||||
} |
||||
|
||||
func TestIntersectionRollback(t *testing.T) { |
||||
sel := Doc().Find(".pvk-gutter") |
||||
sel2 := Doc().Find("div") |
||||
sel2 = sel.Intersection(sel2).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestHas(t *testing.T) { |
||||
sel := Doc().Find(".container-fluid").Has(".center-content") |
||||
assertLength(t, sel.Nodes, 2) |
||||
// Has() returns the high-level .container-fluid div, and the one that is the immediate parent of center-content
|
||||
} |
||||
|
||||
func TestHasInvalid(t *testing.T) { |
||||
sel := Doc().Find(".container-fluid").Has("") |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
||||
|
||||
func TestHasRollback(t *testing.T) { |
||||
sel := Doc().Find(".container-fluid") |
||||
sel2 := sel.Has(".center-content").End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestHasNodes(t *testing.T) { |
||||
sel := Doc().Find(".container-fluid") |
||||
sel2 := Doc().Find(".center-content") |
||||
sel = sel.HasNodes(sel2.Nodes...) |
||||
assertLength(t, sel.Nodes, 2) |
||||
// Has() returns the high-level .container-fluid div, and the one that is the immediate parent of center-content
|
||||
} |
||||
|
||||
func TestHasNodesRollback(t *testing.T) { |
||||
sel := Doc().Find(".container-fluid") |
||||
sel2 := Doc().Find(".center-content") |
||||
sel2 = sel.HasNodes(sel2.Nodes...).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestHasSelection(t *testing.T) { |
||||
sel := Doc().Find("p") |
||||
sel2 := Doc().Find("small") |
||||
sel = sel.HasSelection(sel2) |
||||
assertLength(t, sel.Nodes, 1) |
||||
} |
||||
|
||||
func TestHasSelectionRollback(t *testing.T) { |
||||
sel := Doc().Find("p") |
||||
sel2 := Doc().Find("small") |
||||
sel2 = sel.HasSelection(sel2).End() |
||||
assertEqual(t, sel, sel2) |
||||
} |
||||
|
||||
func TestEnd(t *testing.T) { |
||||
sel := Doc().Find("p").Has("small").End() |
||||
assertLength(t, sel.Nodes, 4) |
||||
} |
||||
|
||||
func TestEndToTop(t *testing.T) { |
||||
sel := Doc().Find("p").Has("small").End().End().End() |
||||
assertLength(t, sel.Nodes, 0) |
||||
} |
@ -1,6 +0,0 @@
@@ -1,6 +0,0 @@
|
||||
module github.com/PuerkitoBio/goquery |
||||
|
||||
require ( |
||||
github.com/andybalholm/cascadia v1.0.0 |
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a |
||||
) |
@ -1,5 +0,0 @@
@@ -1,5 +0,0 @@
|
||||
github.com/andybalholm/cascadia v1.0.0 h1:hOCXnnZ5A+3eVDX8pvgl4kofXv2ELss0bKcqRySc45o= |
||||
github.com/andybalholm/cascadia v1.0.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= |
||||
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a h1:gOpx8G595UYyvj8UK4+OFyY4rx037g3fmfhe5SasG3U= |
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
@ -1,88 +0,0 @@
@@ -1,88 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"golang.org/x/net/html" |
||||
) |
||||
|
||||
func TestEach(t *testing.T) { |
||||
var cnt int |
||||
|
||||
sel := Doc().Find(".hero-unit .row-fluid").Each(func(i int, n *Selection) { |
||||
cnt++ |
||||
t.Logf("At index %v, node %v", i, n.Nodes[0].Data) |
||||
}).Find("a") |
||||
|
||||
if cnt != 4 { |
||||
t.Errorf("Expected Each() to call function 4 times, got %v times.", cnt) |
||||
} |
||||
assertLength(t, sel.Nodes, 6) |
||||
} |
||||
|
||||
func TestEachWithBreak(t *testing.T) { |
||||
var cnt int |
||||
|
||||
sel := Doc().Find(".hero-unit .row-fluid").EachWithBreak(func(i int, n *Selection) bool { |
||||
cnt++ |
||||
t.Logf("At index %v, node %v", i, n.Nodes[0].Data) |
||||
return false |
||||
}).Find("a") |
||||
|
||||
if cnt != 1 { |
||||
t.Errorf("Expected Each() to call function 1 time, got %v times.", cnt) |
||||
} |
||||
assertLength(t, sel.Nodes, 6) |
||||
} |
||||
|
||||
func TestEachEmptySelection(t *testing.T) { |
||||
var cnt int |
||||
|
||||
sel := Doc().Find("zzzz") |
||||
sel.Each(func(i int, n *Selection) { |
||||
cnt++ |
||||
}) |
||||
if cnt > 0 { |
||||
t.Error("Expected Each() to not be called on empty Selection.") |
||||
} |
||||
sel2 := sel.Find("div") |
||||
assertLength(t, sel2.Nodes, 0) |
||||
} |
||||
|
||||
func TestMap(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
vals := sel.Map(func(i int, s *Selection) string { |
||||
n := s.Get(0) |
||||
if n.Type == html.ElementNode { |
||||
return n.Data |
||||
} |
||||
return "" |
||||
}) |
||||
for _, v := range vals { |
||||
if v != "div" { |
||||
t.Error("Expected Map array result to be all 'div's.") |
||||
} |
||||
} |
||||
if len(vals) != 3 { |
||||
t.Errorf("Expected Map array result to have a length of 3, found %v.", len(vals)) |
||||
} |
||||
} |
||||
|
||||
func TestForRange(t *testing.T) { |
||||
sel := Doc().Find(".pvk-content") |
||||
initLen := sel.Length() |
||||
for i := range sel.Nodes { |
||||
single := sel.Eq(i) |
||||
//h, err := single.Html()
|
||||
//if err != nil {
|
||||
// t.Fatal(err)
|
||||
//}
|
||||
//fmt.Println(i, h)
|
||||
if single.Length() != 1 { |
||||
t.Errorf("%d: expected length of 1, got %d", i, single.Length()) |
||||
} |
||||
} |
||||
if sel.Length() != initLen { |
||||
t.Errorf("expected initial selection to still have length %d, got %d", initLen, sel.Length()) |
||||
} |
||||
} |
@ -1,513 +0,0 @@
@@ -1,513 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
const ( |
||||
wrapHtml = "<div id=\"ins\">test string<div><p><em><b></b></em></p></div></div>" |
||||
) |
||||
|
||||
func TestAfter(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").After("#nf6") |
||||
|
||||
assertLength(t, doc.Find("#main #nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("#foot #nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("#main + #nf6").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestAfterMany(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find(".one").After("#nf6") |
||||
|
||||
assertLength(t, doc.Find("#foot #nf6").Nodes, 1) |
||||
assertLength(t, doc.Find("#main #nf6").Nodes, 1) |
||||
assertLength(t, doc.Find(".one + #nf6").Nodes, 2) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestAfterWithRemoved(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
s := doc.Find("#main").Remove() |
||||
s.After("#nf6") |
||||
|
||||
assertLength(t, s.Find("#nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("#nf6").Nodes, 0) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestAfterSelection(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").AfterSelection(doc.Find("#nf1, #nf2")) |
||||
|
||||
assertLength(t, doc.Find("#main #nf1, #main #nf2").Nodes, 0) |
||||
assertLength(t, doc.Find("#foot #nf1, #foot #nf2").Nodes, 0) |
||||
assertLength(t, doc.Find("#main + #nf1, #nf1 + #nf2").Nodes, 2) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestAfterHtml(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").AfterHtml("<strong>new node</strong>") |
||||
|
||||
assertLength(t, doc.Find("#main + strong").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestAppend(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").Append("#nf6") |
||||
|
||||
assertLength(t, doc.Find("#foot #nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("#main #nf6").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestAppendBody(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("body").Append("#nf6") |
||||
|
||||
assertLength(t, doc.Find("#foot #nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("#main #nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("body > #nf6").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestAppendSelection(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").AppendSelection(doc.Find("#nf1, #nf2")) |
||||
|
||||
assertLength(t, doc.Find("#foot #nf1").Nodes, 0) |
||||
assertLength(t, doc.Find("#foot #nf2").Nodes, 0) |
||||
assertLength(t, doc.Find("#main #nf1").Nodes, 1) |
||||
assertLength(t, doc.Find("#main #nf2").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestAppendSelectionExisting(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").AppendSelection(doc.Find("#n1, #n2")) |
||||
|
||||
assertClass(t, doc.Find("#main :nth-child(1)"), "three") |
||||
assertClass(t, doc.Find("#main :nth-child(5)"), "one") |
||||
assertClass(t, doc.Find("#main :nth-child(6)"), "two") |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestAppendClone(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#n1").AppendSelection(doc.Find("#nf1").Clone()) |
||||
|
||||
assertLength(t, doc.Find("#foot #nf1").Nodes, 1) |
||||
assertLength(t, doc.Find("#main #nf1").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestAppendHtml(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("div").AppendHtml("<strong>new node</strong>") |
||||
|
||||
assertLength(t, doc.Find("strong").Nodes, 14) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestBefore(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").Before("#nf6") |
||||
|
||||
assertLength(t, doc.Find("#main #nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("#foot #nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("body > #nf6:first-child").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestBeforeWithRemoved(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
s := doc.Find("#main").Remove() |
||||
s.Before("#nf6") |
||||
|
||||
assertLength(t, s.Find("#nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("#nf6").Nodes, 0) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestBeforeSelection(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").BeforeSelection(doc.Find("#nf1, #nf2")) |
||||
|
||||
assertLength(t, doc.Find("#main #nf1, #main #nf2").Nodes, 0) |
||||
assertLength(t, doc.Find("#foot #nf1, #foot #nf2").Nodes, 0) |
||||
assertLength(t, doc.Find("body > #nf1:first-child, #nf1 + #nf2").Nodes, 2) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestBeforeHtml(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").BeforeHtml("<strong>new node</strong>") |
||||
|
||||
assertLength(t, doc.Find("body > strong:first-child").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestEmpty(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
s := doc.Find("#main").Empty() |
||||
|
||||
assertLength(t, doc.Find("#main").Children().Nodes, 0) |
||||
assertLength(t, s.Filter("div").Nodes, 6) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestPrepend(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").Prepend("#nf6") |
||||
|
||||
assertLength(t, doc.Find("#foot #nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("#main #nf6:first-child").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestPrependBody(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("body").Prepend("#nf6") |
||||
|
||||
assertLength(t, doc.Find("#foot #nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("#main #nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("body > #nf6:first-child").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestPrependSelection(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").PrependSelection(doc.Find("#nf1, #nf2")) |
||||
|
||||
assertLength(t, doc.Find("#foot #nf1").Nodes, 0) |
||||
assertLength(t, doc.Find("#foot #nf2").Nodes, 0) |
||||
assertLength(t, doc.Find("#main #nf1:first-child").Nodes, 1) |
||||
assertLength(t, doc.Find("#main #nf2:nth-child(2)").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestPrependSelectionExisting(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main").PrependSelection(doc.Find("#n5, #n6")) |
||||
|
||||
assertClass(t, doc.Find("#main :nth-child(1)"), "five") |
||||
assertClass(t, doc.Find("#main :nth-child(2)"), "six") |
||||
assertClass(t, doc.Find("#main :nth-child(5)"), "three") |
||||
assertClass(t, doc.Find("#main :nth-child(6)"), "four") |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestPrependClone(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#n1").PrependSelection(doc.Find("#nf1").Clone()) |
||||
|
||||
assertLength(t, doc.Find("#foot #nf1:first-child").Nodes, 1) |
||||
assertLength(t, doc.Find("#main #nf1:first-child").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestPrependHtml(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("div").PrependHtml("<strong>new node</strong>") |
||||
|
||||
assertLength(t, doc.Find("strong:first-child").Nodes, 14) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestRemove(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#nf1").Remove() |
||||
|
||||
assertLength(t, doc.Find("#foot #nf1").Nodes, 0) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestRemoveAll(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("*").Remove() |
||||
|
||||
assertLength(t, doc.Find("*").Nodes, 0) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestRemoveRoot(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("html").Remove() |
||||
|
||||
assertLength(t, doc.Find("html").Nodes, 0) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestRemoveFiltered(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
nf6 := doc.Find("#nf6") |
||||
s := doc.Find("div").RemoveFiltered("#nf6") |
||||
|
||||
assertLength(t, doc.Find("#nf6").Nodes, 0) |
||||
assertLength(t, s.Nodes, 1) |
||||
if nf6.Nodes[0] != s.Nodes[0] { |
||||
t.Error("Removed node does not match original") |
||||
} |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestReplaceWith(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
|
||||
doc.Find("#nf6").ReplaceWith("#main") |
||||
assertLength(t, doc.Find("#foot #main:last-child").Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
|
||||
doc.Find("#foot").ReplaceWith("#main") |
||||
assertLength(t, doc.Find("#foot").Nodes, 0) |
||||
assertLength(t, doc.Find("#main").Nodes, 1) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestReplaceWithHtml(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#main, #foot").ReplaceWithHtml("<div id=\"replace\"></div>") |
||||
|
||||
assertLength(t, doc.Find("#replace").Nodes, 2) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestSetHtml(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
q := doc.Find("#main, #foot") |
||||
q.SetHtml(`<div id="replace">test</div>`) |
||||
|
||||
assertLength(t, doc.Find("#replace").Nodes, 2) |
||||
assertLength(t, doc.Find("#main, #foot").Nodes, 2) |
||||
|
||||
if q.Text() != "testtest" { |
||||
t.Errorf("Expected text to be %v, found %v", "testtest", q.Text()) |
||||
} |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestSetHtmlNoMatch(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
q := doc.Find("#notthere") |
||||
q.SetHtml(`<div id="replace">test</div>`) |
||||
|
||||
assertLength(t, doc.Find("#replace").Nodes, 0) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestSetHtmlEmpty(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
q := doc.Find("#main") |
||||
q.SetHtml(``) |
||||
|
||||
assertLength(t, doc.Find("#main").Nodes, 1) |
||||
assertLength(t, doc.Find("#main").Children().Nodes, 0) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestSetText(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
q := doc.Find("#main, #foot") |
||||
repl := "<div id=\"replace\">test</div>" |
||||
q.SetText(repl) |
||||
|
||||
assertLength(t, doc.Find("#replace").Nodes, 0) |
||||
assertLength(t, doc.Find("#main, #foot").Nodes, 2) |
||||
|
||||
if q.Text() != (repl + repl) { |
||||
t.Errorf("Expected text to be %v, found %v", (repl + repl), q.Text()) |
||||
} |
||||
|
||||
h, err := q.Html() |
||||
if err != nil { |
||||
t.Errorf("Error: %v", err) |
||||
} |
||||
esc := "<div id="replace">test</div>" |
||||
if h != esc { |
||||
t.Errorf("Expected html to be %v, found %v", esc, h) |
||||
} |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestReplaceWithSelection(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
sel := doc.Find("#nf6").ReplaceWithSelection(doc.Find("#nf5")) |
||||
|
||||
assertSelectionIs(t, sel, "#nf6") |
||||
assertLength(t, doc.Find("#nf6").Nodes, 0) |
||||
assertLength(t, doc.Find("#nf5").Nodes, 1) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestUnwrap(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
|
||||
doc.Find("#nf5").Unwrap() |
||||
assertLength(t, doc.Find("#foot").Nodes, 0) |
||||
assertLength(t, doc.Find("body > #nf1").Nodes, 1) |
||||
assertLength(t, doc.Find("body > #nf5").Nodes, 1) |
||||
|
||||
printSel(t, doc.Selection) |
||||
|
||||
doc = Doc2Clone() |
||||
|
||||
doc.Find("#nf5, #n1").Unwrap() |
||||
assertLength(t, doc.Find("#foot").Nodes, 0) |
||||
assertLength(t, doc.Find("#main").Nodes, 0) |
||||
assertLength(t, doc.Find("body > #n1").Nodes, 1) |
||||
assertLength(t, doc.Find("body > #nf5").Nodes, 1) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestUnwrapBody(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
|
||||
doc.Find("#main").Unwrap() |
||||
assertLength(t, doc.Find("body").Nodes, 1) |
||||
assertLength(t, doc.Find("body > #main").Nodes, 1) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestUnwrapHead(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
|
||||
doc.Find("title").Unwrap() |
||||
assertLength(t, doc.Find("head").Nodes, 0) |
||||
assertLength(t, doc.Find("head > title").Nodes, 0) |
||||
assertLength(t, doc.Find("title").Nodes, 1) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestUnwrapHtml(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
|
||||
doc.Find("head").Unwrap() |
||||
assertLength(t, doc.Find("html").Nodes, 0) |
||||
assertLength(t, doc.Find("html head").Nodes, 0) |
||||
assertLength(t, doc.Find("head").Nodes, 1) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestWrap(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#nf1").Wrap("#nf2") |
||||
nf1 := doc.Find("#foot #nf2 #nf1") |
||||
assertLength(t, nf1.Nodes, 1) |
||||
|
||||
nf2 := doc.Find("#nf2") |
||||
assertLength(t, nf2.Nodes, 2) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestWrapEmpty(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#nf1").Wrap("#doesnt-exist") |
||||
|
||||
origHtml, _ := Doc2().Html() |
||||
newHtml, _ := doc.Html() |
||||
|
||||
if origHtml != newHtml { |
||||
t.Error("Expected the two documents to be identical.") |
||||
} |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestWrapHtml(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find(".odd").WrapHtml(wrapHtml) |
||||
nf2 := doc.Find("#ins #nf2") |
||||
assertLength(t, nf2.Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestWrapSelection(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#nf1").WrapSelection(doc.Find("#nf2")) |
||||
nf1 := doc.Find("#foot #nf2 #nf1") |
||||
assertLength(t, nf1.Nodes, 1) |
||||
|
||||
nf2 := doc.Find("#nf2") |
||||
assertLength(t, nf2.Nodes, 2) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestWrapAll(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find(".odd").WrapAll("#nf1") |
||||
nf1 := doc.Find("#main #nf1") |
||||
assertLength(t, nf1.Nodes, 1) |
||||
|
||||
sel := nf1.Find("#n2 ~ #n4 ~ #n6 ~ #nf2 ~ #nf4 ~ #nf6") |
||||
assertLength(t, sel.Nodes, 1) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestWrapAllHtml(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find(".odd").WrapAllHtml(wrapHtml) |
||||
nf1 := doc.Find("#main div#ins div p em b #n2 ~ #n4 ~ #n6 ~ #nf2 ~ #nf4 ~ #nf6") |
||||
assertLength(t, nf1.Nodes, 1) |
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestWrapInnerNoContent(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find(".one").WrapInner(".two") |
||||
|
||||
twos := doc.Find(".two") |
||||
assertLength(t, twos.Nodes, 4) |
||||
assertLength(t, doc.Find(".one .two").Nodes, 2) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestWrapInnerWithContent(t *testing.T) { |
||||
doc := Doc3Clone() |
||||
doc.Find(".one").WrapInner(".two") |
||||
|
||||
twos := doc.Find(".two") |
||||
assertLength(t, twos.Nodes, 4) |
||||
assertLength(t, doc.Find(".one .two").Nodes, 2) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestWrapInnerNoWrapper(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find(".one").WrapInner(".not-exist") |
||||
|
||||
twos := doc.Find(".two") |
||||
assertLength(t, twos.Nodes, 2) |
||||
assertLength(t, doc.Find(".one").Nodes, 2) |
||||
assertLength(t, doc.Find(".one .two").Nodes, 0) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
||||
|
||||
func TestWrapInnerHtml(t *testing.T) { |
||||
doc := Doc2Clone() |
||||
doc.Find("#foot").WrapInnerHtml(wrapHtml) |
||||
|
||||
foot := doc.Find("#foot div#ins div p em b #nf1 ~ #nf2 ~ #nf3") |
||||
assertLength(t, foot.Nodes, 1) |
||||
|
||||
printSel(t, doc.Selection) |
||||
} |
@ -1,37 +0,0 @@
@@ -1,37 +0,0 @@
|
||||
#!/bin/sh |
||||
|
||||
echo ">>> golint" |
||||
for dir in $(go list ./... | grep -v /vendor/) |
||||
do |
||||
golint "${dir}" |
||||
done |
||||
echo "<<< golint" |
||||
echo |
||||
|
||||
echo ">>> go vet" |
||||
go vet $(go list ./... | grep -v /vendor/) |
||||
echo "<<< go vet" |
||||
echo |
||||
|
||||
echo ">>> gosimple" |
||||
gosimple $(go list ./... | grep -v /vendor/) |
||||
echo "<<< gosimple" |
||||
echo |
||||
|
||||
# Check for gofmt problems and report if any. |
||||
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '.go$' | grep -v /vendor/) |
||||
[ -z "$gofiles" ] && echo "EXIT $vetres" && exit $vetres |
||||
|
||||
if [ -n "$gofiles" ]; then |
||||
unformatted=$(gofmt -l $gofiles) |
||||
|
||||
if [ -n "$unformatted" ]; then |
||||
# Some files are not gofmt'd. |
||||
echo >&2 "Go files must be formatted with gofmt. Please run:" |
||||
for fn in $unformatted; do |
||||
echo >&2 " gofmt -w $PWD/$fn" |
||||
done |
||||
fi |
||||
fi |
||||
echo |
||||
|
@ -1,252 +0,0 @@
@@ -1,252 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"regexp" |
||||
"strings" |
||||
"testing" |
||||
) |
||||
|
||||
func TestAttrExists(t *testing.T) { |
||||
if val, ok := Doc().Find("a").Attr("href"); !ok { |
||||
t.Error("Expected a value for the href attribute.") |
||||
} else { |
||||
t.Logf("Href of first anchor: %v.", val) |
||||
} |
||||
} |
||||
|
||||
func TestAttrOr(t *testing.T) { |
||||
if val := Doc().Find("a").AttrOr("fake-attribute", "alternative"); val != "alternative" { |
||||
t.Error("Expected an alternative value for 'fake-attribute' attribute.") |
||||
} else { |
||||
t.Logf("Value returned for not existing attribute: %v.", val) |
||||
} |
||||
if val := Doc().Find("zz").AttrOr("fake-attribute", "alternative"); val != "alternative" { |
||||
t.Error("Expected an alternative value for 'fake-attribute' on an empty selection.") |
||||
} else { |
||||
t.Logf("Value returned for empty selection: %v.", val) |
||||
} |
||||
} |
||||
|
||||
func TestAttrNotExist(t *testing.T) { |
||||
if val, ok := Doc().Find("div.row-fluid").Attr("href"); ok { |
||||
t.Errorf("Expected no value for the href attribute, got %v.", val) |
||||
} |
||||
} |
||||
|
||||
func TestRemoveAttr(t *testing.T) { |
||||
sel := Doc2Clone().Find("div") |
||||
|
||||
sel.RemoveAttr("id") |
||||
|
||||
_, ok := sel.Attr("id") |
||||
if ok { |
||||
t.Error("Expected there to be no id attributes set") |
||||
} |
||||
} |
||||
|
||||
func TestSetAttr(t *testing.T) { |
||||
sel := Doc2Clone().Find("#main") |
||||
|
||||
sel.SetAttr("id", "not-main") |
||||
|
||||
val, ok := sel.Attr("id") |
||||
if !ok { |
||||
t.Error("Expected an id attribute on main") |
||||
} |
||||
|
||||
if val != "not-main" { |
||||
t.Errorf("Expected an attribute id to be not-main, got %s", val) |
||||
} |
||||
} |
||||
|
||||
func TestSetAttr2(t *testing.T) { |
||||
sel := Doc2Clone().Find("#main") |
||||
|
||||
sel.SetAttr("foo", "bar") |
||||
|
||||
val, ok := sel.Attr("foo") |
||||
if !ok { |
||||
t.Error("Expected an 'foo' attribute on main") |
||||
} |
||||
|
||||
if val != "bar" { |
||||
t.Errorf("Expected an attribute 'foo' to be 'bar', got '%s'", val) |
||||
} |
||||
} |
||||
|
||||
func TestText(t *testing.T) { |
||||
txt := Doc().Find("h1").Text() |
||||
if strings.Trim(txt, " \n\r\t") != "Provok.in" { |
||||
t.Errorf("Expected text to be Provok.in, found %s.", txt) |
||||
} |
||||
} |
||||
|
||||
func TestText2(t *testing.T) { |
||||
txt := Doc().Find(".hero-unit .container-fluid .row-fluid:nth-child(1)").Text() |
||||
if ok, e := regexp.MatchString(`^\s+Provok\.in\s+Prove your point.\s+$`, txt); !ok || e != nil { |
||||
t.Errorf("Expected text to be Provok.in Prove your point., found %s.", txt) |
||||
if e != nil { |
||||
t.Logf("Error: %s.", e.Error()) |
||||
} |
||||
} |
||||
} |
||||
|
||||
func TestText3(t *testing.T) { |
||||
txt := Doc().Find(".pvk-gutter").First().Text() |
||||
// There's an character in there...
|
||||
if ok, e := regexp.MatchString(`^[\s\x{00A0}]+$`, txt); !ok || e != nil { |
||||
t.Errorf("Expected spaces, found <%v>.", txt) |
||||
if e != nil { |
||||
t.Logf("Error: %s.", e.Error()) |
||||
} |
||||
} |
||||
} |
||||
|
||||
func TestHtml(t *testing.T) { |
||||
txt, e := Doc().Find("h1").Html() |
||||
if e != nil { |
||||
t.Errorf("Error: %s.", e) |
||||
} |
||||
|
||||
if ok, e := regexp.MatchString(`^\s*<a href="/">Provok<span class="green">\.</span><span class="red">i</span>n</a>\s*$`, txt); !ok || e != nil { |
||||
t.Errorf("Unexpected HTML content, found %s.", txt) |
||||
if e != nil { |
||||
t.Logf("Error: %s.", e.Error()) |
||||
} |
||||
} |
||||
} |
||||
|
||||
func TestNbsp(t *testing.T) { |
||||
src := `<p>Some text</p>` |
||||
d, err := NewDocumentFromReader(strings.NewReader(src)) |
||||
if err != nil { |
||||
t.Fatal(err) |
||||
} |
||||
txt := d.Find("p").Text() |
||||
ix := strings.Index(txt, "\u00a0") |
||||
if ix != 4 { |
||||
t.Errorf("Text: expected a non-breaking space at index 4, got %d", ix) |
||||
} |
||||
|
||||
h, err := d.Find("p").Html() |
||||
if err != nil { |
||||
t.Fatal(err) |
||||
} |
||||
ix = strings.Index(h, "\u00a0") |
||||
if ix != 4 { |
||||
t.Errorf("Html: expected a non-breaking space at index 4, got %d", ix) |
||||
} |
||||
} |
||||
|
||||
func TestAddClass(t *testing.T) { |
||||
sel := Doc2Clone().Find("#main") |
||||
sel.AddClass("main main main") |
||||
|
||||
// Make sure that class was only added once
|
||||
if a, ok := sel.Attr("class"); !ok || a != "main" { |
||||
t.Error("Expected #main to have class main") |
||||
} |
||||
} |
||||
|
||||
func TestAddClassSimilar(t *testing.T) { |
||||
sel := Doc2Clone().Find("#nf5") |
||||
sel.AddClass("odd") |
||||
|
||||
assertClass(t, sel, "odd") |
||||
assertClass(t, sel, "odder") |
||||
printSel(t, sel.Parent()) |
||||
} |
||||
|
||||
func TestAddEmptyClass(t *testing.T) { |
||||
sel := Doc2Clone().Find("#main") |
||||
sel.AddClass("") |
||||
|
||||
// Make sure that class was only added once
|
||||
if a, ok := sel.Attr("class"); ok { |
||||
t.Errorf("Expected #main to not to have a class, have: %s", a) |
||||
} |
||||
} |
||||
|
||||
func TestAddClasses(t *testing.T) { |
||||
sel := Doc2Clone().Find("#main") |
||||
sel.AddClass("a b") |
||||
|
||||
// Make sure that class was only added once
|
||||
if !sel.HasClass("a") || !sel.HasClass("b") { |
||||
t.Errorf("#main does not have classes") |
||||
} |
||||
} |
||||
|
||||
func TestHasClass(t *testing.T) { |
||||
sel := Doc().Find("div") |
||||
if !sel.HasClass("span12") { |
||||
t.Error("Expected at least one div to have class span12.") |
||||
} |
||||
} |
||||
|
||||
func TestHasClassNone(t *testing.T) { |
||||
sel := Doc().Find("h2") |
||||
if sel.HasClass("toto") { |
||||
t.Error("Expected h1 to have no class.") |
||||
} |
||||
} |
||||
|
||||
func TestHasClassNotFirst(t *testing.T) { |
||||
sel := Doc().Find(".alert") |
||||
if !sel.HasClass("alert-error") { |
||||
t.Error("Expected .alert to also have class .alert-error.") |
||||
} |
||||
} |
||||
|
||||
func TestRemoveClass(t *testing.T) { |
||||
sel := Doc2Clone().Find("#nf1") |
||||
sel.RemoveClass("one row") |
||||
|
||||
if !sel.HasClass("even") || sel.HasClass("one") || sel.HasClass("row") { |
||||
classes, _ := sel.Attr("class") |
||||
t.Error("Expected #nf1 to have class even, has ", classes) |
||||
} |
||||
} |
||||
|
||||
func TestRemoveClassSimilar(t *testing.T) { |
||||
sel := Doc2Clone().Find("#nf5, #nf6") |
||||
assertLength(t, sel.Nodes, 2) |
||||
|
||||
sel.RemoveClass("odd") |
||||
assertClass(t, sel.Eq(0), "odder") |
||||
printSel(t, sel) |
||||
} |
||||
|
||||
func TestRemoveAllClasses(t *testing.T) { |
||||
sel := Doc2Clone().Find("#nf1") |
||||
sel.RemoveClass() |
||||
|
||||
if a, ok := sel.Attr("class"); ok { |
||||
t.Error("All classes were not removed, has ", a) |
||||
} |
||||
|
||||
sel = Doc2Clone().Find("#main") |
||||
sel.RemoveClass() |
||||
if a, ok := sel.Attr("class"); ok { |
||||
t.Error("All classes were not removed, has ", a) |
||||
} |
||||
} |
||||
|
||||
func TestToggleClass(t *testing.T) { |
||||
sel := Doc2Clone().Find("#nf1") |
||||
|
||||
sel.ToggleClass("one") |
||||
if sel.HasClass("one") { |
||||
t.Error("Expected #nf1 to not have class one") |
||||
} |
||||
|
||||
sel.ToggleClass("one") |
||||
if !sel.HasClass("one") { |
||||
t.Error("Expected #nf1 to have class one") |
||||
} |
||||
|
||||
sel.ToggleClass("one even row") |
||||
if a, ok := sel.Attr("class"); ok { |
||||
t.Errorf("Expected #nf1 to have no classes, have %q", a) |
||||
} |
||||
} |
@ -1,103 +0,0 @@
@@ -1,103 +0,0 @@
|
||||
package goquery |
||||
|
||||
import ( |
||||
"testing" |
||||
) |
||||
|
||||
func TestIs(t *testing.T) { |
||||
sel := Doc().Find(".footer p:nth-child(1)") |
||||
if !sel.Is("p") { |
||||
t.Error("Expected .footer p:nth-child(1) to be p.") |
||||
} |
||||
} |
||||
|
||||
func TestIsInvalid(t *testing.T) { |
||||
sel := Doc().Find(".footer p:nth-child(1)") |
||||
if sel.Is("") { |
||||
t.Error("Is should not succeed with invalid selector string") |
||||
} |
||||
} |
||||
|
||||
func TestIsPositional(t *testing.T) { |
||||
sel := Doc().Find(".footer p:nth-child(2)") |
||||
if !sel.Is("p:nth-child(2)") { |
||||
t.Error("Expected .footer p:nth-child(2) to be p:nth-child(2).") |
||||
} |
||||
} |
||||
|
||||
func TestIsPositionalNot(t *testing.T) { |
||||
sel := Doc().Find(".footer p:nth-child(1)") |
||||
if sel.Is("p:nth-child(2)") { |
||||
t.Error("Expected .footer p:nth-child(1) NOT to be p:nth-child(2).") |
||||
} |
||||
} |
||||
|
||||
func TestIsFunction(t *testing.T) { |
||||
ok := Doc().Find("div").IsFunction(func(i int, s *Selection) bool { |
||||
return s.HasClass("container-fluid") |
||||
}) |
||||
|
||||
if !ok { |
||||
t.Error("Expected some div to have a container-fluid class.") |
||||
} |
||||
} |
||||
|
||||
func TestIsFunctionRollback(t *testing.T) { |
||||
ok := Doc().Find("div").IsFunction(func(i int, s *Selection) bool { |
||||
return s.HasClass("container-fluid") |
||||
}) |
||||
|
||||
if !ok { |
||||
t.Error("Expected some div to have a container-fluid class.") |
||||
} |
||||
} |
||||
|
||||
func TestIsSelection(t *testing.T) { |
||||
sel := Doc().Find("div") |
||||
sel2 := Doc().Find(".pvk-gutter") |
||||
|
||||
if !sel.IsSelection(sel2) { |
||||
t.Error("Expected some div to have a pvk-gutter class.") |
||||
} |
||||
} |
||||
|
||||
func TestIsSelectionNot(t *testing.T) { |
||||
sel := Doc().Find("div") |
||||
sel2 := Doc().Find("a") |
||||
|
||||
if sel.IsSelection(sel2) { |
||||
t.Error("Expected some div NOT to be an anchor.") |
||||
} |
||||
} |
||||
|
||||
func TestIsNodes(t *testing.T) { |
||||
sel := Doc().Find("div") |
||||
sel2 := Doc().Find(".footer") |
||||
|
||||
if !sel.IsNodes(sel2.Nodes[0]) { |
||||
t.Error("Expected some div to have a footer class.") |
||||
} |
||||
} |
||||
|
||||
func TestDocContains(t *testing.T) { |
||||
sel := Doc().Find("h1") |
||||
if !Doc().Contains(sel.Nodes[0]) { |
||||
t.Error("Expected document to contain H1 tag.") |
||||
} |
||||
} |
||||
|
||||
func TestSelContains(t *testing.T) { |
||||
sel := Doc().Find(".row-fluid") |
||||
sel2 := Doc().Find("a[ng-click]") |
||||
if !sel.Contains(sel2.Nodes[0]) { |
||||
t.Error("Expected .row-fluid to contain a[ng-click] tag.") |
||||
} |
||||
} |
||||
|
||||
func TestSelNotContains(t *testing.T) { |
||||
sel := Doc().Find("a.link") |
||||
sel2 := Doc().Find("span") |
||||
if sel.Contains(sel2.Nodes[0]) { |
||||
t.Error("Expected a.link to NOT contain span tag.") |
||||
} |
||||
} |
@ -1,855 +0,0 @@
@@ -1,855 +0,0 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
||||
|
||||
<title>testing - The Go Programming Language</title> |
||||
|
||||
<link type="text/css" rel="stylesheet" href="/doc/style.css"> |
||||
<script type="text/javascript" src="/doc/godocs.js"></script> |
||||
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="godoc" href="/opensearch.xml" /> |
||||
|
||||
<script type="text/javascript"> |
||||
var _gaq = _gaq || []; |
||||
_gaq.push(["_setAccount", "UA-11222381-2"]); |
||||
_gaq.push(["_trackPageview"]); |
||||
</script> |
||||
</head> |
||||
<body> |
||||
|
||||
<div id="topbar"><div class="container wide"> |
||||
|
||||
<form method="GET" action="/search"> |
||||
<div id="menu"> |
||||
<a href="/doc/">Documents</a> |
||||
<a href="/ref/">References</a> |
||||
<a href="/pkg/">Packages</a> |
||||
<a href="/project/">The Project</a> |
||||
<a href="/help/">Help</a> |
||||
<input type="text" id="search" name="q" class="inactive" value="Search"> |
||||
</div> |
||||
<div id="heading"><a href="/">The Go Programming Language</a></div> |
||||
</form> |
||||
|
||||
</div></div> |
||||
|
||||
<div id="page" class="wide"> |
||||
|
||||
|
||||
<div id="plusone"><g:plusone size="small" annotation="none"></g:plusone></div> |
||||
<h1>Package testing</h1> |
||||
|
||||
|
||||
|
||||
|
||||
<div id="nav"></div> |
||||
|
||||
|
||||
<!-- |
||||
Copyright 2009 The Go Authors. All rights reserved. |
||||
Use of this source code is governed by a BSD-style |
||||
license that can be found in the LICENSE file. |
||||
--> |
||||
|
||||
|
||||
<div id="short-nav"> |
||||
<dl> |
||||
<dd><code>import "testing"</code></dd> |
||||
</dl> |
||||
<dl> |
||||
<dd><a href="#overview" class="overviewLink">Overview</a></dd> |
||||
<dd><a href="#index">Index</a></dd> |
||||
|
||||
|
||||
<dd><a href="#subdirectories">Subdirectories</a></dd> |
||||
|
||||
</dl> |
||||
</div> |
||||
<!-- The package's Name is printed as title by the top-level template --> |
||||
<div id="overview" class="toggleVisible"> |
||||
<div class="collapsed"> |
||||
<h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2> |
||||
</div> |
||||
<div class="expanded"> |
||||
<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2> |
||||
<p> |
||||
Package testing provides support for automated testing of Go packages. |
||||
It is intended to be used in concert with the “go test” command, which automates |
||||
execution of any function of the form |
||||
</p> |
||||
<pre>func TestXxx(*testing.T) |
||||
</pre> |
||||
<p> |
||||
where Xxx can be any alphanumeric string (but the first letter must not be in |
||||
[a-z]) and serves to identify the test routine. |
||||
These TestXxx routines should be declared within the package they are testing. |
||||
</p> |
||||
<p> |
||||
Functions of the form |
||||
</p> |
||||
<pre>func BenchmarkXxx(*testing.B) |
||||
</pre> |
||||
<p> |
||||
are considered benchmarks, and are executed by the "go test" command when |
||||
the -test.bench flag is provided. |
||||
</p> |
||||
<p> |
||||
A sample benchmark function looks like this: |
||||
</p> |
||||
<pre>func BenchmarkHello(b *testing.B) { |
||||
for i := 0; i < b.N; i++ { |
||||
fmt.Sprintf("hello") |
||||
} |
||||
} |
||||
</pre> |
||||
<p> |
||||
The benchmark package will vary b.N until the benchmark function lasts |
||||
long enough to be timed reliably. The output |
||||
</p> |
||||
<pre>testing.BenchmarkHello 10000000 282 ns/op |
||||
</pre> |
||||
<p> |
||||
means that the loop ran 10000000 times at a speed of 282 ns per loop. |
||||
</p> |
||||
<p> |
||||
If a benchmark needs some expensive setup before running, the timer |
||||
may be stopped: |
||||
</p> |
||||
<pre>func BenchmarkBigLen(b *testing.B) { |
||||
b.StopTimer() |
||||
big := NewBig() |
||||
b.StartTimer() |
||||
for i := 0; i < b.N; i++ { |
||||
big.Len() |
||||
} |
||||
} |
||||
</pre> |
||||
<p> |
||||
The package also runs and verifies example code. Example functions may |
||||
include a concluding comment that begins with "Output:" and is compared with |
||||
the standard output of the function when the tests are run, as in these |
||||
examples of an example: |
||||
</p> |
||||
<pre>func ExampleHello() { |
||||
fmt.Println("hello") |
||||
// Output: hello |
||||
} |
||||
|
||||
func ExampleSalutations() { |
||||
fmt.Println("hello, and") |
||||
fmt.Println("goodbye") |
||||
// Output: |
||||
// hello, and |
||||
// goodbye |
||||
} |
||||
</pre> |
||||
<p> |
||||
Example functions without output comments are compiled but not executed. |
||||
</p> |
||||
<p> |
||||
The naming convention to declare examples for a function F, a type T and |
||||
method M on type T are: |
||||
</p> |
||||
<pre>func ExampleF() { ... } |
||||
func ExampleT() { ... } |
||||
func ExampleT_M() { ... } |
||||
</pre> |
||||
<p> |
||||
Multiple example functions for a type/function/method may be provided by |
||||
appending a distinct suffix to the name. The suffix must start with a |
||||
lower-case letter. |
||||
</p> |
||||
<pre>func ExampleF_suffix() { ... } |
||||
func ExampleT_suffix() { ... } |
||||
func ExampleT_M_suffix() { ... } |
||||
</pre> |
||||
<p> |
||||
The entire test file is presented as the example when it contains a single |
||||
example function, at least one other function, type, variable, or constant |
||||
declaration, and no test or benchmark functions. |
||||
</p> |
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<h2 id="index">Index</h2> |
||||
<!-- Table of contents for API; must be named manual-nav to turn off auto nav. --> |
||||
<div id="manual-nav"> |
||||
<dl> |
||||
|
||||
|
||||
|
||||
|
||||
<dd><a href="#Main">func Main(matchString func(pat, str string) (bool, error), tests []InternalTest, benchmarks []InternalBenchmark, examples []InternalExample)</a></dd> |
||||
|
||||
|
||||
<dd><a href="#RunBenchmarks">func RunBenchmarks(matchString func(pat, str string) (bool, error), benchmarks []InternalBenchmark)</a></dd> |
||||
|
||||
|
||||
<dd><a href="#RunExamples">func RunExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ok bool)</a></dd> |
||||
|
||||
|
||||
<dd><a href="#RunTests">func RunTests(matchString func(pat, str string) (bool, error), tests []InternalTest) (ok bool)</a></dd> |
||||
|
||||
|
||||
<dd><a href="#Short">func Short() bool</a></dd> |
||||
|
||||
|
||||
|
||||
<dd><a href="#B">type B</a></dd> |
||||
|
||||
|
||||
|
||||
<dd> <a href="#B.Error">func (c *B) Error(args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.Errorf">func (c *B) Errorf(format string, args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.Fail">func (c *B) Fail()</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.FailNow">func (c *B) FailNow()</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.Failed">func (c *B) Failed() bool</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.Fatal">func (c *B) Fatal(args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.Fatalf">func (c *B) Fatalf(format string, args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.Log">func (c *B) Log(args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.Logf">func (c *B) Logf(format string, args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.ResetTimer">func (b *B) ResetTimer()</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.SetBytes">func (b *B) SetBytes(n int64)</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.StartTimer">func (b *B) StartTimer()</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#B.StopTimer">func (b *B) StopTimer()</a></dd> |
||||
|
||||
|
||||
|
||||
<dd><a href="#BenchmarkResult">type BenchmarkResult</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#Benchmark">func Benchmark(f func(b *B)) BenchmarkResult</a></dd> |
||||
|
||||
|
||||
|
||||
<dd> <a href="#BenchmarkResult.NsPerOp">func (r BenchmarkResult) NsPerOp() int64</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#BenchmarkResult.String">func (r BenchmarkResult) String() string</a></dd> |
||||
|
||||
|
||||
|
||||
<dd><a href="#InternalBenchmark">type InternalBenchmark</a></dd> |
||||
|
||||
|
||||
|
||||
|
||||
<dd><a href="#InternalExample">type InternalExample</a></dd> |
||||
|
||||
|
||||
|
||||
|
||||
<dd><a href="#InternalTest">type InternalTest</a></dd> |
||||
|
||||
|
||||
|
||||
|
||||
<dd><a href="#T">type T</a></dd> |
||||
|
||||
|
||||
|
||||
<dd> <a href="#T.Error">func (c *T) Error(args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#T.Errorf">func (c *T) Errorf(format string, args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#T.Fail">func (c *T) Fail()</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#T.FailNow">func (c *T) FailNow()</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#T.Failed">func (c *T) Failed() bool</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#T.Fatal">func (c *T) Fatal(args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#T.Fatalf">func (c *T) Fatalf(format string, args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#T.Log">func (c *T) Log(args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#T.Logf">func (c *T) Logf(format string, args ...interface{})</a></dd> |
||||
|
||||
|
||||
<dd> <a href="#T.Parallel">func (t *T) Parallel()</a></dd> |
||||
|
||||
|
||||
|
||||
</dl> |
||||
|
||||
|
||||
|
||||
|
||||
<h4>Package files</h4> |
||||
<p> |
||||
<span style="font-size:90%"> |
||||
|
||||
<a href="/src/pkg/testing/benchmark.go">benchmark.go</a> |
||||
|
||||
<a href="/src/pkg/testing/example.go">example.go</a> |
||||
|
||||
<a href="/src/pkg/testing/testing.go">testing.go</a> |
||||
|
||||
</span> |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="Main">func <a href="/src/pkg/testing/testing.go?s=9750:9890#L268">Main</a></h2> |
||||
<pre>func Main(matchString func(pat, str string) (bool, error), tests []InternalTest, benchmarks []InternalBenchmark, examples []InternalExample)</pre> |
||||
<p> |
||||
An internal function but exported because it is cross-package; part of the implementation |
||||
of the "go test" command. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="RunBenchmarks">func <a href="/src/pkg/testing/benchmark.go?s=5365:5464#L207">RunBenchmarks</a></h2> |
||||
<pre>func RunBenchmarks(matchString func(pat, str string) (bool, error), benchmarks []InternalBenchmark)</pre> |
||||
<p> |
||||
An internal function but exported because it is cross-package; part of the implementation |
||||
of the "go test" command. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="RunExamples">func <a href="/src/pkg/testing/example.go?s=314:417#L12">RunExamples</a></h2> |
||||
<pre>func RunExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ok bool)</pre> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="RunTests">func <a href="/src/pkg/testing/testing.go?s=10486:10580#L297">RunTests</a></h2> |
||||
<pre>func RunTests(matchString func(pat, str string) (bool, error), tests []InternalTest) (ok bool)</pre> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="Short">func <a href="/src/pkg/testing/testing.go?s=4859:4876#L117">Short</a></h2> |
||||
<pre>func Short() bool</pre> |
||||
<p> |
||||
Short reports whether the -test.short flag is set. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="B">type <a href="/src/pkg/testing/benchmark.go?s=743:872#L17">B</a></h2> |
||||
<pre>type B struct { |
||||
N int |
||||
<span class="comment">// contains filtered or unexported fields</span> |
||||
}</pre> |
||||
<p> |
||||
B is a type passed to Benchmark functions to manage benchmark |
||||
timing and to specify the number of iterations to run. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.Error">func (*B) <a href="/src/pkg/testing/testing.go?s=8110:8153#L209">Error</a></h3> |
||||
<pre>func (c *B) Error(args ...interface{})</pre> |
||||
<p> |
||||
Error is equivalent to Log() followed by Fail(). |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.Errorf">func (*B) <a href="/src/pkg/testing/testing.go?s=8253:8312#L215">Errorf</a></h3> |
||||
<pre>func (c *B) Errorf(format string, args ...interface{})</pre> |
||||
<p> |
||||
Errorf is equivalent to Logf() followed by Fail(). |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.Fail">func (*B) <a href="/src/pkg/testing/testing.go?s=6270:6293#L163">Fail</a></h3> |
||||
<pre>func (c *B) Fail()</pre> |
||||
<p> |
||||
Fail marks the function as having failed but continues execution. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.FailNow">func (*B) <a href="/src/pkg/testing/testing.go?s=6548:6574#L170">FailNow</a></h3> |
||||
<pre>func (c *B) FailNow()</pre> |
||||
<p> |
||||
FailNow marks the function as having failed and stops its execution. |
||||
Execution will continue at the next test or benchmark. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.Failed">func (*B) <a href="/src/pkg/testing/testing.go?s=6366:6396#L166">Failed</a></h3> |
||||
<pre>func (c *B) Failed() bool</pre> |
||||
<p> |
||||
Failed returns whether the function has failed. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.Fatal">func (*B) <a href="/src/pkg/testing/testing.go?s=8420:8463#L221">Fatal</a></h3> |
||||
<pre>func (c *B) Fatal(args ...interface{})</pre> |
||||
<p> |
||||
Fatal is equivalent to Log() followed by FailNow(). |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.Fatalf">func (*B) <a href="/src/pkg/testing/testing.go?s=8569:8628#L227">Fatalf</a></h3> |
||||
<pre>func (c *B) Fatalf(format string, args ...interface{})</pre> |
||||
<p> |
||||
Fatalf is equivalent to Logf() followed by FailNow(). |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.Log">func (*B) <a href="/src/pkg/testing/testing.go?s=7763:7804#L202">Log</a></h3> |
||||
<pre>func (c *B) Log(args ...interface{})</pre> |
||||
<p> |
||||
Log formats its arguments using default formatting, analogous to Println(), |
||||
and records the text in the error log. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.Logf">func (*B) <a href="/src/pkg/testing/testing.go?s=7959:8016#L206">Logf</a></h3> |
||||
<pre>func (c *B) Logf(format string, args ...interface{})</pre> |
||||
<p> |
||||
Logf formats its arguments according to the format, analogous to Printf(), |
||||
and records the text in the error log. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.ResetTimer">func (*B) <a href="/src/pkg/testing/benchmark.go?s=1503:1527#L48">ResetTimer</a></h3> |
||||
<pre>func (b *B) ResetTimer()</pre> |
||||
<p> |
||||
ResetTimer sets the elapsed benchmark time to zero. |
||||
It does not affect whether the timer is running. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.SetBytes">func (*B) <a href="/src/pkg/testing/benchmark.go?s=1728:1757#L57">SetBytes</a></h3> |
||||
<pre>func (b *B) SetBytes(n int64)</pre> |
||||
<p> |
||||
SetBytes records the number of bytes processed in a single operation. |
||||
If this is called, the benchmark will report ns/op and MB/s. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.StartTimer">func (*B) <a href="/src/pkg/testing/benchmark.go?s=1047:1071#L29">StartTimer</a></h3> |
||||
<pre>func (b *B) StartTimer()</pre> |
||||
<p> |
||||
StartTimer starts timing a test. This function is called automatically |
||||
before a benchmark starts, but it can also used to resume timing after |
||||
a call to StopTimer. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="B.StopTimer">func (*B) <a href="/src/pkg/testing/benchmark.go?s=1288:1311#L39">StopTimer</a></h3> |
||||
<pre>func (b *B) StopTimer()</pre> |
||||
<p> |
||||
StopTimer stops timing a test. This can be used to pause the timer |
||||
while performing complex initialization that you don't |
||||
want to measure. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="BenchmarkResult">type <a href="/src/pkg/testing/benchmark.go?s=4206:4391#L165">BenchmarkResult</a></h2> |
||||
<pre>type BenchmarkResult struct { |
||||
N int <span class="comment">// The number of iterations.</span> |
||||
T time.Duration <span class="comment">// The total time taken.</span> |
||||
Bytes int64 <span class="comment">// Bytes processed in one iteration.</span> |
||||
}</pre> |
||||
<p> |
||||
The results of a benchmark run. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="Benchmark">func <a href="/src/pkg/testing/benchmark.go?s=7545:7589#L275">Benchmark</a></h3> |
||||
<pre>func Benchmark(f func(b *B)) BenchmarkResult</pre> |
||||
<p> |
||||
Benchmark benchmarks a single function. Useful for creating |
||||
custom benchmarks that do not use the "go test" command. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="BenchmarkResult.NsPerOp">func (BenchmarkResult) <a href="/src/pkg/testing/benchmark.go?s=4393:4433#L171">NsPerOp</a></h3> |
||||
<pre>func (r BenchmarkResult) NsPerOp() int64</pre> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="BenchmarkResult.String">func (BenchmarkResult) <a href="/src/pkg/testing/benchmark.go?s=4677:4717#L185">String</a></h3> |
||||
<pre>func (r BenchmarkResult) String() string</pre> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="InternalBenchmark">type <a href="/src/pkg/testing/benchmark.go?s=555:618#L10">InternalBenchmark</a></h2> |
||||
<pre>type InternalBenchmark struct { |
||||
Name string |
||||
F func(b *B) |
||||
}</pre> |
||||
<p> |
||||
An internal type but exported because it is cross-package; part of the implementation |
||||
of the "go test" command. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="InternalExample">type <a href="/src/pkg/testing/example.go?s=236:312#L6">InternalExample</a></h2> |
||||
<pre>type InternalExample struct { |
||||
Name string |
||||
F func() |
||||
Output string |
||||
}</pre> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="InternalTest">type <a href="/src/pkg/testing/testing.go?s=9065:9121#L241">InternalTest</a></h2> |
||||
<pre>type InternalTest struct { |
||||
Name string |
||||
F func(*T) |
||||
}</pre> |
||||
<p> |
||||
An internal type but exported because it is cross-package; part of the implementation |
||||
of the "go test" command. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="T">type <a href="/src/pkg/testing/testing.go?s=6070:6199#L156">T</a></h2> |
||||
<pre>type T struct { |
||||
<span class="comment">// contains filtered or unexported fields</span> |
||||
}</pre> |
||||
<p> |
||||
T is a type passed to Test functions to manage test state and support formatted test logs. |
||||
Logs are accumulated during execution and dumped to standard error when done. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="T.Error">func (*T) <a href="/src/pkg/testing/testing.go?s=8110:8153#L209">Error</a></h3> |
||||
<pre>func (c *T) Error(args ...interface{})</pre> |
||||
<p> |
||||
Error is equivalent to Log() followed by Fail(). |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="T.Errorf">func (*T) <a href="/src/pkg/testing/testing.go?s=8253:8312#L215">Errorf</a></h3> |
||||
<pre>func (c *T) Errorf(format string, args ...interface{})</pre> |
||||
<p> |
||||
Errorf is equivalent to Logf() followed by Fail(). |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="T.Fail">func (*T) <a href="/src/pkg/testing/testing.go?s=6270:6293#L163">Fail</a></h3> |
||||
<pre>func (c *T) Fail()</pre> |
||||
<p> |
||||
Fail marks the function as having failed but continues execution. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="T.FailNow">func (*T) <a href="/src/pkg/testing/testing.go?s=6548:6574#L170">FailNow</a></h3> |
||||
<pre>func (c *T) FailNow()</pre> |
||||
<p> |
||||
FailNow marks the function as having failed and stops its execution. |
||||
Execution will continue at the next test or benchmark. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="T.Failed">func (*T) <a href="/src/pkg/testing/testing.go?s=6366:6396#L166">Failed</a></h3> |
||||
<pre>func (c *T) Failed() bool</pre> |
||||
<p> |
||||
Failed returns whether the function has failed. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="T.Fatal">func (*T) <a href="/src/pkg/testing/testing.go?s=8420:8463#L221">Fatal</a></h3> |
||||
<pre>func (c *T) Fatal(args ...interface{})</pre> |
||||
<p> |
||||
Fatal is equivalent to Log() followed by FailNow(). |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="T.Fatalf">func (*T) <a href="/src/pkg/testing/testing.go?s=8569:8628#L227">Fatalf</a></h3> |
||||
<pre>func (c *T) Fatalf(format string, args ...interface{})</pre> |
||||
<p> |
||||
Fatalf is equivalent to Logf() followed by FailNow(). |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="T.Log">func (*T) <a href="/src/pkg/testing/testing.go?s=7763:7804#L202">Log</a></h3> |
||||
<pre>func (c *T) Log(args ...interface{})</pre> |
||||
<p> |
||||
Log formats its arguments using default formatting, analogous to Println(), |
||||
and records the text in the error log. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="T.Logf">func (*T) <a href="/src/pkg/testing/testing.go?s=7959:8016#L206">Logf</a></h3> |
||||
<pre>func (c *T) Logf(format string, args ...interface{})</pre> |
||||
<p> |
||||
Logf formats its arguments according to the format, analogous to Printf(), |
||||
and records the text in the error log. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="T.Parallel">func (*T) <a href="/src/pkg/testing/testing.go?s=8809:8831#L234">Parallel</a></h3> |
||||
<pre>func (t *T) Parallel()</pre> |
||||
<p> |
||||
Parallel signals that this test is to be run in parallel with (and only with) |
||||
other parallel tests in this CPU group. |
||||
</p> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 id="subdirectories">Subdirectories</h2> |
||||
|
||||
<table class="dir"> |
||||
<tr> |
||||
<th>Name</th> |
||||
<th> </th> |
||||
<th style="text-align: left; width: auto">Synopsis</th> |
||||
</tr> |
||||
|
||||
<tr> |
||||
<td><a href="..">..</a></td> |
||||
</tr> |
||||
|
||||
|
||||
|
||||
<tr> |
||||
<td class="name"><a href="iotest">iotest</a></td> |
||||
<td> </td> |
||||
<td style="width: auto">Package iotest implements Readers and Writers useful mainly for testing.</td> |
||||
</tr> |
||||
|
||||
|
||||
|
||||
<tr> |
||||
<td class="name"><a href="quick">quick</a></td> |
||||
<td> </td> |
||||
<td style="width: auto">Package quick implements utility functions to help with black box testing.</td> |
||||
</tr> |
||||
|
||||
|
||||
</table> |
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
|
||||
<div id="footer"> |
||||
Build version go1.0.2.<br> |
||||
Except as <a href="http://code.google.com/policies.html#restrictions">noted</a>, |
||||
the content of this page is licensed under the |
||||
Creative Commons Attribution 3.0 License, |
||||
and code is licensed under a <a href="/LICENSE">BSD license</a>.<br> |
||||
<a href="/doc/tos.html">Terms of Service</a> | |
||||
<a href="http://www.google.com/intl/en/privacy/privacy-policy.html">Privacy Policy</a> |
||||
</div> |
||||
|
||||
<script type="text/javascript"> |
||||
(function() { |
||||
var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true; |
||||
ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js"; |
||||
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s); |
||||
})(); |
||||
</script> |
||||
</body> |
||||
<script type="text/javascript"> |
||||
(function() { |
||||
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; |
||||
po.src = 'https://apis.google.com/js/plusone.js'; |
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); |
||||
})(); |
||||
</script> |
||||
</html> |
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,413 +0,0 @@
@@ -1,413 +0,0 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" > |
||||
<head><meta http-equiv="X-UA-Compatible" content="IE=8" /> |
||||
|
||||
<meta name="keywords" content="metal, reviews, metalreview, metalreviews, heavy, rock, review, music, blogs, forums, community" /> |
||||
<meta name="description" content="Critical heavy metal album and dvd reviews, written by professional writers. Large community with forums, blogs, photos and commenting system." /> |
||||
|
||||
<title> |
||||
|
||||
|
||||
Metal Reviews, News, Blogs, Interviews and Community | Metal Review |
||||
|
||||
|
||||
</title><link rel="stylesheet" type="text/css" href="/Content/Css/reset-fonts-grids.css" /><link rel="stylesheet" type="text/css" href="/Content/Css/base.css" /><link rel="stylesheet" type="text/css" href="/Content/Css/core.css" /><link rel="stylesheet" type="text/css" href="/Content/Css/wt-rotator.css" /> |
||||
<script src="/Scripts/jquery-1.4.2.min.js" type="text/javascript"></script> |
||||
</head> |
||||
<body> |
||||
<script type="text/javascript"> |
||||
var _comscore = _comscore || []; |
||||
_comscore.push({ c1: "2", c2: "9290245" }); |
||||
(function () { |
||||
var s = document.createElement("script"), el = document.getElementsByTagName("script")[0]; s.async = true; |
||||
s.src = (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js"; |
||||
el.parentNode.insertBefore(s, el); |
||||
})(); |
||||
</script> |
||||
<noscript> |
||||
<img src="http://b.scorecardresearch.com/p?c1=2&c2=9290245&cv=2.0&cj=1" /> |
||||
</noscript> |
||||
|
||||
|
||||
<div id="doc2" class="yui-t7"> |
||||
<div id="hd"> |
||||
|
||||
|
||||
<div id="main-logo"><a href="/" title="Home"><img src="/Content/Images/metal-review-logo.png" alt="Metal Review Home" border="0" /></a></div> |
||||
<div id="leaderboard-banner"> |
||||
|
||||
<script language="javascript" type="text/javascript"><!-- |
||||
document.write('<scr' + 'ipt language="javascript1.1" src="http://adserver.adtechus.com/addyn/3.0/5110/73085/0/225/ADTECH;loc=100;target=_blank;key=key1+key2+key3+key4;grp=[group];misc=' + new Date().getTime() + '"></scri' + 'pt>'); |
||||
//--> |
||||
</script> |
||||
|
||||
<noscript> |
||||
<a href="http://adserver.adtechus.com/adlink/3.0/5110/73085/0/225/ADTECH;loc=300;key=key1+key2+key3+key4;grp=[group]" target="_blank"> |
||||
<img src="http://adserver.adtechus.com/adserv/3.0/5110/73085/0/225/ADTECH;loc=300;key=key1+key2+key3+key4;grp=[group]" border="0" width="728" height="90" /> |
||||
</a> |
||||
</noscript> |
||||
</div> |
||||
<div id="header-menu-container"> |
||||
<div id="header-menu"> |
||||
<a href="/reviews/browse">REVIEWS</a> |
||||
<a href="http://community2.metalreview.com/blogs/editorials/default.aspx">FEATURES</a> |
||||
<a href="/artists/browse">ARTISTS</a> |
||||
<a href="/reviews/pipeline">PIPELINE</a> |
||||
<a href="http://community2.metalreview.com/forums">FORUMS</a> |
||||
<a href="http://community2.metalreview.com/blogs/">BLOGS</a> |
||||
<a href="/aboutus">ABOUT US</a> |
||||
</div> |
||||
|
||||
<div id="sign-in"><a href="https://metalreview.com/account/signin">SIGN IN</a> | <a href="/account/register">JOIN US</a></div> |
||||
|
||||
</div> |
||||
</div> |
||||
<div id="bd"> |
||||
|
||||
<div id="yui-main"> |
||||
<div class="yui-b"> |
||||
<div class="yui-g"> |
||||
<div class="yui-u first"> |
||||
|
||||
|
||||
|
||||
<script src="/Scripts/jquery.wt-rotator.min.js" type="text/javascript"></script> |
||||
<script src="/Scripts/jquery.wt-rotator-initialize.js" type="text/javascript"></script> |
||||
<div id="review-showcase-wrapper"> |
||||
<h2 id="showcase-heading">Reviews</h2> |
||||
<div id="review-showcase"> |
||||
<div class="container"> |
||||
<div class="wt-rotator"> |
||||
<a href="#"></a> |
||||
<div class="desc"> |
||||
</div> |
||||
<div class="preloader"> |
||||
</div> |
||||
<div class="c-panel"> |
||||
<div class="buttons"> |
||||
<div class="prev-btn"> |
||||
</div> |
||||
<div class="play-btn"> |
||||
</div> |
||||
<div class="next-btn"> |
||||
</div> |
||||
</div> |
||||
<div class="thumbnails"> |
||||
<ul> |
||||
|
||||
<li><a href="artist.photo?mrx=4641" title="Serpentine Path - Serpentine Path"></a><a href="/reviews/6844/serpentine-path-serpentine-path"></a> |
||||
<p style="top: 130px; left: 22px; width: 305px; height:60px;"> |
||||
<img class="rotator-cover-art" src="album.cover?art=6844" alt='Serpentine Path - Serpentine Path' title='Serpentine Path - Serpentine Path' /> |
||||
<span class="title"><strong>Serpentine Path</strong></span><br /> |
||||
Serpentine Path<br /> |
||||
|
||||
</p> |
||||
</li> |
||||
|
||||
<li><a href="artist.photo?mrx=4635" title="Hunter's Ground - No God But the Wild"></a><a href="/reviews/6830/hunters-ground-no-god-but-the-wild"></a> |
||||
<p style="top: 130px; left: 22px; width: 305px; height:60px;"> |
||||
<img class="rotator-cover-art" src="album.cover?art=6830" alt='Hunter's Ground - No God But the Wild' title='Hunter's Ground - No God But the Wild' /> |
||||
<span class="title"><strong>Hunter's Ground</strong></span><br /> |
||||
No God But the Wild<br /> |
||||
|
||||
</p> |
||||
</li> |
||||
|
||||
<li><a href="artist.photo?mrx=1035" title="Blut Aus Nord - 777 - Cosmosophy"></a><a href="/reviews/6829/blut-aus-nord-777---cosmosophy"></a> |
||||
<p style="top: 130px; left: 22px; width: 305px; height:60px;"> |
||||
<img class="rotator-cover-art" src="album.cover?art=6829" alt='Blut Aus Nord - 777 - Cosmosophy' title='Blut Aus Nord - 777 - Cosmosophy' /> |
||||
<span class="title"><strong>Blut Aus Nord</strong></span><br /> |
||||
777 - Cosmosophy<br /> |
||||
<a href="/tags/10/black"><span class="tag">Black</span></a> |
||||
</p> |
||||
</li> |
||||
|
||||
<li><a href="artist.photo?mrx=1217" title="Ufomammut - Oro: Opus Alter"></a><a href="/reviews/6835/ufomammut-oro--opus-alter"></a> |
||||
<p style="top: 130px; left: 22px; width: 305px; height:60px;"> |
||||
<img class="rotator-cover-art" src="album.cover?art=6835" alt='Ufomammut - Oro: Opus Alter' title='Ufomammut - Oro: Opus Alter' /> |
||||
<span class="title"><strong>Ufomammut</strong></span><br /> |
||||
Oro: Opus Alter<br /> |
||||
<a href="/tags/2/doom"><span class="tag">Doom</span></a> |
||||
</p> |
||||
</li> |
||||
|
||||
<li><a href="artist.photo?mrx=4590" title="Resurgency - False Enlightenment"></a><a href="/reviews/6746/resurgency-false-enlightenment"></a> |
||||
<p style="top: 130px; left: 22px; width: 305px; height:60px;"> |
||||
<img class="rotator-cover-art" src="album.cover?art=6746" alt='Resurgency - False Enlightenment' title='Resurgency - False Enlightenment' /> |
||||
<span class="title"><strong>Resurgency</strong></span><br /> |
||||
False Enlightenment<br /> |
||||
<a href="/tags/1/death"><span class="tag">Death</span></a> |
||||
</p> |
||||
</li> |
||||
|
||||
<li><a href="artist.photo?mrx=1360" title="Morgoth - Cursed to Live"></a><a href="/reviews/6800/morgoth-cursed-to-live"></a> |
||||
<p style="top: 130px; left: 22px; width: 305px; height:60px;"> |
||||
<img class="rotator-cover-art" src="album.cover?art=6800" alt='Morgoth - Cursed to Live' title='Morgoth - Cursed to Live' /> |
||||
<span class="title"><strong>Morgoth</strong></span><br /> |
||||
Cursed to Live<br /> |
||||
<a href="/tags/1/death"><span class="tag">Death</span></a><a href="/tags/31/live"><span class="tag">Live</span></a> |
||||
</p> |
||||
</li> |
||||
|
||||
<li><a href="artist.photo?mrx=3879" title="Krallice - Years Past Matter"></a><a href="/reviews/6853/krallice-years-past-matter"></a> |
||||
<p style="top: 130px; left: 22px; width: 305px; height:60px;"> |
||||
<img class="rotator-cover-art" src="album.cover?art=6853" alt='Krallice - Years Past Matter' title='Krallice - Years Past Matter' /> |
||||
<span class="title"><strong>Krallice</strong></span><br /> |
||||
Years Past Matter<br /> |
||||
<a href="/tags/10/black"><span class="tag">Black</span></a> |
||||
</p> |
||||
</li> |
||||
|
||||
<li><a href="artist.photo?mrx=4243" title="Murder Construct - Results"></a><a href="/reviews/6782/murder-construct-results"></a> |
||||
<p style="top: 130px; left: 22px; width: 305px; height:60px;"> |
||||
<img class="rotator-cover-art" src="album.cover?art=6782" alt='Murder Construct - Results' title='Murder Construct - Results' /> |
||||
<span class="title"><strong>Murder Construct</strong></span><br /> |
||||
Results<br /> |
||||
<a href="/tags/13/grindcore"><span class="tag">Grindcore</span></a> |
||||
</p> |
||||
</li> |
||||
|
||||
<li><a href="artist.photo?mrx=251" title="Grave - Endless Procession of Souls"></a><a href="/reviews/6834/grave-endless-procession-of-souls"></a> |
||||
<p style="top: 130px; left: 22px; width: 305px; height:60px;"> |
||||
<img class="rotator-cover-art" src="album.cover?art=6834" alt='Grave - Endless Procession of Souls' title='Grave - Endless Procession of Souls' /> |
||||
<span class="title"><strong>Grave</strong></span><br /> |
||||
Endless Procession of Souls<br /> |
||||
<a href="/tags/1/death"><span class="tag">Death</span></a> |
||||
</p> |
||||
</li> |
||||
|
||||
<li><a href="artist.photo?mrx=3508" title="Master - The New Elite"></a><a href="/reviews/6774/master-the-new-elite"></a> |
||||
<p style="top: 130px; left: 22px; width: 305px; height:60px;"> |
||||
<img class="rotator-cover-art" src="album.cover?art=6774" alt='Master - The New Elite' title='Master - The New Elite' /> |
||||
<span class="title"><strong>Master</strong></span><br /> |
||||
The New Elite<br /> |
||||
<a href="/tags/1/death"><span class="tag">Death</span></a> |
||||
</p> |
||||
</li> |
||||
|
||||
</ul> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div id="showcase-all-artist-albums"> |
||||
<a href="/reviews/6844/serpentine-path-serpentine-path"><img src="album.cover?art=6844" alt="Serpentine Path - Serpentine Path" /></a><a href="/reviews/6830/hunters-ground-no-god-but-the-wild"><img src="album.cover?art=6830" alt="Hunter's Ground - No God But the Wild" /></a><a href="/reviews/6829/blut-aus-nord-777---cosmosophy"><img src="album.cover?art=6829" alt="Blut Aus Nord - 777 - Cosmosophy" /></a><a href="/reviews/6835/ufomammut-oro--opus-alter"><img src="album.cover?art=6835" alt="Ufomammut - Oro: Opus Alter" /></a><a href="/reviews/6746/resurgency-false-enlightenment"><img src="album.cover?art=6746" alt="Resurgency - False Enlightenment" /></a><a href="/reviews/6800/morgoth-cursed-to-live"><img src="album.cover?art=6800" alt="Morgoth - Cursed to Live" /></a><a href="/reviews/6853/krallice-years-past-matter"><img src="album.cover?art=6853" alt="Krallice - Years Past Matter" /></a><a href="/reviews/6782/murder-construct-results"><img src="album.cover?art=6782" alt="Murder Construct - Results" /></a><a href="/reviews/6834/grave-endless-procession-of-souls"><img src="album.cover?art=6834" alt="Grave - Endless Procession of Souls" /></a><a href="/reviews/6774/master-the-new-elite"><img src="album.cover?art=6774" alt="Master - The New Elite" /></a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="yui-u"> |
||||
|
||||
|
||||
|
||||
<div id="feature-feed"> |
||||
<h2>Features</h2> |
||||
<div class="feature-feed-line"><a href="http://community2.metalreview.com/blogs/editorials/archive/2012/08/15/corsair-interview.aspx"><span class="feature-link"><strong>Release The SkyKrakken: Corsair Interview</strong></span></a><br /><span class="publish-date">8/15/2012 by JW</span><img align="left" src="http://community2.metalreview.com/cfs-file.ashx/__key/CommunityServer.Components.Avatars/00.00.00.21.25/4TMR3E1CWERK.jpg" alt="JW's Avatar" width="36px" height="40px" border="0" /></div> |
||||
<div class="feature-feed-line"><a href="http://community2.metalreview.com/blogs/editorials/archive/2012/08/09/riffology-kreative-evolution-part-iii.aspx"><span class="feature-link"><strong>Riffology: Kreative Evolution, Part III</strong></span></a><br /><span class="publish-date">8/9/2012 by Achilles</span><img align="left" src="http://community2.metalreview.com/cfs-file.ashx/__key/CommunityServer.Components.Avatars/00.00.00.21.44/4THUGH622I68.jpg" alt="Achilles's Avatar" width="40px" height="39px" border="0" /></div> |
||||
<div class="feature-feed-line"><a href="http://community2.metalreview.com/blogs/editorials/archive/2012/08/02/reverend-s-bazaar-don-t-trend-on-me.aspx"><span class="feature-link"><strong>Reverend's Bazaar - Don't Trend On Me </strong></span></a><br /><span class="publish-date">8/2/2012 by Reverend Campbell</span><img align="left" src="http://community2.metalreview.com/cfs-file.ashx/__key/CommunityServer.Components.Avatars/00.00.00.21.18/4TM06FD0ND4G.png" alt="Reverend Campbell's Avatar" width="34px" height="40px" border="0" /></div> |
||||
<div class="feature-feed-line"><a href="http://community2.metalreview.com/blogs/editorials/archive/2012/08/01/grand-theft-metal-three-for-free.aspx"><span class="feature-link"><strong>Grand Theft Metal - Free Four All </strong></span></a><br /><span class="publish-date">8/2/2012 by Dave</span><img align="left" src="http://community2.metalreview.com/cfs-file.ashx/__key/CommunityServer.Components.Avatars/00.00.00.22.16/4TKJCJQ00VFO.jpg" alt="Dave's Avatar" width="33px" height="40px" border="0" /></div> |
||||
<div class="feature-feed-line"><a href="http://community2.metalreview.com/blogs/editorials/archive/2012/07/29/monday-with-moonspell-the-interview.aspx"><span class="feature-link"><strong>A Monday with Moonspell: The Interview</strong></span></a><br /><span class="publish-date">7/29/2012 by raetamacue</span><img align="left" src="http://community2.metalreview.com/cfs-file.ashx/__key/CommunityServer.Components.Avatars/00.00.00.71.26/4TLIHKLUSXF4.jpg" alt="raetamacue's Avatar" width="37px" height="40px" border="0" /></div> |
||||
<div class="feature-feed-line"><a href="http://community2.metalreview.com/blogs/editorials/archive/2012/07/26/riffology-kreative-evolution-part-ii.aspx"><span class="feature-link"><strong>Riffology: Kreative Evolution Part II</strong></span></a><br /><span class="publish-date">7/26/2012 by Achilles</span><img align="left" src="http://community2.metalreview.com/cfs-file.ashx/__key/CommunityServer.Components.Avatars/00.00.00.21.44/4THUGH622I68.jpg" alt="Achilles's Avatar" width="40px" height="39px" border="0" /></div> |
||||
<div class="feature-feed-line"><a href="http://community2.metalreview.com/blogs/editorials/archive/2012/07/24/shadow-kingdom-records-giveaway.aspx"><span class="feature-link"><strong>WINNERS ANNOUNCED -- Shadow Kingdom Records Give...</strong></span></a><br /><span class="publish-date">7/24/2012 by Metal Review</span><img align="left" src="http://community2.metalreview.com/cfs-file.ashx/__key/CommunityServer.Components.Avatars/00.00.00.59.06/4TFD2N58B7BS.png" alt="Metal Review's Avatar" width="34px" height="40px" border="0" /></div> |
||||
|
||||
<br /> |
||||
<a href="http://community2.metalreview.com/blogs/editorials/default.aspx"><strong>More Editorials</strong></a> |
||||
</div> |
||||
|
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="yui-b"> |
||||
|
||||
|
||||
|
||||
<script src="/Scripts/jquery.cycle.all.min.js" type="text/javascript"></script> |
||||
<div id="slider-next-button"><img id="slider-next" src="/Content/Images/Backgrounds/rotator-next-button.png" alt="Goto Next Group" title="Goto Next Group" /></div> |
||||
<div id="slider-back-button"><img id="slider-back" src="/Content/Images/Backgrounds/rotator-back-button.png" alt="Goto Previous Group" title="Goto Previous Group" /></div> |
||||
<div id="latest-reviews-slider"> |
||||
<div class="slider-row"> |
||||
<div class="slider-item"><a href="/reviews/6795/midnight-complete-and-total-hell"><img src="album.cover?art=6795" alt="Midnight Complete and Total Hell" /><br /><strong>Midnight</strong><br /><em>Complete and Total Hell</em></a><div class="score">8.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6842/over-your-threshold-facticity"><img src="album.cover?art=6842" alt="Over Your Threshold Facticity" /><br /><strong>Over Your Threshold</strong><br /><em>Facticity</em></a><div class="score">6.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6813/nuclear-death-terror-chaos-reigns"><img src="album.cover?art=6813" alt="Nuclear Death Terror Chaos Reigns" /><br /><strong>Nuclear Death Terror</strong><br /><em>Chaos Reigns</em></a><div class="score">7.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6811/evoken-atra-mors"><img src="album.cover?art=6811" alt="Evoken Atra Mors" /><br /><strong>Evoken</strong><br /><em>Atra Mors</em></a><div class="score">9.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6807/blacklodge-machination"><img src="album.cover?art=6807" alt="Blacklodge MachinatioN" /><br /><strong>Blacklodge</strong><br /><em>MachinatioN</em></a><div class="score">5.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6832/prototype-catalyst"><img src="album.cover?art=6832" alt="Prototype Catalyst" /><br /><strong>Prototype</strong><br /><em>Catalyst</em></a><div class="score">8.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6822/hypnosia-horror-infernal"><img src="album.cover?art=6822" alt="Hypnosia Horror Infernal" /><br /><strong>Hypnosia</strong><br /><em>Horror Infernal</em></a><div class="score">7.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6787/om-advaitic-songs"><img src="album.cover?art=6787" alt="OM Advaitic Songs" /><br /><strong>OM</strong><br /><em>Advaitic Songs</em></a><div class="score">8.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6765/afgrund-the-age-of-dumb"><img src="album.cover?art=6765" alt="Afgrund The Age Of Dumb" /><br /><strong>Afgrund</strong><br /><em>The Age Of Dumb</em></a><div class="score">8.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6773/binah-hallucinating-in-resurrecture"><img src="album.cover?art=6773" alt="Binah Hallucinating in Resurrecture" /><br /><strong>Binah</strong><br /><em>Hallucinating in Resurrecture</em></a><div class="score">8.5</div></div> |
||||
</div> |
||||
<div class="slider-row"> |
||||
<div class="slider-item"><a href="/reviews/6802/deiphago-satan-alpha-omega"><img src="album.cover?art=6802" alt="Deiphago Satan Alpha Omega" /><br /><strong>Deiphago</strong><br /><em>Satan Alpha Omega</em></a><div class="score">8.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6719/conan-monnos"><img src="album.cover?art=6719" alt="Conan Monnos" /><br /><strong>Conan</strong><br /><em>Monnos</em></a><div class="score">8.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6702/alaric-alaric-atriarch---split-lp"><img src="album.cover?art=6702" alt="Alaric Alaric/Atriarch - Split LP" /><br /><strong>Alaric</strong><br /><em>Alaric/Atriarch - Split LP</em></a><div class="score">8.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6780/coven-worship-new-gods-(reissue)"><img src="album.cover?art=6780" alt="Coven Worship New Gods (Reissue)" /><br /><strong>Coven</strong><br /><em>Worship New Gods (Reissue)</em></a><div class="score">5.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6831/the-foreshadowing-second-world"><img src="album.cover?art=6831" alt="The Foreshadowing Second World" /><br /><strong>The Foreshadowing</strong><br /><em>Second World</em></a><div class="score">5.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6815/nether-regions-into-the-breach"><img src="album.cover?art=6815" alt="Nether Regions Into The Breach" /><br /><strong>Nether Regions</strong><br /><em>Into The Breach</em></a><div class="score">7.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6824/agalloch-faustian-echoes"><img src="album.cover?art=6824" alt="Agalloch Faustian Echoes" /><br /><strong>Agalloch</strong><br /><em>Faustian Echoes</em></a><div class="score">9.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6805/a-forest-of-stars-a-shadowplay-for-yesterdays"><img src="album.cover?art=6805" alt="A Forest Of Stars A Shadowplay For Yesterdays" /><br /><strong>A Forest Of Stars</strong><br /><em>A Shadowplay For Yesterdays</em></a><div class="score">9.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6763/de-profundis-the-emptiness-within"><img src="album.cover?art=6763" alt="De Profundis The Emptiness Within" /><br /><strong>De Profundis</strong><br /><em>The Emptiness Within</em></a><div class="score">7.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6826/ozzy-osbourne-speak-of-the-devil"><img src="album.cover?art=6826" alt="Ozzy Osbourne Speak of the Devil" /><br /><strong>Ozzy Osbourne</strong><br /><em>Speak of the Devil</em></a><div class="score">7.5</div></div> |
||||
</div> |
||||
<div class="slider-row"> |
||||
<div class="slider-item"><a href="/reviews/6825/testament-dark-roots-of-earth"><img src="album.cover?art=6825" alt="Testament Dark Roots of Earth" /><br /><strong>Testament</strong><br /><em>Dark Roots of Earth</em></a><div class="score">8.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6796/eagle-twin-the-feather-tipped-the-serpents-scale"><img src="album.cover?art=6796" alt="Eagle Twin The Feather Tipped The Serpent's Scale" /><br /><strong>Eagle Twin</strong><br /><em>The Feather Tipped The Serpent's Scale</em></a><div class="score">8.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6609/king-forged-by-satans-doctrine"><img src="album.cover?art=6609" alt="King Forged by Satan's Doctrine" /><br /><strong>King</strong><br /><em>Forged by Satan's Doctrine</em></a><div class="score">5.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6798/khors-wisdom-of-centuries"><img src="album.cover?art=6798" alt="Khors Wisdom of Centuries" /><br /><strong>Khors</strong><br /><em>Wisdom of Centuries</em></a><div class="score">8.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6776/samothrace-reverence-to-stone"><img src="album.cover?art=6776" alt="Samothrace Reverence To Stone" /><br /><strong>Samothrace</strong><br /><em>Reverence To Stone</em></a><div class="score">8.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6784/horseback-on-the-eclipse"><img src="album.cover?art=6784" alt="Horseback On the Eclipse" /><br /><strong>Horseback</strong><br /><em>On the Eclipse</em></a><div class="score">8.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6690/incoming-cerebral-overdrive-le-stelle--a-voyage-adrift"><img src="album.cover?art=6690" alt="Incoming Cerebral Overdrive Le Stelle: A Voyage Adrift" /><br /><strong>Incoming Cerebral Overdrive</strong><br /><em>Le Stelle: A Voyage Adrift</em></a><div class="score">7.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6658/struck-by-lightning-true-predation"><img src="album.cover?art=6658" alt="Struck By Lightning True Predation" /><br /><strong>Struck By Lightning</strong><br /><em>True Predation</em></a><div class="score">7.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6772/offending-age-of-perversion"><img src="album.cover?art=6772" alt="Offending Age of Perversion" /><br /><strong>Offending</strong><br /><em>Age of Perversion</em></a><div class="score">7.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6804/king-of-asgard----to-north"><img src="album.cover?art=6804" alt="King Of Asgard ...to North" /><br /><strong>King Of Asgard</strong><br /><em>...to North</em></a><div class="score">7.5</div></div> |
||||
</div> |
||||
<div class="slider-row"> |
||||
<div class="slider-item"><a href="/reviews/6783/burning-love-rotten-thing-to-say"><img src="album.cover?art=6783" alt="Burning Love Rotten Thing to Say" /><br /><strong>Burning Love</strong><br /><em>Rotten Thing to Say</em></a><div class="score">7.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6770/high-on-fire-the-art-of-self-defense-(reissue)"><img src="album.cover?art=6770" alt="High On Fire The Art Of Self Defense (Reissue)" /><br /><strong>High On Fire</strong><br /><em>The Art Of Self Defense (Reissue)</em></a><div class="score">7.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6660/horseback-half-blood"><img src="album.cover?art=6660" alt="Horseback Half Blood" /><br /><strong>Horseback</strong><br /><em>Half Blood</em></a><div class="score">6.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6732/aldebaran-embracing-the-lightless-depths"><img src="album.cover?art=6732" alt="Aldebaran Embracing the Lightless Depths" /><br /><strong>Aldebaran</strong><br /><em>Embracing the Lightless Depths</em></a><div class="score">8.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6778/tank-war-nation"><img src="album.cover?art=6778" alt="Tank War Nation" /><br /><strong>Tank</strong><br /><em>War Nation</em></a><div class="score">6.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6793/satanic-bloodspraying-at-the-mercy-of-satan"><img src="album.cover?art=6793" alt="Satanic Bloodspraying At the Mercy of Satan" /><br /><strong>Satanic Bloodspraying</strong><br /><em>At the Mercy of Satan</em></a><div class="score">8.5</div></div> |
||||
<div class="slider-item"><a href="/reviews/6791/from-ashes-rise-rejoice-the-end---rage-of-sanity"><img src="album.cover?art=6791" alt="From Ashes Rise Rejoice The End / Rage Of Sanity" /><br /><strong>From Ashes Rise</strong><br /><em>Rejoice The End / Rage Of Sanity</em></a><div class="score">8.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6743/ereb-altor-gastrike"><img src="album.cover?art=6743" alt="Ereb Altor Gastrike" /><br /><strong>Ereb Altor</strong><br /><em>Gastrike</em></a><div class="score">8.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6794/catheter-southwest-doom-violence"><img src="album.cover?art=6794" alt="Catheter Southwest Doom Violence" /><br /><strong>Catheter</strong><br /><em>Southwest Doom Violence</em></a><div class="score">7.0</div></div> |
||||
<div class="slider-item"><a href="/reviews/6759/power-theory-an-axe-to-grind"><img src="album.cover?art=6759" alt="Power Theory An Axe to Grind" /><br /><strong>Power Theory</strong><br /><em>An Axe to Grind</em></a><div class="score">6.0</div></div> |
||||
</div> |
||||
|
||||
</div> |
||||
|
||||
|
||||
<script type="text/javascript"> |
||||
$(document).ready(function () { |
||||
$('#latest-reviews-slider').cycle({ |
||||
fx: 'scrollRight', |
||||
speed: 'fast', |
||||
timeout: 0, |
||||
next: '#slider-next-button', |
||||
prev: '#slider-back-button' |
||||
}); |
||||
}); |
||||
</script> |
||||
|
||||
<div id="homepage-mid-horizontal-zone"> |
||||
<script language="javascript" type="text/javascript" src="http://metalreview.com/bannermgr/abm.aspx?z=1"></script> |
||||
</div> |
||||
|
||||
|
||||
|
||||
|
||||
<div id="news-feed"> |
||||
<h2>News</h2><div class="news-feed-line"><a href="http://www.bravewords.com/news/190057" target="_blank"><span class="news-link"><strong><span class="new-news">NEW</span> CENTURIAN To Release Contra Rationem Album This Winter</strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190056" target="_blank"><span class="news-link"><strong><span class="new-news">NEW</span> Southwest Terror Fest 2012 - Lineup Changes Announced</strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190055" target="_blank"><span class="news-link"><strong><span class="new-news">NEW</span> ROB ZOMBIE Premiers The Lords Of Salem At TIFF; Q&A Video Posted</strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190054" target="_blank"><span class="news-link"><strong><span class="new-news">NEW</span> THIN LIZZY Keyboardist Darren Wharton's DARE - Calm Before The Storm 2 Album Details Revealed</strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190053" target="_blank"><span class="news-link"><strong><span class="new-news">NEW</span> Japan's LIV MOON To Release Fourth Album; Features Past/Present Members Of EUROPE, ANGRA, HAMMERFALL</strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190052" target="_blank"><span class="news-link"><strong><span class="new-news">NEW</span> SLASH - Sydney Show To Premier This Friday, Free And In HD; Trailer Posted</strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190051" target="_blank"><span class="news-link"><strong><span class="new-news">NEW</span> KHAØS - New Band Featuring Members Of OUTLOUD, TRIBAL, JORN And ELIS To Release New EP In October; Teaser Posted </strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190050" target="_blank"><span class="news-link"><strong><span class="new-news">NEW</span> RECKLESS LOVE Confirm Guests For London Residency Shows In October</strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190049" target="_blank"><span class="news-link"><strong>NASHVILLE PUSSY Add Dates In France, Sweden To European Tour Schedule; Bassist Karen Cuda Sidelined With Back Injury </strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190048" target="_blank"><span class="news-link"><strong>CALIBAN Post Behind-The-Scenes Tour Footage</strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190047" target="_blank"><span class="news-link"><strong>Ex-MERCYFUL FATE Drummer Kim Ruzz Forms New Band METALRUZZ</strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
<div class="news-feed-line"><a href="http://www.bravewords.com/news/190046" target="_blank"><span class="news-link"><strong>GRAVE Mainman On Endless Procession Of Souls - "These Are The Most ‘Song-Oriented’ Tracks We’ve Done In A Long Time"</strong></span></a><br /><span class="publish-date">9/12/2012</span></div><br /> |
||||
|
||||
</div> |
||||
|
||||
|
||||
<div id="lashes-feed"> |
||||
<h2>Lashes</h2> |
||||
<div class="lashes-feed-line"><a href="/reviews/6855/katatonia-dead-end-kings#81760"><span class="new-lash">NEW</span> <span class="lashes-link"><strong>Katatonia - Dead End Kings</strong></span></a><br /><span class="publish-date">45 minutes ago by Chaosjunkie</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6855/katatonia-dead-end-kings#81759"><span class="lashes-link"><strong>Katatonia - Dead End Kings</strong></span></a><br /><span class="publish-date">1 hour ago by Harry Dick Rotten</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6746/resurgency-false-enlightenment#81758"><span class="lashes-link"><strong>Resurgency - False Enlightenment</strong></span></a><br /><span class="publish-date">3 hours ago by Anonymous</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/4095/witchcraft-the-alchemist#81757"><span class="lashes-link"><strong>Witchcraft - The Alchemist</strong></span></a><br /><span class="publish-date">5 hours ago by Luke_22</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6855/katatonia-dead-end-kings#81756"><span class="lashes-link"><strong>Katatonia - Dead End Kings</strong></span></a><br /><span class="publish-date">9 hours ago by chaosjunkie</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6855/katatonia-dead-end-kings#81755"><span class="lashes-link"><strong>Katatonia - Dead End Kings</strong></span></a><br /><span class="publish-date">10 hours ago by Compeller</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6827/manetheren-time#81754"><span class="lashes-link"><strong>Manetheren - Time</strong></span></a><br /><span class="publish-date">10 hours ago by xpmule</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6835/ufomammut-oro--opus-alter#81753"><span class="lashes-link"><strong>Ufomammut - Oro: Opus Alter</strong></span></a><br /><span class="publish-date">16 hours ago by Anonymous</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6835/ufomammut-oro--opus-alter#81752"><span class="lashes-link"><strong>Ufomammut - Oro: Opus Alter</strong></span></a><br /><span class="publish-date">17 hours ago by Harry Dick Rotten</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6855/katatonia-dead-end-kings#81751"><span class="lashes-link"><strong>Katatonia - Dead End Kings</strong></span></a><br /><span class="publish-date">yesterday by Chaosjunkie</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6855/katatonia-dead-end-kings#81750"><span class="lashes-link"><strong>Katatonia - Dead End Kings</strong></span></a><br /><span class="publish-date">yesterday by Anonymous</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6855/katatonia-dead-end-kings#81749"><span class="lashes-link"><strong>Katatonia - Dead End Kings</strong></span></a><br /><span class="publish-date">yesterday by Anonymous</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6855/katatonia-dead-end-kings#81748"><span class="lashes-link"><strong>Katatonia - Dead End Kings</strong></span></a><br /><span class="publish-date">yesterday by Anonymous</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6855/katatonia-dead-end-kings#81747"><span class="lashes-link"><strong>Katatonia - Dead End Kings</strong></span></a><br /><span class="publish-date">yesterday by frantic</span></div> |
||||
<div class="lashes-feed-line"><a href="/reviews/6829/blut-aus-nord-777---cosmosophy#81746"><span class="lashes-link"><strong>Blut Aus Nord - 777 - Cosmosophy</strong></span></a><br /><span class="publish-date">yesterday by Dimensional Bleedthrough</span></div> |
||||
|
||||
</div> |
||||
|
||||
</div> |
||||
</div> |
||||
<div id="ft"> |
||||
|
||||
|
||||
<div id="template-footer"> |
||||
<div class="left-column"> |
||||
<ul> |
||||
<li><a href="/">Home</a></li> |
||||
<li><a href="/reviews/browse">Reviews</a></li> |
||||
<li><a href="/tags">Genre Tags</a></li> |
||||
<li><a href="http://community2.metalreview.com/blogs/editorials/default.aspx">Features</a></li> |
||||
<li><a href="/artists/browse">Artists</a></li> |
||||
<li><a href="/reviews/pipeline">Pipeline</a></li> |
||||
<li><a href="http://community2.metalreview.com/forums">Forums</a></li> |
||||
<li><a href="/aboutus">About Us</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="middle-column"> |
||||
<ul> |
||||
<li><a href="/aboutus/disclaimer">Disclaimer</a></li> |
||||
<li><a href="/aboutus/privacypolicy">Privacy Policy</a></li> |
||||
<li><a href="/aboutus/advertising">Advertising</a></li> |
||||
<li><a href="http://community2.metalreview.com/blogs/eminor/archive/2008/10/27/write-for-metal-review.aspx">Write For Us</a></li> |
||||
<li><a href="/contactus">Contact Us</a></li> |
||||
<li><a href="/contactus">Digital Promos</a></li> |
||||
<li><a href="/contactus">Mailing Address</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="right-column"> |
||||
<ul> |
||||
<li><a href="http://feeds.feedburner.com/metalreviews">Reviews RSS Feed</a></li> |
||||
<li><a href="http://twitter.com/metalreview">Twitter</a></li> |
||||
<li><a href="http://www.myspace.com/metalreviewdotcom">MySpace</a></li> |
||||
<li><a href="http://www.last.fm/group/MetalReview.com">Last.fm</a></li> |
||||
<li><a href="http://www.facebook.com/pages/MetalReviewcom/48371319443">Facebook</a></li> |
||||
</ul> |
||||
</div> |
||||
<div class="square-ad"> |
||||
|
||||
|
||||
<!--JavaScript Tag // Tag for network 5110: Fixion Media // Website: Metalreview // Page: ROS // Placement: ROS-Middle-300 x 250 (1127996) // created at: Oct 19, 2009 6:48:27 PM--> |
||||
<script type="text/javascript" language="javascript"><!-- |
||||
document.write('<scr' + 'ipt language="javascript1.1" src="http://adserver.adtechus.com/addyn/3.0/5110/1127996/0/170/ADTECH;loc=100;target=_blank;key=key1+key2+key3+key4;grp=[group];misc=' + new Date().getTime() + '"></scri' + 'pt>'); |
||||
//--> |
||||
</script><noscript><a href="http://adserver.adtechus.com/adlink/3.0/5110/1127996/0/170/ADTECH;loc=300;key=key1+key2+key3+key4;grp=[group]" target="_blank"><img src="http://adserver.adtechus.com/adserv/3.0/5110/1127996/0/170/ADTECH;loc=300;key=key1+key2+key3+key4;grp=[group]" border="0" width="300" height="250"></a></noscript> |
||||
<!-- End of JavaScript Tag --> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script type="text/javascript"> |
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); |
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); |
||||
</script> |
||||
|
||||
<script type="text/javascript"> |
||||
var pageTracker = _gat._getTracker("UA-3455310-1"); |
||||
pageTracker._initData(); |
||||
pageTracker._trackPageview(); |
||||
</script> |
||||
|
||||
<!--JavaScript Tag // Tag for network 5110: Fixion Media // Website: Metalreview // Page: BACKGROUND ADS // Placement: BACKGROUND ADS-Top-1 x 1 (2186116) // created at: Aug 18, 2011 7:20:38 PM--> |
||||
<script language="javascript"><!-- |
||||
document.write('<scr' + 'ipt language="javascript1.1" src="http://adserver.adtechus.com/addyn/3.0/5110/2186116/0/16/ADTECH;loc=100;target=_blank;key=key1+key2+key3+key4;grp=[group];misc=' + new Date().getTime() + '"></scri' + 'pt>'); |
||||
//--> |
||||
</script><noscript><a href="http://adserver.adtechus.com/adlink/3.0/5110/2186116/0/16/ADTECH;loc=300;key=key1+key2+key3+key4;grp=[group]" target="_blank"><img src="http://adserver.adtechus.com/adserv/3.0/5110/2186116/0/16/ADTECH;loc=300;key=key1+key2+key3+key4;grp=[group]" border="0" width="1" height="1"></a></noscript> |
||||
<!-- End of JavaScript Tag --> |
||||
|
||||
</body> |
||||
</html> |
@ -1,102 +0,0 @@
@@ -1,102 +0,0 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en" ng-app="app"> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
||||
<title> |
||||
Provok.in |
||||
</title> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
||||
<meta name="description" content="Provok.in - Prove your point. State an affirmation, back it up with evidence, unveil the truth."> |
||||
<meta name="author" content="Martin Angers"> |
||||
<link href="http://fonts.googleapis.com/css?family=Belgrano" rel="stylesheet" type="text/css"> |
||||
<!--[if lt IE 9]><link href="http://fonts.googleapis.com/css?family=Belgrano" rel="stylesheet" type="text/css"><link href="http://fonts.googleapis.com/css?family=Belgrano:400italic" rel="stylesheet" type="text/css"><link href="http://fonts.googleapis.com/css?family=Belgrano:700" rel="stylesheet" type="text/css"><link href="http://fonts.googleapis.com/css?family=Belgrano:700italic" rel="stylesheet" type="text/css"><![endif]--> |
||||
<link href="/css/pvk.min.css" rel="stylesheet" type="text/css"> |
||||
</head> |
||||
<body> |
||||
<div class="container-fluid" id="cf1"> |
||||
<div class="row-fluid"> |
||||
<div class="pvk-gutter"> |
||||
|
||||
</div> |
||||
<div class="pvk-content" id="pc1"> |
||||
<div ng-controller="HeroCtrl" class="hero-unit"> |
||||
<div class="container-fluid" id="cf2"> |
||||
<div class="row-fluid" id="cf2-1"> |
||||
<div class="span12"> |
||||
<h1> |
||||
<a href="/">Provok<span class="green">.</span><span class="red">i</span>n</a> |
||||
</h1> |
||||
<p> |
||||
Prove your point. |
||||
</p> |
||||
</div> |
||||
</div> |
||||
<div class="row-fluid" id="cf2-2"> |
||||
<div class="span12 alert alert-error"> |
||||
<strong>Beta Version.</strong> Things may change. Or disappear. Or fail miserably. If it's the latter, <a href="https://github.com/PuerkitoBio/Provok.in-issues" target="_blank" class="link">please file an issue.</a> |
||||
</div> |
||||
</div> |
||||
<div ng-cloak="" ng-show="isLoggedOut() && !hideLogin" class="row-fluid" id="cf2-3"> |
||||
<a ng-href="{{ROUTES.login}}" class="btn btn-primary">Sign in. Painless.</a> <span>or</span> <a ng-href="{{ROUTES.help}}" class="link">learn more about provok.in.</a> |
||||
</div> |
||||
<div ng-cloak="" ng-show="isLoggedIn()" class="row-fluid logged-in-state" id="cf2-4"> |
||||
<span>Welcome,</span> <a ng-href="{{ROUTES.profile}}" class="link">{{getUserName()}}</a> <span>(</span> <a ng-click="doLogout($event)" class="link">logout</a> <span>)</span> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="pvk-gutter"> |
||||
|
||||
</div> |
||||
</div> |
||||
<div class="row-fluid"> |
||||
<div class="pvk-gutter"> |
||||
|
||||
</div> |
||||
<div class="pvk-content" id="pc2"> |
||||
<div class="container-fluid" id="cf3"> |
||||
<div class="row-fluid"> |
||||
<div ng-cloak="" view-on-display="" ng-controller="MsgCtrl" ng-class="{'displayed': blockIsDisplayed}" class="message-box"> |
||||
<div ng-class="{'alert-info': isInfo, 'alert-error': !isInfo, 'displayed': isDisplayed}" class="alert"> |
||||
<a ng-click="hideMessage(true, $event)" class="close">×</a> |
||||
<h4 class="alert-heading"> |
||||
{{ title }} |
||||
</h4> |
||||
<p> |
||||
{{ message }} |
||||
</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="container-fluid" id="cf4"> |
||||
<div ng-controller="ShareCtrl" ng-hide="isHidden" class="row-fluid center-content"></div> |
||||
</div> |
||||
<div ng-view=""></div> |
||||
</div> |
||||
<div class="pvk-gutter"> |
||||
|
||||
</div> |
||||
</div> |
||||
<div class="row-fluid"> |
||||
<div class="pvk-gutter"> |
||||
|
||||
</div> |
||||
<div class="pvk-content"> |
||||
<div class="footer"> |
||||
<p> |
||||
<a href="/" class="link">Home</a> <span>|</span> <a href="/about" class="link">About</a> <span>|</span> <a href="/help" class="link">Help</a> |
||||
</p> |
||||
<p> |
||||
<small>© 2012 Martin Angers</small> |
||||
</p> |
||||
</div> |
||||
</div> |
||||
<div class="pvk-gutter"> |
||||
|
||||
</div> |
||||
</div> |
||||
</div> |
||||
</body> |
||||
</html> |
@ -1,24 +0,0 @@
@@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<title>Tests for siblings</title> |
||||
</head> |
||||
<BODY> |
||||
<div id="main"> |
||||
<div id="n1" class="one even row"></div> |
||||
<div id="n2" class="two odd row"></div> |
||||
<div id="n3" class="three even row"></div> |
||||
<div id="n4" class="four odd row"></div> |
||||
<div id="n5" class="five even row"></div> |
||||
<div id="n6" class="six odd row"></div> |
||||
</div> |
||||
<div id="foot"> |
||||
<div id="nf1" class="one even row"></div> |
||||
<div id="nf2" class="two odd row"></div> |
||||
<div id="nf3" class="three even row"></div> |
||||
<div id="nf4" class="four odd row"></div> |
||||
<div id="nf5" class="five even row odder"></div> |
||||
<div id="nf6" class="six odd row"></div> |
||||
</div> |
||||
</BODY> |
||||
</html> |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue