Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
9c029f16
Commit
9c029f16
authored
Jan 12, 2009
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the benchmarking utility to use the Yahoo homepage and a bunch of new selectors.
parent
944484c3
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
457 deletions
+41
-457
benchmarker.js
build/speed/benchmarker.js
+38
-15
index.html
build/speed/index.html
+3
-442
No files found.
build/speed/benchmarker.js
View file @
9c029f16
jQuery
.
benchmarker
.
tests
=
[
jQuery
.
benchmarker
.
tests
=
[
"*"
,
// Selectors from:
"body"
,
"body div"
,
"div"
,
// http://ejohn.org/blog/selectors-that-people-actually-use/
"div div div"
,
"div div"
,
".dialog"
,
"div.dialog"
,
"div .dialog"
,
/*
"#speech5"
,
"div#speech5"
,
"div #speech5"
,
"div > div"
,
"div.scene div.dialog"
,
// For Amazon.com
"div#scene1.scene div.dialog div.direction"
,
"#scene1 #speech1"
,
"body > div.dialog div div#speech5"
,
"#navAmazonLogo", "#navSwmSkedPop",
"div:not(#speech5)"
,
"div:not(.dialog)"
,
".navbar", ".navGreeting",
"div:nth-child(even)"
,
"div:nth-child(odd)"
,
"div", "table",
"div:nth-child(1)"
,
"div:nth-child(2n)"
,
"img.navCrossshopTabCap", "span.navGreeting",
"div:nth-child(2n+3)"
,
"div:first-child"
,
"#navbar table", "#navidWelcomeMsg span",
"div:last-child"
,
"div:only-child"
,
"div#navbar", "ul#navAmazonLogo",
"div:contains(CELIA)"
,
"#navAmazonLogo .navAmazonLogoGatewayPanel", "#navidWelcomeMsg .navGreeting",
"div ~ div"
,
"div + div"
,
".navbar .navAmazonLogoGatewayPanel", ".navbar .navGreeting",
"div[class]"
,
"div[class=dialog]"
,
"div[class!=dialog]"
,
"*",
"div[class^=dialog]"
,
"div[class$=dialog]"
,
"div[class*=dialog]"
"#navAmazonLogo li.navAmazonLogoGatewayPanel", "#navidWelcomeMsg span.navGreeting",
]
"a[name=top]", "form[name=site-search]",
".navbar li", ".navbar span",
"[name=top]", "[name=site-search]",
"ul li", "a img",
"#navbar #navidWelcomeMsg", "#navbar #navSwmDWPop",
"#navbar ul li", "#navbar a img"
*/
// For Yahoo.com
"#page"
,
"#masthead"
,
"#mastheadhd"
,
".mastheadbd"
,
".first"
,
".on"
,
"div"
,
"li"
,
"a"
,
"div.mastheadbd"
,
"li.first"
,
"li.on"
,
"#page div"
,
"#dtba span"
,
"div#page"
,
"div#masthead"
,
"#page .mastheadbd"
,
"#page .first"
,
".outer_search_container .search_container"
,
".searchbox_container .inputtext"
,
"*"
,
"#page div.mastheadbd"
,
"#page li.first"
,
"input[name=p]"
,
"a[name=marketplace]"
,
".outer_search_container div"
,
".searchbox_container span"
,
"[name=p]"
,
"[name=marketplace]"
,
"ul li"
,
"form input"
,
"#page #e2econtent"
,
"#page #e2e"
];
jQuery
.
fn
.
benchmark
=
function
()
{
jQuery
.
fn
.
benchmark
=
function
()
{
this
.
each
(
function
()
{
this
.
each
(
function
()
{
...
...
build/speed/index.html
View file @
9c029f16
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment