Changeset 209672 in webkit


Ignore:
Timestamp:
Dec 10, 2016 12:44:50 PM (7 years ago)
Author:
beidson@apple.com
Message:

More IndexedDB perf tests.
https://bugs.webkit.org/show_bug.cgi?id=165634

Reviewed by Sam Weinig.

  • IndexedDB/index-multientry.html:
  • IndexedDB/large-number-of-inserts-responsiveness.html: Added.
  • IndexedDB/large-number-of-inserts.html: Added.
  • IndexedDB/objectstore-cursor.html: Added.
  • resources/runner.js: Add "track responsiveness" functionality to PerfTestRunner.
Location:
trunk/PerformanceTests
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r209570 r209672  
     12016-12-10  Brady Eidson  <beidson@apple.com>
     2
     3        More IndexedDB perf tests.
     4        https://bugs.webkit.org/show_bug.cgi?id=165634
     5
     6        Reviewed by Sam Weinig.
     7
     8        * IndexedDB/index-multientry.html:
     9        * IndexedDB/large-number-of-inserts-responsiveness.html: Added.
     10        * IndexedDB/large-number-of-inserts.html: Added.
     11        * IndexedDB/objectstore-cursor.html: Added.
     12       
     13        * resources/runner.js: Add "track responsiveness" functionality to PerfTestRunner.
     14
    1152016-12-06  Filip Pizlo  <fpizlo@apple.com>
    216
  • trunk/PerformanceTests/IndexedDB/index-multientry.html

    r209365 r209672  
    55<script>
    66
    7 var iterationCount = 11;
     7var iterationCount = 20;
    88var numberDeleted = 0;
    99
    1010// Delete all databases for the test ahead of time.
    11 for (var i = 0; i < iterationCount; ++i) {
    12     indexedDB.deleteDatabase("index-multientry-DB-" + i).onsuccess = function() {
     11var databaseNamePrefix = "index-multientry-DB-";
     12for (var i = 0; i < iterationCount + 1; ++i) {
     13    req = indexedDB.deleteDatabase(databaseNamePrefix + i);
     14    req.onsuccess = function() {
    1315        if (++numberDeleted == iterationCount)
    1416            startIteration();
     
    4547
    4648var object = { test: 'yo', indexKeys: [] };
    47 for (var i = 0; i < 1000; i++)
     49for (var i = 0; i < 5000; i++)
    4850    object.indexKeys.push('index_no_' + i);
    4951
     
    5254    var startTime = PerfTestRunner.now();
    5355
    54     var openRequest = indexedDB.open("index-multientry-DB-" + currentIteration);
     56    var openRequest = indexedDB.open(databaseNamePrefix + currentIteration);
    5557    openRequest.onupgradeneeded = function(event) {
    5658        db = event.target.result;
  • trunk/PerformanceTests/resources/runner.js

    r162183 r209672  
    1616    var mallocHeapResults;
    1717    var iterationCount = undefined;
     18    var lastResponsivenessTimestamp = 0;
     19    var _longestResponsivenessDelay = 0;
     20    var continueCheckingResponsiveness = false;
    1821
    1922    var PerfTestRunner = {};
     
    324327    }
    325328
     329    PerfTestRunner.startCheckingResponsiveness = function() {
     330        lastResponsivenessTimestamp = PerfTestRunner.now();
     331        _longestResponsivenessDelay = 0;
     332        continueCheckingResponsiveness = true;
     333
     334        var timeoutFunction = function() {
     335            var now = PerfTestRunner.now();
     336            var delta = now - lastResponsivenessTimestamp;
     337            if (delta > _longestResponsivenessDelay)
     338                _longestResponsivenessDelay = delta;   
     339
     340            lastResponsivenessTimestamp = now;
     341            if (continueCheckingResponsiveness)
     342                setTimeout(timeoutFunction, 0);
     343        }
     344       
     345        timeoutFunction();
     346    }
     347
     348    PerfTestRunner.stopCheckingResponsiveness = function() {
     349        continueCheckingResponsiveness = false;
     350    }
     351
     352    PerfTestRunner.longestResponsivenessDelay = function() {
     353        return _longestResponsivenessDelay;
     354    }
    326355
    327356    PerfTestRunner.measurePageLoadTime = function(test) {
Note: See TracChangeset for help on using the changeset viewer.