presto-metrics 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f68643372b784275eac1dd75ec8c9e4bd899f177
4
- data.tar.gz: 6e5aca1a188c6a526175c8e6b2a4af254b46132a
3
+ metadata.gz: a7c14458d189a96aabc5904a1bf20ad3597d7764
4
+ data.tar.gz: 174e28a4102f63327be17c27e2b85b9da08dec4a
5
5
  SHA512:
6
- metadata.gz: 6dbdd29162bb6f26f4cfaa83210d95c4270c2534efc1175a21f825c8349b5dd3eedd04c481ebc88d011f6142c18a42e6f490ae75249cddc790b334bfc3891c5b
7
- data.tar.gz: b4cc203242ac159e0e7bd1a95693197bf38e3cc57007bcb024ee3efb97a5e72f2944adf37765f8e15ad60c7a9cf8bcdf5d14a2cd2f23acc03eeb16203e69f472
6
+ metadata.gz: b6e07341222ee177ade2990ad5c1ec48bd6e8551f5cbaa8fcccd71e14dba4c64b9df81ecd1f201f6368cb9bb51841fe3d2508918cec6c521f109a6edca1df4ee
7
+ data.tar.gz: 9852ec621a52dc0eb126458caf52bbc82bf6816d96b25b6804d62a381f72a5f9d8b323dabaf7671b6ad939037ec89bfe71090a415fe1ebf1d23e1796cefcc800
@@ -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.processed_input_positions }.inject(0, :+)
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|
@@ -1,5 +1,5 @@
1
1
  module Presto
2
2
  module Metrics
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: presto-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taro L. Saito