1 #ifndef _OPENCOG_AS_BENCHMARK_H
2 #define _OPENCOG_AS_BENCHMARK_H
5 #include <boost/tuple/tuple.hpp>
7 #include <opencog/util/mt19937ar.h>
27 typedef boost::tuple<size_t,clock_t,long>
record_t;
37 TimeStats(
const std::vector<record_t>& records);
65 std::poisson_distribution<unsigned> *
prg;
123 bool display =
true);
142 #ifdef ZMQ_EXPERIMENT
149 #endif //_OPENCOG_AS_BENCHMARK_H
std::poisson_distribution< unsigned > * prg
std::string memoize_or_compile(std::string)
std::vector< std::string > methodNames
float chanceOfNonDefaultNode
void recordToFile(std::ofstream &file, const record_t record) const
bool showTypeSizes
number of nodes to build atomspace with before testing
std::vector< BMFn > methodsToTest
void buildAtomSpace(long atomspaceSize=(1<< 16), float percentLinks=0.1, bool display=true)
boost::tuple< size_t, clock_t, long > record_t
float chanceOfNonDefaultLink
unsigned long UUID
UUID == Universally Unique Identifier.
timepair_t(AtomSpaceBenchmark::* BMFn)()
void setMethod(std::string method)
AtomSpace * asp
never make the atomspace bigger than this while building it
void startBenchmark(int numThreads=1)
timepair_t bm_getOutgoingSet()
clock_t makeRandomNode(const std::string &s)
std::default_random_engine randgen
TimeStats(const std::vector< record_t > &records)
unsigned short Type
type of Atoms, represented as short integer (16 bits)
void doBenchmark(const std::string &methodName, BMFn methodToCall)
timepair_t bm_getHandlesByType()
size_t estimateOfAtomSize(Handle h)
timepair_t bm_getIncomingSet()
timepair_t bm_getTruthValue()
timepair_t bm_setTruthValue()
boost::tuple< clock_t, clock_t > timepair_t