Bug 874425 - Add more logging to attempt to find out source of negative durations under Windows. r=yoric
authorDavid Rajchenbach-Teller <dteller@mozilla.com>
Fri, 23 Aug 2013 10:06:33 -0400
changeset 144087 816c1730c8ece1fb15834370843bea2432d6de18
parent 144086 de82a0040f1ab9c5f514fae59f8c8d1f6eadcc12
child 144088 617b9050b5ed0d4c9d814038cbb99dd6f17e0099
push id25149
push userryanvm@gmail.com
push dateFri, 23 Aug 2013 20:56:46 +0000
treeherdermozilla-central@ce881259e2d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyoric
bugs874425
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 874425 - Add more logging to attempt to find out source of negative durations under Windows. r=yoric
toolkit/components/osfile/tests/mochi/main_test_osfile_async.js
--- a/toolkit/components/osfile/tests/mochi/main_test_osfile_async.js
+++ b/toolkit/components/osfile/tests/mochi/main_test_osfile_async.js
@@ -867,16 +867,17 @@ let test_system_shutdown = maketest("sys
   });
 });
 
 /**
  * Test optional duration reporting that can be used for telemetry.
  */
 let test_duration = maketest("duration", function duration(test) {
   return Task.spawn(function() {
+    Services.prefs.setBoolPref("toolkit.osfile.log", true);
     // Options structure passed to a OS.File copy method.
     let copyOptions = {
       // This field should be overridden with the actual duration
       // measurement.
       outExecutionDuration: null
     };
     let currentDir = yield OS.File.getCurrentDirectory();
     let pathSource = OS.Path.join(currentDir, EXISTING_FILE);
@@ -942,17 +943,17 @@ let test_duration = maketest("duration",
       tmpPath: tmpPath
     };
     backupDuration = writeAtomicOptions.outExecutionDuration;
 
     yield OS.File.writeAtomic(pathDest, contents, writeAtomicOptions);
     test.ok(copyOptions.outExecutionDuration >= backupDuration, "duration has increased 3");
     OS.File.remove(pathDest);
 
-    Services.prefs.setBoolPref("toolkit.osfile.log", true);
     OS.Shared.TEST = true;
 
     // Testing an operation that doesn't take arguments at all
     let file = yield OS.File.open(pathSource);
     yield file.stat();
     yield file.close();
+    Services.prefs.setBoolPref("toolkit.osfile.log", false);
   });
 });