Skip to content

Commit

Permalink
Added full microslice dump for first error to microslice analyzer and
Browse files Browse the repository at this point in the history
adopted mstool report frequency to aprox. match tsclient.
  • Loading branch information
oTTer-Chief committed Nov 3, 2016
1 parent 6434c02 commit c693abe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/mstool/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Application::Application(Parameters const& par) : par_(par)
// Sink setup
if (par_.analyze) {
sinks_.push_back(std::unique_ptr<fles::MicrosliceSink>(
new MicrosliceAnalyzer(10000, std::cout, "", par_.channel_idx)));
new MicrosliceAnalyzer(1000000, std::cout, "", par_.channel_idx)));
}

if (par_.dump_verbosity > 0) {
Expand Down
6 changes: 6 additions & 0 deletions lib/fles_core/MicrosliceAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "MicrosliceAnalyzer.hpp"
#include "PatternChecker.hpp"
#include "TimesliceDebugger.hpp"
#include "Utility.hpp"
#include <cassert>
#include <sstream>
Expand Down Expand Up @@ -100,6 +101,11 @@ bool MicrosliceAnalyzer::check_microslice(const fles::Microslice& ms)
}

if (!result) {
if (microslice_error_count_ == 0) { // full dump for first error
out_ << "microslice content:\n"
<< MicrosliceDescriptorDump(ms.desc())
<< BufferDump(ms.content(), ms.desc().size);
}
++microslice_error_count_;
}

Expand Down

0 comments on commit c693abe

Please sign in to comment.