(rowCount int)
| 342 | } |
| 343 | |
| 344 | func createTablet(rowCount int) (*client.Tablet, error) { |
| 345 | tablet, err := client.NewTablet("root.ln.device1", []*client.MeasurementSchema{ |
| 346 | { |
| 347 | Measurement: "restart_count", |
| 348 | DataType: client.INT32, |
| 349 | }, { |
| 350 | Measurement: "price", |
| 351 | DataType: client.DOUBLE, |
| 352 | }, { |
| 353 | Measurement: "tick_count", |
| 354 | DataType: client.INT64, |
| 355 | }, { |
| 356 | Measurement: "temperature", |
| 357 | DataType: client.FLOAT, |
| 358 | }, { |
| 359 | Measurement: "description", |
| 360 | DataType: client.TEXT, |
| 361 | }, |
| 362 | { |
| 363 | Measurement: "status", |
| 364 | DataType: client.BOOLEAN, |
| 365 | }, |
| 366 | }, rowCount) |
| 367 | |
| 368 | if err != nil { |
| 369 | return nil, err |
| 370 | } |
| 371 | ts := time.Now().UTC().UnixNano() / 1000000 |
| 372 | for row := 0; row < int(rowCount); row++ { |
| 373 | ts++ |
| 374 | tablet.SetTimestamp(ts, row) |
| 375 | tablet.SetValueAt(rand.Int31(), 0, row) |
| 376 | tablet.SetValueAt(rand.Float64(), 1, row) |
| 377 | tablet.SetValueAt(rand.Int63(), 2, row) |
| 378 | tablet.SetValueAt(rand.Float32(), 3, row) |
| 379 | tablet.SetValueAt(fmt.Sprintf("Test Device %d", row+1), 4, row) |
| 380 | tablet.SetValueAt(bool(ts%2 == 0), 5, row) |
| 381 | tablet.RowSize++ |
| 382 | } |
| 383 | return tablet, nil |
| 384 | } |
| 385 | |
| 386 | func (s *e2eTestSuite) Test_InsertAlignedTablets() { |
| 387 | var timeseries = []string{"root.ln.device1.**"} |
no test coverage detected
searching dependent graphs…