browser_ui_000_data.js File Reference

Go to the source code of this file.

Functions

 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 ()
 

Variables

const TEST_IDENTIFIER = "ui-perf-test"
 
const TEST_SUITE = "places"
 
const Cc = Components.classes
 
const Ci = Components.interfaces
 
const Cr = Components.results
 
var wm
 
var win = wm.getMostRecentWindow("navigator:browser")
 
var ios
 
var hs
 
var bs
 
var ptests = []
 

Function Documentation

function add_bookmark (   aURI)

Definition at line 80 of file browser_ui_000_data.js.

function add_visit (   aURI,
  aDate 
)

Definition at line 70 of file browser_ui_000_data.js.

function make_test_report (   testName,
  result,
  units 
)

Definition at line 86 of file browser_ui_000_data.js.

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 runNextTest ( )

Definition at line 158 of file browser_ui_000_data.js.

Here is the caller graph for this function:

function test ( )

Definition at line 153 of file browser_ui_000_data.js.

Here is the call graph for this function:

waitForExplicitFinish ( )

Here is the caller graph for this function:

Variable Documentation

var bs
Initial value:
= Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
getService(Ci.nsINavBookmarksService)
getService(Ci.sbIFaceplateManager)
const Ci
const Cc

Definition at line 67 of file browser_ui_000_data.js.

const Cc = Components.classes

Definition at line 55 of file browser_ui_000_data.js.

Definition at line 56 of file browser_ui_000_data.js.

const Cr = Components.results

Definition at line 57 of file browser_ui_000_data.js.

var hs
Initial value:
= Cc["@mozilla.org/browser/nav-history-service;1"].
getService(Ci.nsINavHistoryService)
getService(Ci.sbIFaceplateManager)
const Ci
const Cc

Definition at line 65 of file browser_ui_000_data.js.

var ios
Initial value:
= Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService)
getService(Ci.sbIFaceplateManager)
const Ci
const Cc

Definition at line 63 of file browser_ui_000_data.js.

var ptests = []

Definition at line 91 of file browser_ui_000_data.js.

const TEST_IDENTIFIER = "ui-perf-test"

Definition at line 52 of file browser_ui_000_data.js.

const TEST_SUITE = "places"

Definition at line 53 of file browser_ui_000_data.js.

var win = wm.getMostRecentWindow("navigator:browser")

Definition at line 61 of file browser_ui_000_data.js.

var wm
Initial value:
= Cc["@mozilla.org/appshell/window-mediator;1"].
getService(Ci.nsIWindowMediator)
getService(Ci.sbIFaceplateManager)
const Ci
const Cc

Definition at line 59 of file browser_ui_000_data.js.