mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 17:26:21 +00:00
agregar la dimensión al agrupar
This commit is contained in:
parent
d181c179ff
commit
604ee233bd
1 changed files with 11 additions and 6 deletions
|
@ -78,13 +78,18 @@ class UriCollectionJob < PeriodicJob
|
|||
reduce_rollup('host', beginning, :sum, **host_dimensions)
|
||||
|
||||
columns.each_key do |column|
|
||||
square_rollup(name: "host|uri|#{column}",
|
||||
new_name: "host|#{column}",
|
||||
interval: starting_interval,
|
||||
dimensions: host_dimensions,
|
||||
beginning: beginning)
|
||||
values.each do |value|
|
||||
column_dimensions = { host: host }
|
||||
column_dimensions[column] = value
|
||||
|
||||
reduce_rollup("host|#{column}", beginning, :sum, **host_dimensions)
|
||||
square_rollup(name: "host|uri|#{column}",
|
||||
new_name: "host|#{column}",
|
||||
interval: starting_interval,
|
||||
dimensions: column_dimensions,
|
||||
beginning: beginning)
|
||||
|
||||
reduce_rollup("host|#{column}", beginning, :sum, **column_dimensions)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue