Skip to content

Commit

Permalink
Added components in sync check to timeslice analyzer.
Browse files Browse the repository at this point in the history
  • Loading branch information
oTTer-Chief committed Nov 4, 2016
1 parent c693abe commit afe54a9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/fles_core/TimesliceAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,30 @@ bool TimesliceAnalyzer::check_timeslice(const fles::Timeslice& ts)
return false;
}

uint64_t first_component_start_time = 0;
if (ts.num_microslices(0) != 0) {
first_component_start_time = ts.get_microslice(0, 0).desc().idx;
}
for (size_t c = 0; c < ts.num_components(); ++c) {
if (ts.num_microslices(c) == 0) {
out_ << "no microslices in timeslice " << ts.index()
<< ", component " << c << std::endl;
++timeslice_error_count_;
return false;
}
// ensure all components start with same time
uint64_t component_start_time = ts.get_microslice(c, 0).desc().idx;
if (component_start_time != first_component_start_time) {
out_ << "start time missmatch in timeslice " << ts.index()
<< ", component " << c << ", start time "
<< component_start_time << ", offset to c0 "
<< static_cast<int64_t>(first_component_start_time -
component_start_time)
<< std::endl;
++timeslice_error_count_;
return false;
}
// checke all microslices of component
pattern_checkers_.at(c)->reset();
for (size_t m = 0; m < ts.num_microslices(c); ++m) {
bool success =
Expand Down

0 comments on commit afe54a9

Please sign in to comment.