db-purger 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/db-purger/metrics.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 467c140ae632db0d6ef023e6831cdd7b3cfef60681e568cab979d7c501df149d
|
4
|
+
data.tar.gz: 91b3f4eb1529b7d96c39df1943604e9c251e20e0e1ca27e24035563ebc2a41c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27115aec9e8156c358f0b310b373ff509dd327139f7732fd3548767abae7ce39f4e0f59bf02b3a27a701189b022c2a7b459166f9aa22311d8235a76cb6695bd3
|
7
|
+
data.tar.gz: c6efa22b397166e06ad464c73844fcca14542ce358a0ea3bd87be1d2fa130600ebfe62b56da416c416d3ba0aacd48a5f4ef0441fb90b5d3747881e6d0ccff451
|
data/lib/db-purger/metrics.rb
CHANGED
@@ -64,5 +64,17 @@ module DBPurger
|
|
64
64
|
stats[:records_selected] += records_selected
|
65
65
|
stats
|
66
66
|
end
|
67
|
+
|
68
|
+
def as_json(_opts = {})
|
69
|
+
{
|
70
|
+
took: elapsed_time_in_seconds,
|
71
|
+
started_at: @started_at,
|
72
|
+
finished_at: @finished_at,
|
73
|
+
purge_stats: @purge_stats,
|
74
|
+
delete_stats: @delete_stats,
|
75
|
+
lookup_stats: @lookup_stats,
|
76
|
+
filter_stats: @filter_stats
|
77
|
+
}
|
78
|
+
end
|
67
79
|
end
|
68
80
|
end
|