tools: added compute-hops and dump-hops tools
As these tools work closely together with fail components, its easiest, to build them in this context. As these tools don't really matter for fail use, they might never be pushed to the master branch. Change-Id: I8c8bd80376d0475f08a531a995d829e85032371b
This commit is contained in:
30
tools/compute-hops/SimpleAlgorithm.hpp
Normal file
30
tools/compute-hops/SimpleAlgorithm.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef SIMPLE_ALGORITHM__HPP
|
||||
#define SIMPLE_ALGORITHM__HPP
|
||||
|
||||
//#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include "BasicAlgorithm.hpp"
|
||||
#include "../../src/core/util/smarthops/TraceReader.hpp"
|
||||
|
||||
using namespace fail;
|
||||
|
||||
class ResultCollector;
|
||||
|
||||
class SimpleAlgorithm : public BasicAlgorithm {
|
||||
public:
|
||||
SimpleAlgorithm(ResultCollector *rc) : BasicAlgorithm(rc) {}
|
||||
virtual ~SimpleAlgorithm() {}
|
||||
|
||||
bool calculateAllHops(TraceReader& trace);
|
||||
|
||||
private:
|
||||
// Count occurences
|
||||
//map<trace_event_tuple_t, vector<trace_pos_t> > m_occurences;
|
||||
std::map<trace_event_tuple_t, unsigned long > m_occurences;
|
||||
|
||||
std::map<trace_event_tuple_t, unsigned long > m_occ_cp;
|
||||
};
|
||||
|
||||
#endif // SIMPLE_ALGORITHM__HPP
|
||||
|
||||
Reference in New Issue
Block a user