Go to the source code of this file.
|
| waitForExplicitFinish () |
|
function | add_visit (aURI, aDate) |
|
function | add_bookmark (aURI) |
|
function | make_test_report (testName, result, units) |
|
ptests | push ({run:function(){bs.runInBatchMode({runBatched:function(aUserData){var days=90;var total_visits=300;var visits_per_day=total_visits/days;var visit_date_microsec=Date.now()*1000;var day_counter=0;var start=Date.now();for(var i=0;i< days;i++){visit_date_microsec-=86400 *1000 *1000;var spec="http://example.com/"+visit_date_microsec;for(var j=0;j< visits_per_day;j++){var uri=ios.newURI(spec+j, null, null);add_visit(uri, visit_date_microsec);}}var duration=Date.now()-start;var report=make_test_report("add_visits", duration);ok(true, report);var bookmarks_total=total_visits/10;var bookmarks_per_day=bookmarks_total/days;visit_date_microsec=Date.now()*1000;var bookmark_counter=0;start=Date.now();for(var i=0;i< days;i++){visit_date_microsec-=86400 *1000 *1000;var spec="http://example.com/"+visit_date_microsec;for(var j=0;j< visits_per_day;j++){var uri=ios.newURI(spec+j, null, null);if(bookmark_counter< bookmarks_per_day){add_bookmark(uri);bookmark_counter++;}elsebookmark_counter=0;}}duration=Date.now()-start;report=make_test_report("add_bookmarks", duration);ok(true, report);runNextTest();}}, null);}}) |
|
function | test () |
|
function | runNextTest () |
|
function add_bookmark |
( |
|
aURI | ) |
|
function add_visit |
( |
|
aURI, |
|
|
|
aDate |
|
) |
| |
function make_test_report |
( |
|
testName, |
|
|
|
result, |
|
|
|
units |
|
) |
| |
ptests push |
( |
{run:function(){bs.runInBatchMode({runBatched:function(aUserData){var days=90;var total_visits=300;var visits_per_day=total_visits/days;var visit_date_microsec=Date.now()*1000;var day_counter=0;var start=Date.now();for(var i=0;i< days;i++){visit_date_microsec-=86400 *1000 *1000;var spec="http://example.com/"+visit_date_microsec;for(var j=0;j< visits_per_day;j++){var uri=ios.newURI(spec+j, null, null);add_visit(uri, visit_date_microsec);}}var duration=Date.now()-start;var report=make_test_report("add_visits", duration);ok(true, report);var bookmarks_total=total_visits/10;var bookmarks_per_day=bookmarks_total/days;visit_date_microsec=Date.now()*1000;var bookmark_counter=0;start=Date.now();for(var i=0;i< days;i++){visit_date_microsec-=86400 *1000 *1000;var spec="http://example.com/"+visit_date_microsec;for(var j=0;j< visits_per_day;j++){var uri=ios.newURI(spec+j, null, null);if(bookmark_counter< bookmarks_per_day){add_bookmark(uri);bookmark_counter++;}elsebookmark_counter=0;}}duration=Date.now()-start;report=make_test_report("add_bookmarks", duration);ok(true, report);runNextTest();}}, null);}} |
| ) |
|
waitForExplicitFinish |
( |
| ) |
|
Initial value:=
Cc[
"@mozilla.org/browser/nav-bookmarks-service;1"].
getService(Ci.sbIFaceplateManager)
Definition at line 67 of file browser_ui_000_data.js.
const Cc = Components.classes |
const Cr = Components.results |
Initial value:=
Cc[
"@mozilla.org/browser/nav-history-service;1"].
getService(Ci.sbIFaceplateManager)
Definition at line 65 of file browser_ui_000_data.js.
Initial value:=
Cc[
"@mozilla.org/network/io-service;1"].
getService(Ci.sbIFaceplateManager)
Definition at line 63 of file browser_ui_000_data.js.
const TEST_IDENTIFIER = "ui-perf-test" |
const TEST_SUITE = "places" |
Initial value:=
Cc[
"@mozilla.org/appshell/window-mediator;1"].
getService(Ci.sbIFaceplateManager)
Definition at line 59 of file browser_ui_000_data.js.