Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/xpconnect/tests/unit/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  test_telemetry.js

  Sprache: JAVA
 

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


"use strict";

add_setup(function test_setup() {
  do_get_profile();
  Services.fog.initializeFOG();
});

add_task(async function test_telemetry() {
  // Prime the cache with self-hosted functions used by Assert and addition so
  // they don't affect the metrics captured below
  Assert.equal(1 + 23);

  let startTotal = Glean.javascriptSelfHostedCache.total.testGetValue();

  // Delazify self-hosted function SetIteratorNext and store its code in the
  // JIT cache
  let a = new Set(); for (b of a) 30;

  let endTotal = Glean.javascriptSelfHostedCache.total.testGetValue();
  Assert.equal(startTotal + 1, endTotal);

  let startingHits = Glean.javascriptSelfHostedCache.hits.testGetValue();

  // Use a sandbox so we delazify SetIteratorNext again.
  // This should pull the code from the JIT cache
  let sandbox = Cu.Sandbox("about:blank");
  Cu.evalInSandbox(`a = new Set(); for (b of a) 30;`, sandbox);

  let endHits = Glean.javascriptSelfHostedCache.hits.testGetValue();
  Assert.equal(startingHits.numerator + 1, endHits.numerator);
  Assert.equal(startingHits.denominator + 1, endHits.denominator);
});

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

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.