Changeset 174622 in webkit
- Timestamp:
- Oct 10, 2014 4:29:52 PM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueue.js
r174366 r174622 33 33 this.queueServer = queueServer; 34 34 this.id = id; 35 this.shortName = info.shortName || id; 35 36 this.title = info.title || "\xa0"; 36 37 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js
r174366 r174622 29 29 "commit-queue": {platform: Dashboard.Platform.MacOSXMountainLion, shortName: "commit", title: "Commit Queue"}, 30 30 "style-queue": {shortName: "style", title: "Style Checker Queue"}, 31 "gtk-wk2-ews": {platform: Dashboard.Platform.LinuxGTK, shortName: "gtk-wk2", title: "WebKit2\xa0Release\xa0Build\xa0EWS"}, 31 32 "mac-ews": {platform: Dashboard.Platform.MacOSXMountainLion, shortName: "mac", title: "WebKit1\xa0Release\xa0Tests\xa0EWS"}, 32 33 "mac-wk2-ews": {platform: Dashboard.Platform.MacOSXMountainLion, shortName: "mac-wk2", title: "WebKit2\xa0Release\xa0Tests\xa0EWS"}, 33 34 "win-ews": {platform: Dashboard.Platform.Windows7, shortName: "win", title: "WebKit1\xa0Release\xa0Build\xa0EWS"}, 34 "gtk-wk2-ews": {platform: Dashboard.Platform.LinuxGTK, shortName: "gtk-wk2", title: "WebKit2\xa0Release\xa0Build\xa0EWS"},35 35 "efl-wk2-ews": {platform: Dashboard.Platform.LinuxEFL, shortName: "efl-wk2", title: "WebKit2\xa0Release\xa0Build\xa0EWS"} 36 36 }; … … 61 61 }, 62 62 63 jsonProcessingTimesURL: function(fromTime, toTime) 64 { 65 return this.baseURL + "processing-times-json/" + [fromTime.getUTCFullYear(), fromTime.getUTCMonth() + 1, fromTime.getUTCDate(), fromTime.getUTCHours(), fromTime.getUTCMinutes(), fromTime.getUTCSeconds()].join("-") 66 + "-" + [toTime.getUTCFullYear(), toTime.getUTCMonth() + 1, toTime.getUTCDate(), toTime.getUTCHours(), toTime.getUTCMinutes(), toTime.getUTCSeconds()].join("-"); 67 }, 68 63 69 queueStatusURL: function(queueID) 64 70 { 65 71 return this.baseURL + "queue-status/" + encodeURIComponent(queueID); 66 72 }, 73 74 // Retrieves information about all patches that were submitted in the time range: 75 // { 76 // patch_id_1: { 77 // queue_name_1: { 78 // date: <date/time when the patch was submitted to the queue>, 79 // retry_count: <number of times a bot had to bail out and drop the lock, for another bot to start from scratch>, 80 // wait_duration: <how long it took before a bot first locked the patch for processing>, 81 // process_duration: <how long it took from end of wait to finish, only valid for finished patches. Includes wait time between retries> 82 // final_message: <(pass|fail|not processed|could not apply|internal error|in progress)> 83 // }, 84 // ... 85 // }, 86 // ... 87 // } 88 loadProcessingTimes: function(fromTime, toTime, callback) 89 { 90 JSON.load(this.jsonProcessingTimesURL(fromTime, toTime), function(data) { 91 for (patch in data) { 92 for (queue in patch) 93 queue.date = new Date(queue.date); 94 } 95 callback(data, fromTime, toTime); 96 }.bind(this)); 97 }, 67 98 }; -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js
r173381 r174622 79 79 80 80 webkitTrac.load(this._rangeStartTime, this._rangeEndTime); 81 82 bubbleQueueServer.loadProcessingTimes(this._rangeStartTime, this._rangeEndTime, this._loadedBubblesTiming.bind(this)); 81 83 }, 82 84 … … 381 383 if (this._hasTracData) 382 384 this._analyze(); 383 } 385 }, 386 387 _analyzeBubblePerformance: function(queueID, patches) 388 { 389 var patchesThatCausedInternalError = []; 390 for (patchID in patches) { 391 if (patches[patchID].resolution === "internal error") 392 patchesThatCausedInternalError.push(patchID); 393 } 394 395 var waitTimes = []; 396 var totalTimes = []; 397 var totalTimesForPatchesThatWereNotRetried = []; 398 var totalTimesForPatchesThatSpinnedAndPassedOrFailed = []; 399 var patchesThatDidNotComplete = []; 400 var retryCounts = []; 401 var patchesThatSpinnedAndDidNotComplete = []; 402 var patchesThatSpinnedAndCeasedToApply = []; 403 var patchesThatSpinnedAndPassedOrFailed = []; 404 var patchesDidNotApply = []; 405 for (patchID in patches) { 406 var patch = patches[patchID]; 407 408 // Wait time is equally interesting for all patches. 409 waitTimes.push(patch.wait_duration); 410 411 if (patch.resolution === "not processed") 412 patchesThatDidNotComplete.push(patchID); 413 414 if (patch.retry_count === 0) 415 totalTimesForPatchesThatWereNotRetried.push(patch.wait_duration + patch.process_duration); 416 else { 417 retryCounts.push(patch.retry_count); 418 if (patch.resolution === "not processed") 419 patchesThatSpinnedAndDidNotComplete.push(patchID); 420 else if (patch.resolution === "could not apply") 421 patchesThatSpinnedAndCeasedToApply.push(patchID); 422 else if (patch.resolution === "pass" || patch.resolution === "fail") { 423 patchesThatSpinnedAndPassedOrFailed.push(patchID); 424 totalTimesForPatchesThatSpinnedAndPassedOrFailed.push(patch.wait_duration + patch.process_duration); 425 } 426 } 427 428 // Analyze processing performance for patches that were definitely processed. 429 // We can't target improving performance of others (such as patches that were obsoleted while in the queue). 430 // Patches that don't apply to trunk have to be excluded, because otherwise we 431 // get times for patches that spinned until they ceased to apply. 432 if (patch.resolution === "pass" || patch.resolution === "fail") 433 totalTimes.push(patch.wait_duration + patch.process_duration); 434 435 if (patch.resolution === "could not apply") 436 patchesDidNotApply.push(patchID); 437 } 438 439 var result = { 440 queueID: queueID, 441 totalPatches: Object.keys(patches).length, 442 patchesThatDidNotCompleteCount: patchesThatDidNotComplete.length, 443 patchesWithRetriesCount: retryCounts.length, 444 patchesThatDidNotApplyCount: patchesDidNotApply.length, 445 patchesThatSpinnedAndDidNotCompleteCount: patchesThatSpinnedAndDidNotComplete.length, 446 patchesThatSpinnedAndCeasedToApplyCount: patchesThatSpinnedAndCeasedToApply.length, 447 patchesThatSpinnedAndPassedOrFailedCount: patchesThatSpinnedAndPassedOrFailed.length, 448 medianTotalTimeForPatchesThatSpinnedAndPassedOrFailedInSeconds: totalTimesForPatchesThatSpinnedAndPassedOrFailed.median(), 449 averageTotalTimeForPatchesThatSpinnedAndPassedOrFailedInSeconds: totalTimesForPatchesThatSpinnedAndPassedOrFailed.average(), 450 medianWaitTimeInSeconds: waitTimes.median(), 451 averageWaitTimeInSeconds: waitTimes.average(), 452 patchesThatCausedInternalError: patchesThatCausedInternalError, 453 }; 454 455 if (totalTimes.length) { 456 result.medianTotalTimeInSeconds = totalTimes.median(); 457 result.averageTotalTimeInSeconds = totalTimes.average(); 458 } 459 460 if (totalTimesForPatchesThatWereNotRetried.length) { 461 result.medianTotalTimeForPatchesThatWereNotRetriedInSeconds = totalTimesForPatchesThatWereNotRetried.median(); 462 result.averageTotalTimeForPatchesThatWereNotRetriedInSeconds = totalTimesForPatchesThatWereNotRetried.average(); 463 } 464 465 this.dispatchEventToListeners(Analyzer.Event.QueueResults, result); 466 }, 467 468 _analyzeAllBubblesPerformance: function(dataByPatch) 469 { 470 var data = {}; 471 for (queueID in bubbleQueueServer.queues) 472 data[queueID] = {}; 473 474 for (patchID in dataByPatch) { 475 for (queueID in dataByPatch[patchID]) { 476 if (!queueID in data) 477 continue; 478 var patchData = dataByPatch[patchID][queueID]; 479 if (patchData.date < this.fromDate || patchData.date > this.toDate) 480 continue; 481 if (patchData.resolution === "in progress") 482 continue; 483 data[queueID][patchID] = patchData; 484 }; 485 }; 486 for (queueID in data) 487 this._analyzeBubblePerformance(queueID, data[queueID]); 488 }, 489 490 _loadedBubblesTiming: function(data, fromTime, toTime) 491 { 492 // Only analyze if the data covers the latest range requested by the user. 493 // It may be different from the loaded one if the user quickly requested multiple ranges. 494 if (fromTime > this._rangeStartTime || toTime < this._rangeEndTime) 495 return; 496 this._analyzeAllBubblesPerformance(data); 497 }, 384 498 }; -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsMain.js
r174366 r174622 24 24 */ 25 25 26 var hasBubbles = typeof bubbleQueueServer != "undefined"; 27 26 28 var analyzer = new Analyzer; 27 29 … … 255 257 table.appendChild(row); 256 258 } 259 260 document.body.appendChild(table); 261 262 return table; 263 } 264 265 function buildBubbleQueuesTable() 266 { 267 var table = document.createElement("table"); 268 table.classList.add("queue-grid"); 269 270 var row = document.createElement("tr"); 271 row.classList.add("headers"); 272 273 for (id in bubbleQueueServer.queues) { 274 var header = document.createElement("th"); 275 header.textContent = bubbleQueueServer.queues[id].shortName; 276 row.appendChild(header); 277 } 278 279 table.appendChild(row); 280 281 row = document.createElement("tr"); 282 row.classList.add("platform"); 283 284 for (id in bubbleQueueServer.queues) { 285 var cell = document.createElement("td"); 286 var view = new MetricsBubbleView(analyzer, bubbleQueueServer.queues[id]); 287 cell.appendChild(view.element); 288 row.appendChild(cell); 289 } 290 291 table.appendChild(row); 257 292 258 293 document.body.appendChild(table); … … 303 338 304 339 buildAggregateTable(); 340 if (hasBubbles) { 341 var tablesDivider = document.createElement("div"); 342 tablesDivider.classList.add("tables-divider"); 343 document.body.appendChild(tablesDivider); 344 buildBubbleQueuesTable(); 345 } 305 346 306 347 var tablesDivider = document.createElement("div"); -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/metrics.html
r173008 r174622 37 37 <script src="Scripts/Dashboard.js"></script> 38 38 <script src="Scripts/Buildbot.js"></script> 39 <script src="Scripts/BubbleQueueServer.js"></script> 39 40 <script src="Scripts/WebKitBuildbot.js"></script> 40 41 <script src="Scripts/BuildbotQueue.js"></script> 42 <script src="Scripts/BubbleQueue.js"></script> 41 43 <script src="Scripts/BuildbotIteration.js"></script> 42 44 <script src="Scripts/BuildbotTestResults.js"></script> … … 46 48 <script src="Scripts/MetricsAnalyzer.js"></script> 47 49 <script src="Scripts/MetricsView.js"></script> 50 <script src="Scripts/MetricsBubbleView.js"></script> 48 51 <script src="External/jquery-1.11.1.min.js"></script> 49 52 <script src="External/moment.min.js"></script> -
trunk/Tools/ChangeLog
r174611 r174622 1 2014-10-10 Alexey Proskuryakov <ap@apple.com> 2 3 Dashboard metrics page should have EWS statistics 4 https://bugs.webkit.org/show_bug.cgi?id=137626 5 6 Reviewed by Ryosuke Niwa. 7 8 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueue.js: 9 (BubbleQueue): Put shortName in the object, so that it's actually useful. 10 11 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js: 12 (BubbleQueueServer): Re-ordered queues to match bubble order. 13 (BubbleQueueServer.prototype.jsonProcessingTimesURL): Added URL for the new handler. 14 (BubbleQueueServer.prototype.loadProcessingTimes): Load the data from webkit-queues. 15 16 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js: 17 Added analysis for bubble queues. 18 19 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsBubbleView.js: Added. 20 21 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsMain.js: 22 (buildBubbleQueuesTable): Build the UI. 23 24 * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/metrics.html: 25 Added JS sources to load. 26 27 * QueueStatusServer/app.yaml: To update app version. 28 29 * QueueStatusServer/handlers/processingtimesjson.py: Added. 30 31 * QueueStatusServer/main.py: Added a handler for processing-times-json. 32 1 33 2014-10-10 Alexey Proskuryakov <ap@apple.com> 2 34 -
trunk/Tools/QueueStatusServer/app.yaml
r174611 r174622 1 1 application: webkit-queues 2 version: 1746 11# SVN revision of last major change2 version: 174622 # SVN revision of last major change 3 3 runtime: python 4 4 api_version: 1 -
trunk/Tools/QueueStatusServer/main.py
r174248 r174622 1 1 # Copyright (C) 2009 Google Inc. All rights reserved. 2 # Copyright (C) 2014 Apple Inc. All rights reserved. 2 3 # 3 4 # Redistribution and use in source and binary forms, with or without … … 39 40 from handlers.patch import Patch 40 41 from handlers.patchstatus import PatchStatus 42 from handlers.processingtimesjson import ProcessingTimesJSON 41 43 from handlers.queuecharts import QueueCharts 42 44 from handlers.queuelengthjson import QueueLengthJSON … … 80 82 ('/update-svn-revision', UpdateSVNRevision), 81 83 ('/active-bots', ActiveBots), 84 (r'/processing-times-json/(\d+)\-(\d+)\-(\d+)\-(\d+)\-(\d+)\-(\d+)\-(\d+)\-(\d+)\-(\d+)\-(\d+)\-(\d+)\-(\d+)', ProcessingTimesJSON), 82 85 ] 83 86
Note: See TracChangeset
for help on using the changeset viewer.