From 1109132f09d75da9a28b649c7677bb6ce07c40c0 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:45 -0500 Subject: initial commit --- files/es/web/api/performance/clearmarks/index.html | 95 ++++++++++++ .../web/api/performance/clearmeasures/index.html | 96 ++++++++++++ files/es/web/api/performance/index.html | 142 ++++++++++++++++++ files/es/web/api/performance/memory/index.html | 42 ++++++ files/es/web/api/performance/navigation/index.html | 58 +++++++ files/es/web/api/performance/now/index.html | 166 +++++++++++++++++++++ files/es/web/api/performance/timeorigin/index.html | 48 ++++++ files/es/web/api/performance/timing/index.html | 57 +++++++ 8 files changed, 704 insertions(+) create mode 100644 files/es/web/api/performance/clearmarks/index.html create mode 100644 files/es/web/api/performance/clearmeasures/index.html create mode 100644 files/es/web/api/performance/index.html create mode 100644 files/es/web/api/performance/memory/index.html create mode 100644 files/es/web/api/performance/navigation/index.html create mode 100644 files/es/web/api/performance/now/index.html create mode 100644 files/es/web/api/performance/timeorigin/index.html create mode 100644 files/es/web/api/performance/timing/index.html (limited to 'files/es/web/api/performance') diff --git a/files/es/web/api/performance/clearmarks/index.html b/files/es/web/api/performance/clearmarks/index.html new file mode 100644 index 0000000000..dca7aa8ac1 --- /dev/null +++ b/files/es/web/api/performance/clearmarks/index.html @@ -0,0 +1,95 @@ +--- +title: performance.clearMarks() +slug: Web/API/Performance/clearMarks +tags: + - API + - Referencia + - Rendimiento Web + - metodo +translation_of: Web/API/Performance/clearMarks +--- +
{{APIRef("User Timing API")}}
+ +

El método clearMarks() elimina la marca llamada del búfer de rendimiento de entrada del navegador. Si el método es llamado sin argumentos, todos los {{domxref("PerformanceEntry","performance entries")}} con un {{domxref("PerformanceEntry.entryType","entry type")}} de "mark" serán eliminados del búfer de rendimiento de entrada.

+ +

{{AvailableInWorkers}}

+ +

Sintaxis

+ +
performance.clearMarks();
+performance.clearMarks(name);
+
+ +

Argumentos

+ +
+
nombre {{optional_inline}}
+
Un {{domxref("DOMString")}} representando el nombre de la marca de tiempo. Si este argumento es omitido, todos los {{domxref("PerformanceEntry","performance entries")}} con un {{domxref("PerformanceEntry.entryType","entry type")}} de "mark" serán eliminados.
+
+ +

Valor de retorno

+ +
+
vacío
+
+
+ +

Ejemplo

+ +

El siguiente ejemplo muestra ambos usos del método clearMarks().

+ +
// Create a small helper to show how many PerformanceMark entries there are.
+function logMarkCount() {
+  console.log(
+    "Found this many entries: " + performance.getEntriesByType("mark").length
+  );
+}
+
+// Create a bunch of marks.
+performance.mark("squirrel");
+performance.mark("squirrel");
+performance.mark("monkey");
+performance.mark("monkey");
+performance.mark("dog");
+performance.mark("dog");
+
+logMarkCount() // "Found this many entries: 6"
+
+// Delete just the "squirrel" PerformanceMark entries.
+performance.clearMarks('squirrel');
+logMarkCount() // "Found this many entries: 4"
+
+// Delete all of the PerformanceMark entries.
+performance.clearMarks();
+logMarkCount() // "Found this many entries: 0"
+
+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('User Timing Level 2', '#dom-performance-clearmarks', 'clearMarks()')}}{{Spec2('User Timing Level 2')}}Se clarifica clearMarks().
{{SpecName('User Timing', '#dom-performance-clearmarks', 'clearMarks()')}}{{Spec2('User Timing')}}Definición básica.
+ +

Compatibilidad de navegadores

+ +
+ + +

{{Compat("api.Performance.clearMarks")}}

+
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 +--- +
{{APIRef("User Timing API")}}
+ +

El método clearMeasures() elimina la medida llamada 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 "measure" serán eliminados del búfer de rendimiento de entrada.

+ +

{{AvailableInWorkers}}

+ +

Sintaxis

+ +
performance.clearMeasures();
+performance.clearMeasures(name);
+
+ +

Argumentos

+ +
+
nombre {{optional_inline}}
+
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 "measure" serán eliminados.
+
+ +

Valor de retorno

+ +
+
vacío
+
+
+ +

Ejemplo

+ +

En el siguiente ejemplo se muestran los dos usos del método clearMeasures() .

+ +
// 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"
+
+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('User Timing Level 2', '#dom-performance-clearmeasures', 'clearMeasures()')}}{{Spec2('User Timing Level 2')}}Se clarifica clearMeasures().
{{SpecName('User Timing', '#dom-performance-clearmeasures', 'clearMeasures()')}}{{Spec2('User Timing')}}Definición básica.
+ +

Compatibilidad de navegadores

+ +
+ + +

{{Compat("api.Performance.clearMeasures")}}

+
diff --git a/files/es/web/api/performance/index.html b/files/es/web/api/performance/index.html new file mode 100644 index 0000000000..00d3cbfe16 --- /dev/null +++ b/files/es/web/api/performance/index.html @@ -0,0 +1,142 @@ +--- +title: Performance +slug: Web/API/Performance +tags: + - API + - Interfaz + - Referencia + - Rendimiento + - Rendimiento Web + - Tiempo de navegación +translation_of: Web/API/Performance +--- +
{{APIRef("High Resolution Time")}}
+ +

La interfaz Performance representa información relacionada con el tiempo de rendimiento para la página dada.

+ +

Un objeto de este tipo puede ser obtenido por el llamado de el atributo de solo lectura {{domxref("Window.performance")}}.

+ +
+

NotaEsta interfaz y sus miembros están disponibles en Web Workers, exceptuando en los mencionados abajo. También, tenga en cuenta que las marcas y medidas de rendimiento son por contexto. Si crea una marca en el hilo principal (u otro worker), no puedes verlo en un hilo de un worker, y vice versa.

+
+ +

Propiedades

+ +

La interfaz Performance no hereda ninguna propiedad.

+ +
+
{{domxref("Performance.navigation")}} {{readonlyInline}} {{deprecated_inline}}
+
Un objeto del legado {{domxref("PerformanceNavigation")}} que provee contexto útil acerca de operaciones, incluidas en los tiempos listados en timing, incluyendo si la página fue cargada o refrescada, cuántas redirecciones ocurrieron, entre otros. No disponible en workers
+
{{domxref("Performance.timing")}} {{readonlyInline}} {{deprecated_inline}}
+
Un objeto del legado {domxref("PerformanceTiming")}} que contiene información relacionada con la latencia.
+
{{domxref("Performance.memory")}} {{readonlyInline}} {{Non-standard_inline}}
+
Una no standarizada extensión añadida a Chrome, esta propiedad provee un objeto con información básica de uso de memoria. No deberías usar esta no estandarizada API.
+
{{domxref("Performance.timeOrigin")}} {{readonlyInline}} {{Non-standard_inline}}
+
Retorna una marca de tiempo de alta precisión de la hora de inicio de la medida de rendimiento.
+
+ +

Métodos

+ +

La interfaz Performance no hereda ningún método.

+ +
+
{{domxref("Performance.clearMarks()")}}
+
Elimina la marca dada del búfer de entrada de rendimiento del navegador.
+
{{domxref("Performance.clearMeasures()")}}
+
Elimina las medida dadas del búfer de entrada del navegador.
+
{{domxref("Performance.clearResourceTimings()")}}
+
Elimina todas las {domxref("PerformanceEntry","performance entries")}} con una {{domxref("PerformanceEntry.entryType","entryType")}} de "resource" del búfer de datos de rendimiento del navegador.
+
{{domxref("Performance.getEntries()")}}
+
Devuelve una lista de objetos {{domxref("PerformanceEntry")}} basados en el filtro dado.
+
{{domxref("Performance.getEntriesByName()")}}
+
Devuelve una lista de objetos {{domxref("PerformanceEntry")}} basados en el nombre dado y el tipo de entrada.
+
{{domxref("Performance.getEntriesByType()")}}
+
Devuelve una lista de objetos {{domxref("PerformanceEntry")}} de el tipo de entrada dado.
+
{{domxref("Performance.mark()")}}
+
Crea un {{domxref("DOMHighResTimeStamp","timestamp")}} en el  búfer de entrada de rendimiento del navegador.
+
{{domxref("Performance.measure()")}}
+
Crea un {{domxref("DOMHighResTimeStamp","timestamp")}} nombrado en el  búfer de entrada de rendimiento del navegador entre dos especificadas marcas (conocidas como la marca de inicio y la marca final, respectivamente).
+
{{domxref("Performance.now()")}}
+
Retorna un {{domxref("DOMHighResTimeStamp")}} representando el número de milisegundos transcurridos desde un instante de referencia.
+
{{domxref("Performance.setResourceTimingBufferSize()")}}
+
Define el tamaño del búfer de temporización de recursos de "resource"  a los objetos {{domxref("PerformanceEntry.entryType","type")}} {{domxref("PerformanceEntry","performance entry")}}.
+
{{domxref("Performance.toJSON()")}}
+
Es un jsonizador que retorna un objeto json que respresenta el objecto Performance.
+
+ +

Eventos

+ +

Escucha a estos eventos que están usando addEventListener() o por asignación de un escuchador de eventos a la propiedad oneventname de esta interfaz.

+ +
+
{{DOMxRef("Performance.resourcetimingbufferfull_event", "resourcetimingbufferfull")}}
+
Disparado cuando "resource timing buffer" está lleno.
+ También disponible usando la propiedad {{DOMxRef("Performance.onresourcetimingbufferfull", "onresourcetimingbufferfull")}}. 
+
+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('Highres Time Level 2', '#the-performance-interface', 'toJSON()')}}{{Spec2('Highres Time Level 2')}}Se define el método toJson().
{{SpecName('Highres Time', '#the-performance-interface', 'Performance')}}{{Spec2('Highres Time')}}Se define el método now().
{{SpecName('Navigation Timing', '#sec-window.performance-attribute', 'Performance')}}{{Spec2('Navigation Timing')}}Se definen las propiedades timing and navigation.
{{SpecName('Performance Timeline Level 2', '#extensions-to-the-performance-interface', 'Performance extensions')}}{{Spec2('Performance Timeline Level 2')}}Cambia la interfaz getEntries().
{{SpecName('Performance Timeline', '#sec-window.performance-attribute', 'Performance extensions')}}{{Spec2('Performance Timeline')}}Se definen los métodos getEntries(), getEntriesByType() y getEntriesByName() .
{{SpecName('Resource Timing', '#extensions-performance-interface', 'Performance extensions')}}{{Spec2('Resource Timing')}}Se definen los métdos clearResourceTimings() y setResourceTimingBufferSize() y la propiedad onresourcetimingbufferfull .
{{SpecName('User Timing Level 2', '#extensions-performance-interface', 'Performance extensions')}}{{Spec2('User Timing Level 2')}}Se clarifican los métodos mark(), clearMark(), measure() y clearMeasure().
{{SpecName('User Timing', '#extensions-performance-interface', 'Performance extensions')}}{{Spec2('User Timing')}}Se definen los métodos mark(), clearMark(), measure() y clearMeasure().
{{SpecName('Frame Timing', '#extensions-performance-interface','Performance extensions')}}{{Spec2('User Timing')}}Se definen los métodos clearFrameTimings(), setFrameTimingBufferSize(), y onframetimingbufferfull.
+ +

Compatibilidad de navegadores

+ +
+
+ + +

{{Compat("api.Performance")}}

+
+
diff --git a/files/es/web/api/performance/memory/index.html b/files/es/web/api/performance/memory/index.html new file mode 100644 index 0000000000..91c3dd3e0b --- /dev/null +++ b/files/es/web/api/performance/memory/index.html @@ -0,0 +1,42 @@ +--- +title: Performance.memory +slug: Web/API/Performance/memory +translation_of: Web/API/Performance/memory +--- +

{{APIRef}}

+ +

Sintaxis

+ +
timingInfo = performance.memory
+ +

Atributos

+ +
+
jsHeapSizeLimit
+
El tamaño máximo del heap en bytes que está disponible para el contexto.
+
totalJSHeapSize
+
El total del heap asignado, en bytes. The total allocated heap size, in bytes.
+
+ +
+
usedJSHeapSize
+
El actualmente activo segmento de heap de JS, en bytes.
+
+ +

Especificaciones

+ +

Ninguna.

+ +

Compatibilidad de navegadores

+ +
+ + +

{{Compat("api.Performance.memory")}}

+
+ +

Ver también

+ + diff --git a/files/es/web/api/performance/navigation/index.html b/files/es/web/api/performance/navigation/index.html new file mode 100644 index 0000000000..62bef8feb5 --- /dev/null +++ b/files/es/web/api/performance/navigation/index.html @@ -0,0 +1,58 @@ +--- +title: Performance.navigation +slug: Web/API/Performance/navigation +tags: + - API + - Deprecado + - HTTP + - Legado + - Propiedad + - Rendimiento + - Solo lectura + - Tiempo de navegación +translation_of: Web/API/Performance/navigation +--- +

{{APIRef("Navigation Timing")}}

+ +
+

Esta propiedad está deprecada en Navigation Timing Level 2 specification.

+
+ +

La propiedad de solo lectura Performance.navigation del legado devuelve un objeto {{domxref("PerformanceNavigation")}} representado el tipo de navegación que ocurre en el contexto de navegación dado, tales como el número de redirecciones necesarias para traer el recurso.

+ +

Esta propiedad no está disponible en workers.

+ +

Sintaxis

+ +
navObject = performance.navigation;
+ +

Especificaciones

+ + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('Navigation Timing', '#sec-window.performance-attribute', 'Performance.navigation')}}{{Spec2('Navigation Timing')}}Definición inicial.
+ +

Compatibilidad de navegadores

+ +
+ + +

{{Compat("api.Performance.navigation")}}

+
+ +

Ver también

+ + diff --git a/files/es/web/api/performance/now/index.html b/files/es/web/api/performance/now/index.html new file mode 100644 index 0000000000..64f73a4916 --- /dev/null +++ b/files/es/web/api/performance/now/index.html @@ -0,0 +1,166 @@ +--- +title: performance.now() +slug: Web/API/Performance/now +tags: + - API + - Referencia + - Rendimiento + - Web Performance API + - metodo +translation_of: Web/API/Performance/now +--- +
{{APIRef("High Resolution Timing")}}
+ +

El método performance.now() devuelve un {{domxref("DOMHighResTimeStamp")}}, medido en milisegundos, con una precisión de cinco milésimas de segundo (5 microsegundos).

+ +

El valor devuelto representa el tiempo transcurrido desde el tiempo de origen (la propiedad {{domxref("PerformanceTiming.navigationStart")}}). En un web worker, el tiempo de origen es el momento en que se crea su contexto de ejecución (ej. hilo o proceso). En una ventana, es el momento en que el usuario navegó (o confirmó la navegación, si la confirmación fue necesaria) al documento actual. Tenga en cuenta los siguientes puntos:

+ + + +

Sintaxis

+ +
t = performance.now();
+ +

Ejemplo

+ +
var t0 = performance.now();
+hacerAlgo();
+var t1 = performance.now();
+console.log("La llamada a hacerAlgo tardó " + (t1 - t0) + " milisegundos.");
+
+ +

A diferencia de otros datos de tiempo disponibles en JavaScript (por ejemplo Date.now), las marcas de tiempo devueltas por Performance.now() no se limitan a resoluciones de un milisegundo. En su lugar, representan tiempos como números en punto flotante con hasta una precisión de microsegundos.

+ +

También a diferencia de Date.now(), los valores devueltos por Performance.now() siempre se incrementan a un ritmo constante, independientemente del sistema de reloj (que podría estar ajustado manualmente o manipulado por software como NTP). De todos modos, performance.timing.navigationStart + performance.now() será aproximadamente igual a Date.now().

+ +

Especificaciones

+ + + + + + + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('Highres Time Level 2', '#dom-performance-now', 'performance.now()')}}{{Spec2('Highres Time Level 2')}}Definiciones más estrictas de interfaces y tipos.
{{SpecName('Highres Time', '#dom-performance-now', 'performance.now()')}}{{Spec2('Highres Time')}}Definición inicial
+ +

Compatibilidad con navegadores

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Soporte básico{{CompatChrome("20.0")}} {{property_prefix("webkit")}}
+ {{CompatChrome("24.0")}} [1]
{{CompatVersionUnknown}}{{CompatGeckoDesktop("15.0")}}10.0{{CompatOpera("15.0")}}{{CompatSafari("8.0")}}
en Web workers{{CompatChrome("33")}}{{CompatUnknown}}{{CompatGeckoDesktop("34.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
now() en un worker dedicado está ahora separado del contexto principal de now().{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoDesktop("45.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidAndroid WebviewEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome para Android
Soporte básico{{CompatAndroid("4.0")}}{{CompatChrome("25.0")}}{{CompatVersionUnknown}}{{CompatGeckoMobile("15.0")}}10.0{{CompatNo}}9{{CompatChrome("25.0")}}
en Web workers{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("34.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}
now() en un worker dedicado está ahora separado del contexto principal de now().{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatGeckoMobile("45.0")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

[1] Las versiones de Windows desde Chrome 20 al 33 devuelven performance.now() sólo con precisión de milisegundos.

+ +

Vea también

+ + diff --git a/files/es/web/api/performance/timeorigin/index.html b/files/es/web/api/performance/timeorigin/index.html new file mode 100644 index 0000000000..c8f6255687 --- /dev/null +++ b/files/es/web/api/performance/timeorigin/index.html @@ -0,0 +1,48 @@ +--- +title: Performance.timeOrigin +slug: Web/API/Performance/timeOrigin +tags: + - API + - Experimental + - Propiedad + - Referencia + - Rendimiento + - timeOrigin +translation_of: Web/API/Performance/timeOrigin +--- +

{{SeeCompatTable}}{{APIRef("High Resolution Time")}}

+ +

La propiedad de solo lectura timeOrigin de la inferfaz {{domxref("Performance")}} devuelve una marca de tiempo de alta precisión del inicio de medida de rendimiento.

+ +

{{AvailableInWorkers}}

+ +

Sintaxis

+ +
var timeOrigin = performance.timeOrigin
+ +

Valor

+ +

Una marca de tiempo de alta precisión.

+ +

Especificaciones

+ + + + + + + + + + + + +
EspecificaciónEstado
{{SpecName('Highres Time Level 2','#dom-performance-timeorigin','timeOrigin')}}{{Spec2('Highres Time Level 2')}}
+ +

Compatibilidad de navegadores

+ +
+ + +

{{Compat("api.Performance.timeOrigin")}}

+
diff --git a/files/es/web/api/performance/timing/index.html b/files/es/web/api/performance/timing/index.html new file mode 100644 index 0000000000..ef5e07387b --- /dev/null +++ b/files/es/web/api/performance/timing/index.html @@ -0,0 +1,57 @@ +--- +title: Performance.timing +slug: Web/API/Performance/timing +tags: + - API + - Deprecada + - Legado + - Propiedad + - Rendimiento + - Solo lectura + - Tiempo de navegación +translation_of: Web/API/Performance/timing +--- +

{{APIRef("Navigation Timing")}}{{deprecated_header}}

+ +
+

Esta propiedad está deprecada en Navigation Timing Level 2 specification. Por favor usa {{domxref("Performance.timeOrigin")}} en vez esta..

+
+ +

La propiedad de solo lecutra Performance.timing de legado devulve un objeto {{domxref("PerformanceTiming")}} que contienen información relacionada con el rendimiento en relación a la latencia.

+ +

Esta propiedad no está disponible en workers.

+ +

Sintaxis

+ +
var timingInfo = performance.timing;
+ +

Especificaciones

+ + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('Navigation Timing', '#sec-window.performance-attribute', 'Performance.timing')}}{{Spec2('Navigation Timing')}}Definición inicial.
+ +

Compatibilidad de navegadores

+ +
+ + +

{{Compat("api.Performance.timing")}}

+
+ +

Ver también

+ + -- cgit v1.2.3-54-g00ecf