Skip to content

Commit

Permalink
Update Info struct for RTS 1.4 compatibility (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzunk authored Sep 17, 2020
1 parent 5a81d4b commit a4f7822
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions lib/redis/time_series/info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class TimeSeries
# @see https://oss.redislabs.com/redistimeseries/commands/#tsinfo
Info = Struct.new(
:chunk_count,
:chunk_size,
:duplicate_policy,
:first_timestamp,
:labels,
:last_timestamp,
Expand Down
16 changes: 9 additions & 7 deletions spec/redis/time_series_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,19 @@ def msec(ts)
expect(info).to be_a Redis::TimeSeries::Info
expect(info.to_h).to eq(
{
series: ts,
total_samples: 0,
memory_usage: 4184,
chunk_count: 1,
chunk_size: 4096,
duplicate_policy: nil,
first_timestamp: 0,
labels: {},
last_timestamp: 0,
max_samples_per_chunk: nil,
memory_usage: 4184,
retention_time: 0,
chunk_count: 1,
max_samples_per_chunk: 256,
labels: {},
rules: [],
series: ts,
source_key: nil,
rules: []
total_samples: 0
}
)
end
Expand Down

0 comments on commit a4f7822

Please sign in to comment.