(s *runtimev1.ModelPartition)
| 650 | } |
| 651 | |
| 652 | func toModelPartitionRow(s *runtimev1.ModelPartition) *modelPartition { |
| 653 | data, err := json.Marshal(s.Data) |
| 654 | if err != nil { |
| 655 | panic(err) |
| 656 | } |
| 657 | |
| 658 | var executedOn string |
| 659 | if s.ExecutedOn != nil { |
| 660 | executedOn = s.ExecutedOn.AsTime().Format(time.RFC3339) |
| 661 | } |
| 662 | |
| 663 | return &modelPartition{ |
| 664 | Key: s.Key, |
| 665 | DataJSON: string(data), |
| 666 | ExecutedOn: executedOn, |
| 667 | Elapsed: (time.Duration(s.ElapsedMs) * time.Millisecond).String(), |
| 668 | Error: s.Error, |
| 669 | } |
| 670 | } |
| 671 | |
| 672 | type modelPartition struct { |
| 673 | Key string `header:"key" json:"key"` |
no test coverage detected