wavefront-cli 8.0.1 → 8.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +3 -0
- data/lib/wavefront-cli/display/printer/long.rb +1 -1
- data/lib/wavefront-cli/display/query.rb +24 -0
- data/lib/wavefront-cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53d7cbfa6e04c70f7c9c2af901ec42da4783b5b2f4aaa7552ebb53bf840395da
|
4
|
+
data.tar.gz: cef50e1684db66aa4a525c7ba91088a491bb790b8562c720437a12e7692b4390
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ec1eacceffa1fefad6050e42eb5c3891133da9e23bcb5e62de8ee558b9535d27936e95a3a66eb6eac616d4effe371b3f66334e6a652548d3ae0b06d39747853
|
7
|
+
data.tar.gz: 241a752fb0fd12225e8fa26a342380a15040d37d694fc90c23604bb96691e4ad54f97617cc1fcf688f495e8ed42f44ef0e60c9122ddaa9b2cbd7b13dbb86ac3e
|
data/HISTORY.md
CHANGED
@@ -179,7 +179,7 @@ module WavefrontDisplayPrinter
|
|
179
179
|
data.each.with_index(1) do |element, i|
|
180
180
|
aggr = make_list(element, aggr, depth, last_key)
|
181
181
|
|
182
|
-
if opts[:separator] && element.is_a?(Hash) && i < data.size
|
182
|
+
if opts[:separator] && element.is_a?(Hash) && i < data.size && depth < 3
|
183
183
|
aggr.<< ['', :separator, depth]
|
184
184
|
end
|
185
185
|
end
|
@@ -20,6 +20,7 @@ module WavefrontDisplay
|
|
20
20
|
{ name: data.name,
|
21
21
|
query: data.query,
|
22
22
|
timeseries: mk_timeseries(data),
|
23
|
+
traces: mk_traces(data),
|
23
24
|
events: mk_events(data) }.tap do |d|
|
24
25
|
d[:warnings] = data[:warnings] if show_warnings?
|
25
26
|
end
|
@@ -54,6 +55,12 @@ module WavefrontDisplay
|
|
54
55
|
data[:events].map { |s| humanize_event(s) }
|
55
56
|
end
|
56
57
|
|
58
|
+
def mk_traces(data)
|
59
|
+
return [] unless data.key?(:traces)
|
60
|
+
|
61
|
+
data[:traces].map { |t| humanize_trace(t) }
|
62
|
+
end
|
63
|
+
|
57
64
|
def do_run
|
58
65
|
do_default
|
59
66
|
end
|
@@ -99,6 +106,23 @@ module WavefrontDisplay
|
|
99
106
|
end
|
100
107
|
end
|
101
108
|
|
109
|
+
def humanize_trace(data)
|
110
|
+
data.tap do |t|
|
111
|
+
t[:start] = human_time(t[:start_ms])
|
112
|
+
t[:end] = human_time(t[:end_ms])
|
113
|
+
t.delete(:start_ms)
|
114
|
+
t.delete(:end_ms)
|
115
|
+
t.delete(:startMs)
|
116
|
+
t.spans = t.spans.map { |s| humanize_span(s) }
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def humanize_span(span)
|
121
|
+
span.tap do |s|
|
122
|
+
s[:startMs] = human_time(s[:startMs])
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
102
126
|
def row_time_and_val(row)
|
103
127
|
if row.is_a?(Hash)
|
104
128
|
[human_time(row[:timestamp]), row[:value]]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wavefront-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.0
|
4
|
+
version: 8.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Fisher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|