sass-prof 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/sass-prof.rb +10 -3
- data/lib/sass-prof/version.rb +1 -1
- data/screenshot.jpg +0 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b2ed24aefa1059cfcfd31ed8f8982a2ab152756
|
4
|
+
data.tar.gz: 3860e3bab2ade75dc3eed9a4015912d0a9ecc0d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42efddb28f559764c8893ae5f34b8cd1d2c054b7b4145c237b99bbfed7c9e48d5fadd8a3e339f5a347ee35501f2dd769a01c79aed722a6761578f23b1bcb9dec
|
7
|
+
data.tar.gz: f9edf05b517c9612a4ea35fb73e3a7e7c296db6f3c4ab56a43a2dc631d9f8692f529075806b243e9b4b9b6ba62fbed7bf9f7941da678333dba82504ed41a64fb
|
data/README.md
CHANGED
data/lib/sass-prof.rb
CHANGED
@@ -75,12 +75,19 @@ module Sass
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def to_table(rows)
|
78
|
-
|
79
|
-
c[1].gsub(/\e\[(\d+)(;\d+)*m/, "").to_f }.reduce(:+)
|
78
|
+
t_ms = rows.map { |c|
|
79
|
+
c[1].gsub(/\e\[(\d+)(;\d+)*m/, "").to_f }.reduce(:+)
|
80
|
+
|
81
|
+
if t_ms > 1000
|
82
|
+
t_sec = t_ms / 1000 % 60
|
83
|
+
t = "#{t_sec.round(Prof::Config.precision - 1)}s"
|
84
|
+
else
|
85
|
+
t = "#{t_ms.round(Prof::Config.precision - 2)}ms"
|
86
|
+
end
|
80
87
|
|
81
88
|
# Add total execution time footer
|
82
89
|
rows << :separator
|
83
|
-
rows << ["Total
|
90
|
+
rows << ["Total", t]
|
84
91
|
|
85
92
|
table = Terminal::Table.new({
|
86
93
|
:headings => ["File", "Execution Time", "Action", "Signature"],
|
data/lib/sass-prof/version.rb
CHANGED
data/screenshot.jpg
CHANGED
Binary file
|