diff options
Diffstat (limited to 'files/it/web/api/performance')
| -rw-r--r-- | files/it/web/api/performance/index.html | 135 | ||||
| -rw-r--r-- | files/it/web/api/performance/now/index.html | 104 |
2 files changed, 0 insertions, 239 deletions
diff --git a/files/it/web/api/performance/index.html b/files/it/web/api/performance/index.html deleted file mode 100644 index fde24fddb4..0000000000 --- a/files/it/web/api/performance/index.html +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Performance -slug: Web/API/Performance -tags: - - API - - Interface - - Misurazione delle performance - - Performance - - Reference - - Web Performance -translation_of: Web/API/Performance ---- -<div>{{APIRef("High Resolution Time")}}</div> - -<p> <br> - L'interaccia <strong><code>Performance</code> </strong>fornisce l'accesso alle informazioni relative alle performance della pagina corrente. Fa parte delle High Resolution Time API, ma viene migliorata tramite le <a href="/en-US/docs/Web/API/Performance_Timeline">Performance Timeline API</a>, le <a href="/en-US/docs/Web/API/Navigation_timing_API">Navigation Timing API</a>, le <a href="/en-US/docs/Web/API/User_Timing_API">User Timing API</a> e le <a href="/en-US/docs/Web/API/Resource_Timing_API">Resource Timing API</a>.</p> - -<p>Un oggetto di questo tipo può essere ottenuto chiamando {{domxref("Window.performance")}} in sola lettura.</p> - -<div class="note"> -<p><strong><em>Nota</em>: </strong>Questa interfaccia ed i suoi metodi sono disponibili nei <a href="/en-US/docs/Web/API/Web_Workers_API">Web Workers</a>, ad eccezione di dove diversamente indicato nella guida sottostante.<br> - Da notare inoltre che i markers delle peformance e le misurazioni sono relative al contesto. Se crei un marker sul thread principale (o su un altro worker), non potrai vederlo in un thread del worker e viceversa.</p> -</div> - -<h2 id="Proprietà">Proprietà</h2> - -<p><em>L'interfaccia <code>Performance</code> non eredita nessuna proprietà.</em></p> - -<dl> - <dt>{{deprecated_inline}} {{domxref("Performance.navigation")}} {{readonlyInline}}</dt> - <dd>{{domxref("PerformanceNavigation")}} è un oggetto che fornisce un utile contesto sulle operazioni incluse nella lista <code>timing</code>, sia che la pagina venga caricata o ricaricata, quante occorrenze di redirect sono presenti e così via. Not available in workers.</dd> - <dt>{{deprecated_inline}} {{domxref("Performance.timing")}} {{readonlyInline}}</dt> - <dd>L'oggetto {{domxref("PerformanceTiming")}} contiene le informazioni relative alla latenza delle performance. Not available in workers.</dd> - <dt>{{domxref("Performance.memory", "performance.memory")}} {{Non-standard_inline}}</dt> - <dd>Estensione <em>non-standard</em> aggiunta in Chrome, questa proprietà fornisce un oggetto con l'utilizzo della memoria di base. <strong>Non dovresti</strong> usare questa API <em>non-stanrdard</em>.</dd> - <dt>{{domxref("Performance.timeOrigin")}} {{readonlyInline}} {{Non-standard_inline}}</dt> - <dd>Restituisce il timestamp preciso del momento in cui si è iniziato a misurare le performance.</dd> -</dl> - -<dl> - <dt> - <h3 id="Event_handlers">Event handlers</h3> - </dt> - <dt>{{domxref("Performance.onresourcetimingbufferfull")}}</dt> - <dd>Un {{domxref("EventTarget")}} che funge da callback e che viene eseguito quando viene scatenato l'evento {{event("resourcetimingbufferfull")}}</dd> -</dl> - -<h2 id="Metodi">Metodi</h2> - -<p><em><em>L'interfaccia <code>Performance</code> non eredita nessun metodo.</em></em></p> - -<dl> - <dt>{{domxref("Performance.clearMarks()")}}</dt> - <dd>Rimuove il <em>segnaposto</em> specificato dal buffer delle performance del browser.</dd> - <dt>{{domxref("Performance.clearMeasures()")}}</dt> - <dd>Rimuove la <em>misurazione</em> specificata dal buffer delle performance del browser.</dd> - <dt>{{domxref("Performance.clearResourceTimings()")}}</dt> - <dd>Rimuove tutte le {{domxref("PerformanceEntry","performance entries")}} con un {{domxref("PerformanceEntry.entryType","entryType")}} di <code>resource</code> dal data buffer delle performance del browser.</dd> - <dt>{{domxref("Performance.getEntries()")}}</dt> - <dd>Restituisce una lista di oggetti di tipo {{domxref("PerformanceEntry")}} basati sul filtro specificato.</dd> - <dt>{{domxref("Performance.getEntriesByName()")}}</dt> - <dd>Restituisce una lista di oggetti di tipo {{domxref("PerformanceEntry")}} secondo il <em>nome</em> specificato ed il tipo di<em>voce specificata.</em></dd> - <dt>{{domxref("Performance.getEntriesByType()")}}</dt> - <dd>Restituisce una list di oggetti {{domxref("PerformanceEntry")}} relativi alla <em>voce</em> specificata</dd> - <dt>{{domxref("Performance.mark()")}}</dt> - <dd>Crea un {{domxref("DOMHighResTimeStamp","timestamp")}} nel buffer delle performance usando il nome specificato.</dd> - <dt>{{domxref("Performance.measure()")}}</dt> - <dd>Crea un {{domxref("DOMHighResTimeStamp","timestamp")}} nel buffer delle performance del browser tra due <em>segnaposti (indicati rispettivamente come start mark ed end mark)</em></dd> - <dt>{{domxref("Performance.now()")}}</dt> - <dd>Restituisce un {{domxref("DOMHighResTimeStamp")}} ceh rappresenta il numero in millisecondi trascorso dall'istante preso come riferimento.</dd> - <dt>{{domxref("Performance.setResourceTimingBufferSize()")}}</dt> - <dd>Imposta la dimensione del buffer del browser relativo alla temporizzazione in un numero specificato di oggetti {{domxref("PerformanceEntry","performance entry")}} "<code>resource</code>" {{domxref("PerformanceEntry.entryType","type")}}</dd> - <dt>{{domxref("Performance.toJSON()")}}</dt> - <dd>Restituisce un oggetto json che rappresenta l'oggetto <code>Performance</code></dd> -</dl> - -<h2 id="Specifiche">Specifiche</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specifica</th> - <th scope="col">Stato</th> - <th scope="col">Commento</th> - </tr> - <tr> - <td>{{SpecName('Highres Time Level 3', '#dom-performance-timeorigin','timeOrigin')}}</td> - <td>{{Spec2('Highres Time Level 3')}}</td> - <td>Definisce la proprietà <code>timeOrigin</code> </td> - </tr> - <tr> - <td>{{SpecName('Highres Time Level 2', '#the-performance-interface', 'toJSON()')}}</td> - <td>{{Spec2('Highres Time Level 2')}}</td> - <td>Definisce il metodo <code>toJson()</code> .</td> - </tr> - <tr> - <td>{{SpecName('Highres Time', '#the-performance-interface', 'Performance')}}</td> - <td>{{Spec2('Highres Time')}}</td> - <td>Definisce il metodo <code>now()</code> .</td> - </tr> - <tr> - <td>{{SpecName('Performance Timeline Level 2', '#extensions-to-the-performance-interface', 'Performance extensions')}}</td> - <td>{{Spec2('Performance Timeline Level 2')}}</td> - <td>Cambia l'interfaccia <code>getEntries()</code> .</td> - </tr> - <tr> - <td>{{SpecName('Performance Timeline', '#sec-window.performance-attribute', 'Performance extensions')}}</td> - <td>{{Spec2('Performance Timeline')}}</td> - <td>Definisce i metodi <code>getEntries()</code>, <code>getEntriesByType()</code> e <code>getEntriesByName()</code> .</td> - </tr> - <tr> - <td>{{SpecName('Resource Timing', '#extensions-performance-interface', 'Performance extensions')}}</td> - <td>{{Spec2('Resource Timing')}}</td> - <td>Definisce i metodi <code>clearResourceTimings()</code> e <code>setResourceTimingBufferSize()</code> e la proprietà <code>onresourcetimingbufferfull</code> .</td> - </tr> - <tr> - <td>{{SpecName('User Timing Level 2', '#extensions-performance-interface', 'Performance extensions')}}</td> - <td>{{Spec2('User Timing Level 2')}}</td> - <td>Spiega i metodi <code>mark()</code>, <code>clearMark()</code>, <code>measure()</code> e <code>clearMeasure()</code> .</td> - </tr> - <tr> - <td>{{SpecName('User Timing', '#extensions-performance-interface', 'Performance extensions')}}</td> - <td>{{Spec2('User Timing')}}</td> - <td>Definisce i metodi <code>mark()</code>, <code>clearMark()</code>, <code>measure()</code> e <code>clearMeasure()</code>.</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - -<div> - - -<p>{{Compat("api.Performance")}}</p> -</div> diff --git a/files/it/web/api/performance/now/index.html b/files/it/web/api/performance/now/index.html deleted file mode 100644 index 2331157f18..0000000000 --- a/files/it/web/api/performance/now/index.html +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: performance.now() -slug: Web/API/Performance/now -tags: - - API - - Performance - - Prestazioni - - Reference - - Riferimento - - Web Performance API - - metodo -translation_of: Web/API/Performance/now ---- -<div>{{APIRef("High Resolution Timing")}}</div> - -<p>Il metodo <code><strong>performance.now()</strong></code> restituisce un {{domxref("DOMHighResTimeStamp")}}, misurato in millisecondi.</p> - -<div class="warning"> -<p>The timestamp is not actually high-resolution. To mitigate security threats such as <a href="https://spectreattack.com/">Spectre</a>, browsers currently round the results to varying degrees. (Firefox started rounding to 1 millisecond in Firefox 60.) Some browsers may also slightly randomize the timestamp. The precision may improve again in future releases; browser developers are still investigating these timing attacks and how best to mitigate them.</p> -</div> - -<p>{{AvailableInWorkers}}</p> - -<p>Il valore restituito rappresenta il tempo trascorso dal <a href="/en-US/docs/Web/API/DOMHighResTimeStamp#The_time_origin">time origin</a>.</p> - -<p>Tieni a mente i seguenti punti:</p> - -<ul> - <li>Negli workers dedicati creati da un contesto {{domxref("Window")}}, il valore nel worker sarà minore di <code>performance.now()</code> nella finestra che ha creato quel worker. Prima era lo stesso di <code>t0</code> nel contesto principale, ma è stato cambiato</li> - <li>Negli workers condivisi o di servizio, til valore nel worker potrebbe essere più alto di quello del contesto principale, perché quella finestra può essere creata dopo quegli workers.</li> -</ul> - -<h2 id="Sintassi">Sintassi</h2> - -<pre class="syntaxbox"><em>t</em> = performance.now();</pre> - -<h2 id="Esempio">Esempio</h2> - -<pre class="brush: js">var t0 = performance.now(); -doSomething(); -var t1 = performance.now(); -console.log("Call to doSomething took " + (t1 - t0) + " milliseconds."); -</pre> - -<p>A differenza di altri timing data disponibili con JavaScript (per esempio <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Date/now"><code>Date.now</code></a>), i timestamps restituiti da <code>Performance.now()</code> non sono limitati a una risoluzione di un millisecondo. Invece, rappresentano il tempo come numeri a virgola mobile con una precisione che può arrivare a un microsecondo.</p> - -<p>Inolre, a differenza di <code>Date.now()</code>, il valore restituito da <code>Performance.now()</code> aumenta sempre con costanza, indipendentemente dal clock di sistema (che può essere regolato manualmente o distorto da software come NTP). Altrimenti, <code>performance.timing.navigationStart + performance.now()</code> sarà approssimativamente uguale a <code>Date.now()</code>.</p> - -<h2 id="Reduced_time_precision">Reduced time precision</h2> - -<p>To offer protection against timing attacks and fingerprinting, the precision of <code>performance.now()</code> might get rounded depending on browser settings.<br> - In Firefox, the <code>privacy.reduceTimerPrecision</code> preference is enabled by default and defaults to 1ms.</p> - -<pre class="brush: js">// reduced time precision (1ms) in Firefox 60 -performance.now(); -// 8781416 -// 8781815 -// 8782206 -// ... - - -// reduced time precision with `privacy.resistFingerprinting` enabled -performance.now(); -// 8865400 -// 8866200 -// 8866700 -// ... -</pre> - -<p>In Firefox, you can also enable <code>privacy.resistFingerprinting</code> — this changes the precision to 100ms or the value of <code>privacy.resistFingerprinting.reduceTimerPrecision.microseconds</code>, whichever is larger.</p> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('Highres Time Level 2', '#dom-performance-now', 'performance.now()')}}</td> - <td>{{Spec2('Highres Time Level 2')}}</td> - <td>Stricter definitions of interfaces and types.</td> - </tr> - <tr> - <td>{{SpecName('Highres Time', '#dom-performance-now', 'performance.now()')}}</td> - <td>{{Spec2('Highres Time')}}</td> - <td>Initial definition</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - - - -<p>{{Compat("api.Performance.now")}}</p> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="http://updates.html5rocks.com/2012/08/When-milliseconds-are-not-enough-performance-now">When milliseconds are not enough: performance.now() </a>from HTML5 Rocks.</li> -</ul> |
