ezmetrics 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/lib/ezmetrics.rb +4 -4
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61d26fa5d7a779917ac2ba154e82f29745a22b64261442117d15b286d0e06276
|
4
|
+
data.tar.gz: 44ff087c54cf0e5fdf8763b88deaa59f3ccdfa1e11c12ab5c1da2eebdeea7764
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bf28edd6c644648198905bcdf50a77a0083c53b6eba312b709e9c1cb951adba1c407cbc28ac3ae0588b15185b5aa0132ef1f568ff30af0158b770d388460885
|
7
|
+
data.tar.gz: a08685fea3025b23e5dca7439e9b7f4f2313933363b01a716e68eba800e4b96fce0d976cf25111c0e7a36f655abb6497e3481d39caba881b2ee706e49958b365
|
data/README.md
CHANGED
@@ -219,6 +219,8 @@ EZmetrics.new.show(views: :avg, :db: [:avg, :max], requests: true)
|
|
219
219
|
|
220
220
|
### Partitioning
|
221
221
|
|
222
|
+
If you want to visualize your metrics by using a **line chart**, you will need to use partitioning.
|
223
|
+
|
222
224
|
To aggregate metrics, partitioned by a unit of time you need to call `partition_by({time_unit})` before calling `show`
|
223
225
|
|
224
226
|
```ruby
|
@@ -299,9 +301,9 @@ EZmetrics::Benchmark.new.measure_aggregation(:minute)
|
|
299
301
|
| Interval | Duration (seconds) |
|
300
302
|
| :------: | :----------------: |
|
301
303
|
| 1 minute | 0.0 |
|
302
|
-
| 1 hour | 0.
|
303
|
-
| 12 hours | 0.
|
304
|
-
| 24 hours |
|
305
|
-
| 48 hours |
|
304
|
+
| 1 hour | 0.04 |
|
305
|
+
| 12 hours | 0.53 |
|
306
|
+
| 24 hours | 1.59 |
|
307
|
+
| 48 hours | 3.51 |
|
306
308
|
|
307
309
|
The benchmarks above were run on a _2017 Macbook Pro 2.9 GHz Intel Core i7 with 16 GB of RAM_
|
data/lib/ezmetrics.rb
CHANGED
@@ -114,10 +114,10 @@ class EZmetrics
|
|
114
114
|
|
115
115
|
def second_to_partition_unit(time_unit, second)
|
116
116
|
return second if time_unit == :second
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
117
|
+
time = Time.at(second)
|
118
|
+
return (time - time.sec - time.min * 60 - time.hour * 3600).to_i if time_unit == :day
|
119
|
+
return (time - time.sec - time.min * 60).to_i if time_unit == :hour
|
120
|
+
(time - time.sec).to_i
|
121
121
|
end
|
122
122
|
|
123
123
|
def interval_metrics
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ezmetrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolae Rotaru
|
@@ -76,11 +76,10 @@ files:
|
|
76
76
|
- README.md
|
77
77
|
- lib/ezmetrics.rb
|
78
78
|
- lib/ezmetrics/benchmark.rb
|
79
|
-
homepage: https://
|
79
|
+
homepage: https://github.com/nyku/ezmetrics
|
80
80
|
licenses:
|
81
81
|
- GPL-3.0
|
82
|
-
metadata:
|
83
|
-
source_code_uri: https://github.com/nyku/ezmetrics
|
82
|
+
metadata: {}
|
84
83
|
post_install_message:
|
85
84
|
rdoc_options: []
|
86
85
|
require_paths:
|