Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  browser_utility_profiler.js   Sprache: JAVA

 
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */


"use strict";

const { ProfilerTestUtils } = ChromeUtils.importESModule(
  "resource://testing-common/ProfilerTestUtils.sys.mjs"
);

// When running full suite, previous tests may have left some utility
// processes running and this might interfere with our testing.
add_setup(async function ensureNoExistingProcess() {
  await killUtilityProcesses();
});

add_task(async () => {
  const utilityPid = await startUtilityProcess();

  info("Start the profiler");
  await ProfilerTestUtils.startProfiler();

  let profile;
  await TestUtils.waitForCondition(async () => {
    profile = await Services.profiler.getProfileDataAsync();
    return (
      // Search for process name to not be disturbed by other types of utility
      // e.g. Utility AudioDecoder
      profile.processes.filter(
        ps => ps.threads[0].processName === "Utility Process"
      ).length === 1
    );
  }, "Give time for the profiler to start and collect some samples");

  info(`Check that the utility process ${utilityPid} is present.`);
  let utilityProcessIndex = profile.processes.findIndex(
    p => p.threads[0].pid == utilityPid
  );
  Assert.notEqual(utilityProcessIndex, -1, "Could find index of utility");

  Assert.equal(
    profile.processes[utilityProcessIndex].threads[0].processType,
    "utility",
    "Profile has processType utility"
  );

  Assert.equal(
    profile.processes[utilityProcessIndex].threads[0].name,
    "GeckoMain",
    "Profile has correct main thread name"
  );

  Assert.equal(
    profile.processes[utilityProcessIndex].threads[0].processName,
    "Utility Process",
    "Profile has correct process name"
  );

  Assert.greater(
    profile.processes[utilityProcessIndex].threads.length,
    0,
    "The utility process should have threads"
  );

  Assert.equal(
    profile.threads.length,
    1,
    "The parent process should have only one thread"
  );

  Services.profiler.StopProfiler();

  await cleanUtilityProcessShutdown();
});

Messung V0.5
C=97 H=90 G=93

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge