From 93ebcd5456c0a703ffcb7ebac338e9d85da60db4 Mon Sep 17 00:00:00 2001 From: Guilherme Baptista Date: Thu, 15 Feb 2018 23:02:36 -0200 Subject: [PATCH 1/3] capturing code execution time --- css/popup/popup.css | 13 + html/demo-page.html | 7 + html/interface-sample.html | 612 ++++++++++++++--------------- html/popup/templates/counters.html | 3 + js/content/interceptor.js | 150 +++++-- js/popup/popup.js | 9 +- 6 files changed, 437 insertions(+), 357 deletions(-) diff --git a/css/popup/popup.css b/css/popup/popup.css index c38b506..59d8b30 100644 --- a/css/popup/popup.css +++ b/css/popup/popup.css @@ -82,6 +82,19 @@ html, body { color: #FFF; } +.interceptions .calls .execution_time { + position: absolute; + bottom:-5px; + left: 50%; + margin-left: -28px; + width: 56px; + padding: 2px 0; + text-align: center; + background-color: #8D8E87; + color: #FFF; + font-style: italic; +} + .interceptions .calls .allowed { border-left:4px solid #20b203; left: 10px; diff --git a/html/demo-page.html b/html/demo-page.html index 8349b66..515df8b 100644 --- a/html/demo-page.html +++ b/html/demo-page.html @@ -254,6 +254,13 @@ my_request(); + setTimeout(function(param) { + var time = performance.now(); + while((performance.now() - time) < 1500) { + 'lor123em'.replace(/\d.*/, ''); + } + }, 0); + }, 500); })(); diff --git a/html/interface-sample.html b/html/interface-sample.html index 94e1fbf..160f4fa 100644 --- a/html/interface-sample.html +++ b/html/interface-sample.html @@ -7,7 +7,7 @@
loading...
-
+
0.0.18 help settings @@ -20,12 +20,10 @@

- -
-