Bug 1196047 - Move most of shared/performance to server/performance. r=jsantell draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 07 Oct 2015 18:09:35 -0500
changeset 299488 12daecd8b29a9e2e8eb5e447f3fc5651f70e8a11
parent 299487 272841f482dc60c2eacfdbf5294e04b7e26ba85f
child 299489 5fb0032d26d3cb3ec26e9b7a8207de790fb70ae4
push id6216
push userjryans@gmail.com
push dateWed, 07 Oct 2015 23:18:00 +0000
reviewersjsantell
bugs1196047
milestone44.0a1
Bug 1196047 - Move most of shared/performance to server/performance. r=jsantell
devtools/server/actors/performance-recording.js
devtools/server/actors/performance.js
devtools/server/moz.build
devtools/server/performance/io.js
devtools/server/performance/legacy/actors.js
devtools/server/performance/legacy/compatibility.js
devtools/server/performance/legacy/front.js
devtools/server/performance/legacy/moz.build
devtools/server/performance/legacy/recording.js
devtools/server/performance/moz.build
devtools/server/performance/recorder.js
devtools/server/performance/recording-common.js
devtools/server/tests/browser/browser_perf-legacy-front-01.js
devtools/server/tests/browser/browser_perf-legacy-front-02.js
devtools/server/tests/browser/browser_perf-legacy-front-03.js
devtools/shared/performance/io.js
devtools/shared/performance/legacy/actors.js
devtools/shared/performance/legacy/compatibility.js
devtools/shared/performance/legacy/front.js
devtools/shared/performance/legacy/moz.build
devtools/shared/performance/legacy/recording.js
devtools/shared/performance/moz.build
devtools/shared/performance/recorder.js
devtools/shared/performance/recording-common.js
--- a/devtools/server/actors/performance-recording.js
+++ b/devtools/server/actors/performance-recording.js
@@ -7,21 +7,21 @@
 const { Cu } = require("chrome");
 const protocol = require("devtools/server/protocol");
 const { custom, method, RetVal, Arg, Option, types, preEvent } = protocol;
 const { actorBridge } = require("devtools/server/actors/common");
 
 loader.lazyRequireGetter(this, "events", "sdk/event/core");
 loader.lazyRequireGetter(this, "merge", "sdk/util/object", true);
 loader.lazyRequireGetter(this, "PerformanceIO",
-  "devtools/shared/performance/io");
+  "devtools/server/performance/legacy");
 loader.lazyRequireGetter(this, "RecordingUtils",
   "devtools/shared/performance/utils");
 loader.lazyRequireGetter(this, "PerformanceRecordingCommon",
-  "devtools/shared/performance/recording-common", true);
+  "devtools/server/performance/recording-common", true);
 
 /**
  * This actor wraps the Performance module at devtools/shared/shared/performance.js
  * and provides RDP definitions.
  *
  * @see devtools/shared/shared/performance.js for documentation.
  */
 var PerformanceRecordingActor = exports.PerformanceRecordingActor = protocol.ActorClass(merge({
--- a/devtools/server/actors/performance.js
+++ b/devtools/server/actors/performance.js
@@ -10,23 +10,23 @@ const { Task } = require("resource://gre
 const { Actor, custom, method, RetVal, Arg, Option, types, preEvent } = protocol;
 const { actorBridge } = require("devtools/server/actors/common");
 const { PerformanceRecordingActor, PerformanceRecordingFront } = require("devtools/server/actors/performance-recording");
 
 loader.lazyRequireGetter(this, "events", "sdk/event/core");
 loader.lazyRequireGetter(this, "extend", "sdk/util/object", true);
 
 loader.lazyRequireGetter(this, "PerformanceRecorder",
-  "devtools/shared/performance/recorder", true);
+  "devtools/server/performance/recorder", true);
 loader.lazyRequireGetter(this, "PerformanceIO",
-  "devtools/shared/performance/io");
+  "devtools/server/performance/legacy");
 loader.lazyRequireGetter(this, "normalizePerformanceFeatures",
   "devtools/shared/performance/utils", true);
 loader.lazyRequireGetter(this, "LegacyPerformanceFront",
-  "devtools/shared/performance/legacy/front", true);
+  "devtools/server/performance/legacy/front", true);
 loader.lazyRequireGetter(this, "getSystemInfo",
   "devtools/shared/system", true);
 
 const PIPE_TO_FRONT_EVENTS = new Set([
   "recording-started", "recording-stopping", "recording-stopped",
   "profiler-status", "timeline-data", "console-profile-start"
 ]);
 
--- a/devtools/server/moz.build
+++ b/devtools/server/moz.build
@@ -3,16 +3,17 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 include('../templates.mozbuild')
 
 DIRS += [
     'actors',
+    'performance',
     'shims',
 ]
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
 MOCHITEST_CHROME_MANIFESTS += ['tests/mochitest/chrome.ini']
 XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
 
 XPIDL_SOURCES += [
rename from devtools/shared/performance/io.js
rename to devtools/server/performance/io.js
rename from devtools/shared/performance/legacy/actors.js
rename to devtools/server/performance/legacy/actors.js
--- a/devtools/shared/performance/legacy/actors.js
+++ b/devtools/server/performance/legacy/actors.js
@@ -7,17 +7,17 @@ const { Task } = require("resource://gre
 
 loader.lazyRequireGetter(this, "promise");
 loader.lazyRequireGetter(this, "EventEmitter",
   "devtools/shared/event-emitter");
 loader.lazyRequireGetter(this, "Poller",
   "devtools/client/shared/poller", true);
 
 loader.lazyRequireGetter(this, "CompatUtils",
-  "devtools/shared/performance/legacy/compatibility");
+  "devtools/server/performance/legacy/compatibility");
 loader.lazyRequireGetter(this, "RecordingUtils",
   "devtools/shared/performance/utils");
 loader.lazyRequireGetter(this, "TimelineFront",
   "devtools/server/actors/timeline", true);
 loader.lazyRequireGetter(this, "ProfilerFront",
   "devtools/server/actors/profiler", true);
 
 // how often do we check the status of the profiler's circular buffer
rename from devtools/shared/performance/legacy/compatibility.js
rename to devtools/server/performance/legacy/compatibility.js
rename from devtools/shared/performance/legacy/front.js
rename to devtools/server/performance/legacy/front.js
--- a/devtools/shared/performance/legacy/front.js
+++ b/devtools/server/performance/legacy/front.js
@@ -7,21 +7,21 @@ const { Cu } = require("chrome");
 const { Task } = require("resource://gre/modules/Task.jsm");
 
 loader.lazyRequireGetter(this, "Services");
 loader.lazyRequireGetter(this, "promise");
 loader.lazyRequireGetter(this, "extend",
   "sdk/util/object", true);
 
 loader.lazyRequireGetter(this, "Actors",
-  "devtools/shared/performance/legacy/actors");
+  "devtools/server/performance/legacy/actors");
 loader.lazyRequireGetter(this, "LegacyPerformanceRecording",
-  "devtools/shared/performance/legacy/recording", true);
+  "devtools/server/performance/legacy/recording", true);
 loader.lazyRequireGetter(this, "importRecording",
-  "devtools/shared/performance/legacy/recording", true);
+  "devtools/server/performance/legacy/recording", true);
 loader.lazyRequireGetter(this, "normalizePerformanceFeatures",
   "devtools/shared/performance/utils", true);
 loader.lazyRequireGetter(this, "DevToolsUtils",
   "devtools/shared/DevToolsUtils");
 loader.lazyRequireGetter(this, "getDeviceFront",
   "devtools/server/actors/device", true);
 loader.lazyRequireGetter(this, "getSystemInfo",
   "devtools/shared/system", true);
rename from devtools/shared/performance/legacy/moz.build
rename to devtools/server/performance/legacy/moz.build
--- a/devtools/shared/performance/legacy/moz.build
+++ b/devtools/server/performance/legacy/moz.build
@@ -1,12 +1,12 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DevToolsModules(
-  'actors.js',
-  'compatibility.js',
-  'front.js',
-  'recording.js',
+    'actors.js',
+    'compatibility.js',
+    'front.js',
+    'recording.js',
 )
rename from devtools/shared/performance/legacy/recording.js
rename to devtools/server/performance/legacy/recording.js
--- a/devtools/shared/performance/legacy/recording.js
+++ b/devtools/server/performance/legacy/recording.js
@@ -2,21 +2,21 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 "use strict";
 
 const { Cc, Ci, Cu, Cr } = require("chrome");
 const { Task } = require("resource://gre/modules/Task.jsm");
 
 loader.lazyRequireGetter(this, "PerformanceIO",
-  "devtools/shared/performance/io");
+  "devtools/server/performance/legacy");
 loader.lazyRequireGetter(this, "RecordingUtils",
   "devtools/shared/performance/utils");
 loader.lazyRequireGetter(this, "PerformanceRecordingCommon",
-  "devtools/shared/performance/recording-common", true);
+  "devtools/server/performance/recording-common", true);
 loader.lazyRequireGetter(this, "merge", "sdk/util/object", true);
 
 /**
  * Model for a wholistic profile, containing the duration, profiling data,
  * frames data, timeline (marker, tick, memory) data, and methods to mark
  * a recording as 'in progress' or 'finished'.
  */
 const LegacyPerformanceRecording = function (options={}) {
new file mode 100644
--- /dev/null
+++ b/devtools/server/performance/moz.build
@@ -0,0 +1,15 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+DIRS += [
+    'legacy',
+]
+
+DevToolsModules(
+    'io.js',
+    'recorder.js',
+    'recording-common.js',
+)
rename from devtools/shared/performance/recorder.js
rename to devtools/server/performance/recorder.js
rename from devtools/shared/performance/recording-common.js
rename to devtools/server/performance/recording-common.js
--- a/devtools/server/tests/browser/browser_perf-legacy-front-01.js
+++ b/devtools/server/tests/browser/browser_perf-legacy-front-01.js
@@ -3,17 +3,17 @@
 
 /**
  * Test basic functionality of PerformanceFront with mock memory and timeline actors.
  */
 
 var WAIT_TIME = 100;
 
 const { TargetFactory } = require("devtools/client/framework/target");
-const { LegacyPerformanceFront } = require("devtools/shared/performance/legacy/front");
+const { LegacyPerformanceFront } = require("devtools/server/performance/legacy/front");
 const { merge } = require("sdk/util/object");
 
 add_task(function*() {
   let tab = yield getTab(MAIN_DOMAIN + "doc_perf.html");
   let target = TargetFactory.forTab(tab);
   yield target.makeRemote();
 
   merge(target, {
--- a/devtools/server/tests/browser/browser_perf-legacy-front-02.js
+++ b/devtools/server/tests/browser/browser_perf-legacy-front-02.js
@@ -3,17 +3,17 @@
 
 /**
  * Test basic functionality of PerformanceFront without a mock Timeline actor.
  */
 
 var WAIT_TIME = 100;
 
 const { TargetFactory } = require("devtools/client/framework/target");
-const { LegacyPerformanceFront } = require("devtools/shared/performance/legacy/front");
+const { LegacyPerformanceFront } = require("devtools/server/performance/legacy/front");
 const { merge } = require("sdk/util/object");
 
 add_task(function*() {
   let tab = yield getTab(MAIN_DOMAIN + "doc_perf.html");
   let target = TargetFactory.forTab(tab);
   yield target.makeRemote();
 
   merge(target, {
--- a/devtools/server/tests/browser/browser_perf-legacy-front-03.js
+++ b/devtools/server/tests/browser/browser_perf-legacy-front-03.js
@@ -3,17 +3,17 @@
 
 /**
  * Tests that when using an older server (< Fx40) where the profiler actor does not
  * have the `getBufferInfo` method that nothing breaks and RecordingModels have null
  * `getBufferUsage()` values.
  */
 
 const { TargetFactory } = require("devtools/client/framework/target");
-const { LegacyPerformanceFront } = require("devtools/shared/performance/legacy/front");
+const { LegacyPerformanceFront } = require("devtools/server/performance/legacy/front");
 const { merge } = require("sdk/util/object");
 
 add_task(function*() {
   let tab = yield getTab(MAIN_DOMAIN + "doc_perf.html");
   let target = TargetFactory.forTab(tab);
   yield target.makeRemote();
 
   merge(target, {
--- a/devtools/shared/performance/moz.build
+++ b/devtools/shared/performance/moz.build
@@ -1,19 +1,12 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-DIRS += [
-    'legacy',
-]
-
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
 
 DevToolsModules(
-  'io.js',
-  'process-communication.js',
-  'recorder.js',
-  'recording-common.js',
-  'utils.js',
+    'process-communication.js',
+    'utils.js',
 )