presto-metrics 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/lib/presto/metrics/query.rb +6 -1
- data/lib/presto/metrics/version.rb +1 -1
- 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: a7c14458d189a96aabc5904a1bf20ad3597d7764
|
4
|
+
data.tar.gz: 174e28a4102f63327be17c27e2b85b9da08dec4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6e07341222ee177ade2990ad5c1ec48bd6e8551f5cbaa8fcccd71e14dba4c64b9df81ecd1f201f6368cb9bb51841fe3d2508918cec6c521f109a6edca1df4ee
|
7
|
+
data.tar.gz: 9852ec621a52dc0eb126458caf52bbc82bf6816d96b25b6804d62a381f72a5f9d8b323dabaf7671b6ad939037ec89bfe71090a415fe1ebf1d23e1796cefcc800
|
data/lib/presto/metrics/query.rb
CHANGED
@@ -106,10 +106,15 @@ module Presto
|
|
106
106
|
private :count_total_processed_rows
|
107
107
|
|
108
108
|
def count_total_processed_rows(stage)
|
109
|
-
rows = stage.tasks.map{|t| t.stats.
|
109
|
+
rows = stage.tasks.map{|t| t.stats.raw_input_positions }.inject(0, :+)
|
110
110
|
rows + stage.sub_stages.map{|ss| count_total_processed_rows(ss) }.inject(0, :+)
|
111
111
|
end
|
112
112
|
|
113
|
+
def processed_rows(query_id)
|
114
|
+
qi = QueryInfo.decode(find(query_id))
|
115
|
+
count_total_processed_rows(qi.output_stage)
|
116
|
+
end
|
117
|
+
|
113
118
|
def query_progress
|
114
119
|
running_queries = query_list.map{|q| QueryInfo.decode(q) }.select{|q| q.state == :running }
|
115
120
|
query_info = running_queries.map{|q|
|