aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/api/performance/clearmeasures/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/es/web/api/performance/clearmeasures/index.html')
-rw-r--r--files/es/web/api/performance/clearmeasures/index.html96
1 files changed, 96 insertions, 0 deletions
diff --git a/files/es/web/api/performance/clearmeasures/index.html b/files/es/web/api/performance/clearmeasures/index.html
new file mode 100644
index 0000000000..63fa0dd936
--- /dev/null
+++ b/files/es/web/api/performance/clearmeasures/index.html
@@ -0,0 +1,96 @@
+---
+title: performance.clearMeasures()
+slug: Web/API/Performance/clearMeasures
+tags:
+ - API
+ - Referencia
+ - Rendimiento Web
+ - metodo
+translation_of: Web/API/Performance/clearMeasures
+---
+<div>{{APIRef("User Timing API")}}</div>
+
+<p>El método <strong><code>clearMeasures()</code></strong> elimina <em>la medida llamada </em>del búfer de rendimiento de entrada, si el método es llamado sin argumentos, todos los {{domxref("PerformanceEntry","performance entries")}} con un {{domxref("PerformanceEntry.entryType","entry type")}} de "<code>measure</code>" serán eliminados del búfer de rendimiento de entrada.</p>
+
+<p>{{AvailableInWorkers}}</p>
+
+<h2 id="Sintaxis">Sintaxis</h2>
+
+<pre class="syntaxbox"><em>performance</em>.clearMeasures();
+<em>performance</em>.clearMeasures(name);
+</pre>
+
+<h3 id="Argumentos">Argumentos</h3>
+
+<dl>
+ <dt>nombre {{optional_inline}}</dt>
+ <dd>Un {{domxref("DOMString")}} representando el nombre de la marca de tiempo. Si el argumento se omite, todos los {{domxref("PerformanceEntry","performance entries")}} con un {{domxref("PerformanceEntry.entryType","entry type")}} de "<code>measure</code>" serán eliminados.</dd>
+</dl>
+
+<h3 id="Valor_de_retorno">Valor de retorno</h3>
+
+<dl>
+ <dt>vacío</dt>
+ <dd></dd>
+</dl>
+
+<h2 id="Ejemplo">Ejemplo</h2>
+
+<p>En el siguiente ejemplo se muestran los dos usos del método <code>clearMeasures()</code> .</p>
+
+<pre class="brush: js">// Create a small helper to show how many PerformanceMeasure entries there are.
+function logMeasureCount() {
+ console.log(
+ "Found this many entries: " + performance.getEntriesByType("measure").length
+ );
+}
+
+// Create a bunch of measures.
+performance.measure("from navigation");
+performance.mark("a");
+performance.measure("from mark a", "a");
+performance.measure("from navigation");
+performance.measure("from mark a", "a");
+performance.mark("b");
+performance.measure("between a and b", "a", "b");
+
+logMeasureCount() // "Found this many entries: 5"
+
+// Delete just the "from navigation" PerformanceMeasure entries.
+performance.clearMeasures("from navigation");
+logMeasureCount() // "Found this many entries: 3"
+
+// Delete all of the PerformanceMeasure entries.
+performance.clearMeasures();
+logMeasureCount() // "Found this many entries: 0"
+</pre>
+
+<h2 id="Especificaciones">Especificaciones</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificación</th>
+ <th scope="col">Estado</th>
+ <th scope="col">Comentario</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('User Timing Level 2', '#dom-performance-clearmeasures', 'clearMeasures()')}}</td>
+ <td>{{Spec2('User Timing Level 2')}}</td>
+ <td>Se clarifica <code>clearMeasures()</code>.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('User Timing', '#dom-performance-clearmeasures', 'clearMeasures()')}}</td>
+ <td>{{Spec2('User Timing')}}</td>
+ <td>Definición básica.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilidad_de_navegadores">Compatibilidad de navegadores</h2>
+
+<div>
+
+
+<p>{{Compat("api.Performance.clearMeasures")}}</p>
+</div>