presto-metrics 0.2.4 → 0.2.5
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.rb +2 -0
- 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: 722509363d3fe391b9f770f0bd13aa7757041027
|
4
|
+
data.tar.gz: e4602adb96b50132f4f8e1fe5464c62581725512
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 979d26fafc45da47723169b3fde5b7d528dca1234da34a942020da2d7060177335027e1347fa23c462d8a4edd3b13ac7821459c1df5ab04d924f3ff7173587f3
|
7
|
+
data.tar.gz: 5cc4ce3746db1c0db23e5291742c0768de6be93bbb80471b1e17cda778a7bb7c21793f73b8d7eecbe24b27fa6a24fe4cdfcf54f38ff6c0d9927e8123af26233d
|
data/lib/presto/metrics.rb
CHANGED
@@ -2,6 +2,7 @@ require "presto/metrics/version"
|
|
2
2
|
require 'httparty'
|
3
3
|
require 'json'
|
4
4
|
require 'set'
|
5
|
+
require 'time'
|
5
6
|
|
6
7
|
module Presto
|
7
8
|
module Metrics
|
@@ -43,6 +44,7 @@ module Presto
|
|
43
44
|
h['total_drivers'] = qi['totalDrivers'] || 0
|
44
45
|
h['elapsed_time'] = qi['elapsedTime'] || "0.0m"
|
45
46
|
h['create_time'] = qi['createTime']
|
47
|
+
h['running_time'] = qi['endTime'] || Time.now.utc.iso8601(3)
|
46
48
|
if(h['state'] == "FAILED")
|
47
49
|
h['errorCode'] = find(h['query_id'])['errorCode'] || {}
|
48
50
|
end
|