bin/gfxmon in hackmac-1.5.0 vs bin/gfxmon in hackmac-1.5.1
- old
+ new
@@ -31,19 +31,10 @@
end
0
end
def ps
- `ioreg -l`.lines.find { |l|
- if l =~ /"PerformanceStatistics" = {([^}]+)}/
- break Hash[
- $1.split(?,).map { |a|
- a = a.split(?=)
- [ a[0][1..-2], (Integer(a[1]) rescue a[1]) ]
- }.sort_by { |name, _| name.downcase }
- ]
- end
- }
+ Hackmac::IOReg.new(key: 'PerformanceStatistics').as_hash
end
def list(ps)
max = ps.keys.max_by(&:size)&.size&.to_i
include Hackmac::Graph::Formatters