@ -560,9 +560,9 @@ func TestConcatenatingChunkSeriesMerger(t *testing.T) {
{
name : "single series" ,
input : [ ] ChunkSeries {
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } } , [ ] tsdbutil . Sample { sample { 3 , 3 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } } , [ ] tsdbutil . Sample { sample { 3 , 3 , nil , nil } } ) ,
} ,
expected : NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } } , [ ] tsdbutil . Sample { sample { 3 , 3 } } ) ,
expected : NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } } , [ ] tsdbutil . Sample { sample { 3 , 3 , nil , nil } } ) ,
} ,
{
name : "two empty series" ,
@ -575,70 +575,70 @@ func TestConcatenatingChunkSeriesMerger(t *testing.T) {
{
name : "two non overlapping" ,
input : [ ] ChunkSeries {
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } } , [ ] tsdbutil . Sample { sample { 3 , 3 } , sample { 5 , 5 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 7 , 7 } , sample { 9 , 9 } } , [ ] tsdbutil . Sample { sample { 10 , 10 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } } , [ ] tsdbutil . Sample { sample { 3 , 3 , nil , nil } , sample { 5 , 5 , nil , nil } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 7 , 7 , nil , nil } , sample { 9 , 9 , nil , nil } } , [ ] tsdbutil . Sample { sample { 10 , 10 , nil , nil } } ) ,
} ,
expected : NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } } , [ ] tsdbutil . Sample { sample { 3 , 3 } , sample { 5 , 5 } } , [ ] tsdbutil . Sample { sample { 7 , 7 } , sample { 9 , 9 } } , [ ] tsdbutil . Sample { sample { 10 , 10 } } ) ,
expected : NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } } , [ ] tsdbutil . Sample { sample { 3 , 3 , nil , nil } , sample { 5 , 5 , nil , nil } } , [ ] tsdbutil . Sample { sample { 7 , 7 , nil , nil } , sample { 9 , 9 , nil , nil } } , [ ] tsdbutil . Sample { sample { 10 , 10 , nil , nil } } ) ,
} ,
{
name : "two overlapping" ,
input : [ ] ChunkSeries {
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } } , [ ] tsdbutil . Sample { sample { 3 , 3 } , sample { 8 , 8 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 7 , 7 } , sample { 9 , 9 } } , [ ] tsdbutil . Sample { sample { 10 , 10 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } } , [ ] tsdbutil . Sample { sample { 3 , 3 , nil , nil } , sample { 8 , 8 , nil , nil } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 7 , 7 , nil , nil } , sample { 9 , 9 , nil , nil } } , [ ] tsdbutil . Sample { sample { 10 , 10 , nil , nil } } ) ,
} ,
expected : NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) ,
[ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } } , [ ] tsdbutil . Sample { sample { 3 , 3 } , sample { 8 , 8 } } ,
[ ] tsdbutil . Sample { sample { 7 , 7 } , sample { 9 , 9 } } , [ ] tsdbutil . Sample { sample { 10 , 10 } } ,
[ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } } , [ ] tsdbutil . Sample { sample { 3 , 3 , nil , nil } , sample { 8 , 8 , nil , nil } } ,
[ ] tsdbutil . Sample { sample { 7 , 7 , nil , nil } , sample { 9 , 9 , nil , nil } } , [ ] tsdbutil . Sample { sample { 10 , 10 , nil , nil } } ,
) ,
} ,
{
name : "two duplicated" ,
input : [ ] ChunkSeries {
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } , sample { 3 , 3 } , sample { 5 , 5 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 2 , 2 } , sample { 3 , 3 } , sample { 5 , 5 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } , sample { 3 , 3 , nil , nil } , sample { 5 , 5 , nil , nil } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 2 , 2 , nil , nil } , sample { 3 , 3 , nil , nil } , sample { 5 , 5 , nil , nil } } ) ,
} ,
expected : NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) ,
[ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } , sample { 3 , 3 } , sample { 5 , 5 } } ,
[ ] tsdbutil . Sample { sample { 2 , 2 } , sample { 3 , 3 } , sample { 5 , 5 } } ,
[ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } , sample { 3 , 3 , nil , nil } , sample { 5 , 5 , nil , nil } } ,
[ ] tsdbutil . Sample { sample { 2 , 2 , nil , nil } , sample { 3 , 3 , nil , nil } , sample { 5 , 5 , nil , nil } } ,
) ,
} ,
{
name : "three overlapping" ,
input : [ ] ChunkSeries {
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } , sample { 3 , 3 } , sample { 5 , 5 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 2 , 2 } , sample { 3 , 3 } , sample { 6 , 6 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 0 , 0 } , sample { 4 , 4 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } , sample { 3 , 3 , nil , nil } , sample { 5 , 5 , nil , nil } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 2 , 2 , nil , nil } , sample { 3 , 3 , nil , nil } , sample { 6 , 6 , nil , nil } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 0 , 0 , nil , nil } , sample { 4 , 4 , nil , nil } } ) ,
} ,
expected : NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) ,
[ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } , sample { 3 , 3 } , sample { 5 , 5 } } ,
[ ] tsdbutil . Sample { sample { 2 , 2 } , sample { 3 , 3 } , sample { 6 , 6 } } ,
[ ] tsdbutil . Sample { sample { 0 , 0 } , sample { 4 , 4 } } ,
[ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } , sample { 3 , 3 , nil , nil } , sample { 5 , 5 , nil , nil } } ,
[ ] tsdbutil . Sample { sample { 2 , 2 , nil , nil } , sample { 3 , 3 , nil , nil } , sample { 6 , 6 , nil , nil } } ,
[ ] tsdbutil . Sample { sample { 0 , 0 , nil , nil } , sample { 4 , 4 , nil , nil } } ,
) ,
} ,
{
name : "three in chained overlap" ,
input : [ ] ChunkSeries {
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } , sample { 3 , 3 } , sample { 5 , 5 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 4 , 4 } , sample { 6 , 66 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 6 , 6 } , sample { 10 , 10 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } , sample { 3 , 3 , nil , nil } , sample { 5 , 5 , nil , nil } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 4 , 4 , nil , nil } , sample { 6 , 66 , nil , nil } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 6 , 6 , nil , nil } , sample { 10 , 10 , nil , nil } } ) ,
} ,
expected : NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) ,
[ ] tsdbutil . Sample { sample { 1 , 1 } , sample { 2 , 2 } , sample { 3 , 3 } , sample { 5 , 5 } } ,
[ ] tsdbutil . Sample { sample { 4 , 4 } , sample { 6 , 66 } } ,
[ ] tsdbutil . Sample { sample { 6 , 6 } , sample { 10 , 10 } } ,
[ ] tsdbutil . Sample { sample { 1 , 1 , nil , nil } , sample { 2 , 2 , nil , nil } , sample { 3 , 3 , nil , nil } , sample { 5 , 5 , nil , nil } } ,
[ ] tsdbutil . Sample { sample { 4 , 4 , nil , nil } , sample { 6 , 66 , nil , nil } } ,
[ ] tsdbutil . Sample { sample { 6 , 6 , nil , nil } , sample { 10 , 10 , nil , nil } } ,
) ,
} ,
{
name : "three in chained overlap complex" ,
input : [ ] ChunkSeries {
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 0 , 0 } , sample { 5 , 5 } } , [ ] tsdbutil . Sample { sample { 10 , 10 } , sample { 15 , 15 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 2 , 2 } , sample { 20 , 20 } } , [ ] tsdbutil . Sample { sample { 25 , 25 } , sample { 30 , 30 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 18 , 18 } , sample { 26 , 26 } } , [ ] tsdbutil . Sample { sample { 31 , 31 } , sample { 35 , 35 } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 0 , 0 , nil , nil } , sample { 5 , 5 , nil , nil } } , [ ] tsdbutil . Sample { sample { 10 , 10 , nil , nil } , sample { 15 , 15 , nil , nil } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 2 , 2 , nil , nil } , sample { 20 , 20 , nil , nil } } , [ ] tsdbutil . Sample { sample { 25 , 25 , nil , nil } , sample { 30 , 30 , nil , nil } } ) ,
NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) , [ ] tsdbutil . Sample { sample { 18 , 18 , nil , nil } , sample { 26 , 26 , nil , nil } } , [ ] tsdbutil . Sample { sample { 31 , 31 , nil , nil } , sample { 35 , 35 , nil , nil } } ) ,
} ,
expected : NewListChunkSeriesFromSamples ( labels . FromStrings ( "bar" , "baz" ) ,
[ ] tsdbutil . Sample { sample { 0 , 0 } , sample { 5 , 5 } } , [ ] tsdbutil . Sample { sample { 10 , 10 } , sample { 15 , 15 } } ,
[ ] tsdbutil . Sample { sample { 2 , 2 } , sample { 20 , 20 } } , [ ] tsdbutil . Sample { sample { 25 , 25 } , sample { 30 , 30 } } ,
[ ] tsdbutil . Sample { sample { 18 , 18 } , sample { 26 , 26 } } , [ ] tsdbutil . Sample { sample { 31 , 31 } , sample { 35 , 35 } } ,
[ ] tsdbutil . Sample { sample { 0 , 0 , nil , nil } , sample { 5 , 5 , nil , nil } } , [ ] tsdbutil . Sample { sample { 10 , 10 , nil , nil } , sample { 15 , 15 , nil , nil } } ,
[ ] tsdbutil . Sample { sample { 2 , 2 , nil , nil } , sample { 20 , 20 , nil , nil } } , [ ] tsdbutil . Sample { sample { 25 , 25 , nil , nil } , sample { 30 , 30 , nil , nil } } ,
[ ] tsdbutil . Sample { sample { 18 , 18 , nil , nil } , sample { 26 , 26 , nil , nil } } , [ ] tsdbutil . Sample { sample { 31 , 31 , nil , nil } , sample { 35 , 35 , nil , nil } } ,
) ,
} ,
{