sass-prof 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sass-prof/version.rb +1 -1
- data/lib/sass-prof.rb +9 -7
- 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: b9aa835308e9fd45498589efe559994bcf37914a
|
4
|
+
data.tar.gz: 879016e6ccffffb9ad1608cf61418c3f7c86b0d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 590560723910cb82c65b43e5df6fdab3b814652c1ecc1a620be19a613550833bd5c101bba65a29ed584d81cec2c4683ff38b975127491edd8d85f9eea99a9257
|
7
|
+
data.tar.gz: 9a2e89208a84ed73c2c0cca7c5ba5e4974dda483a2c5a9b447b03f6405ea0366c85a00c8173dc38dabe35edad1259d9ee74e32f2b19b945ead8b92ea13a9d4cc
|
data/lib/sass-prof/version.rb
CHANGED
data/lib/sass-prof.rb
CHANGED
@@ -76,13 +76,15 @@ module Sass
|
|
76
76
|
|
77
77
|
def to_table(rows)
|
78
78
|
t_ms = rows.map { |c|
|
79
|
-
c[1].gsub(/\e\[(\d+)(;\d+)*m/, "").to_f }.reduce
|
79
|
+
c[1].gsub(/\e\[(\d+)(;\d+)*m/, "").to_f }.reduce :+
|
80
80
|
|
81
|
-
if t_ms
|
81
|
+
if t_ms.nil?
|
82
|
+
t = Prof::Formatter.colorize "Unknown", :red
|
83
|
+
elsif t_ms > 1000
|
82
84
|
t_sec = t_ms / 1000 % 60
|
83
|
-
t = "
|
85
|
+
t = "%.#{Prof::Config.precision - 1}fs" % t_sec
|
84
86
|
else
|
85
|
-
t = "
|
87
|
+
t = "%.#{Prof::Config.precision - 2}fms" % t_ms
|
86
88
|
end
|
87
89
|
|
88
90
|
# Add total execution time footer
|
@@ -160,9 +162,9 @@ module Sass
|
|
160
162
|
end
|
161
163
|
|
162
164
|
def fn_execution_time
|
163
|
-
color
|
164
|
-
Prof::
|
165
|
-
|
165
|
+
color = @@t_total > Prof::Config.t_max ? :red : :green
|
166
|
+
t_exec = "%.#{Prof::Config.precision}f" % @@t_total
|
167
|
+
Prof::Formatter.colorize t_exec, color
|
166
168
|
end
|
167
169
|
|
168
170
|
def fn_name
|
data/screenshot.jpg
CHANGED
Binary file
|