mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
removed color output code
This commit is contained in:
parent
50a62a17ff
commit
b5a29155e4
@ -104,15 +104,6 @@ static void run_benchmarks(int size, int loops, int max_matches,
|
|||||||
avg_bw /= max_matches;
|
avg_bw /= max_matches;
|
||||||
total_sec /= 1000000.0;
|
total_sec /= 1000000.0;
|
||||||
/*convert average time to us*/
|
/*convert average time to us*/
|
||||||
/* Keeping the color output
|
|
||||||
printf(KMAG "%s: %u matches, %u * %u iterations," KBLU
|
|
||||||
" total elapsed time =" RST " %.3f s, " KBLU
|
|
||||||
"average time per call =" RST " %.3f μs," KBLU
|
|
||||||
" max bandwidth = " RST " %.3f MB/s," KBLU
|
|
||||||
" average bandwidth =" RST " %.3f MB/s \n",
|
|
||||||
bench.label, max_matches, size, loops, total_sec, avg_time,
|
|
||||||
max_bw, avg_bw);
|
|
||||||
*/
|
|
||||||
printf("%s,%u,%u,%u,%.3f,%.3f,%.3f,%.3f\n", bench.label, max_matches,
|
printf("%s,%u,%u,%u,%.3f,%.3f,%.3f,%.3f\n", bench.label, max_matches,
|
||||||
size, loops, total_sec, avg_time, max_bw, avg_bw);
|
size, loops, total_sec, avg_time, max_bw, avg_bw);
|
||||||
} else {
|
} else {
|
||||||
@ -134,12 +125,6 @@ static void run_benchmarks(int size, int loops, int max_matches,
|
|||||||
max_bw = total_size / total_sec;
|
max_bw = total_size / total_sec;
|
||||||
/*convert to MB/s*/
|
/*convert to MB/s*/
|
||||||
max_bw /= 1048576.0;
|
max_bw /= 1048576.0;
|
||||||
/*Keeping the color output
|
|
||||||
printf(KMAG "%s: no matches, %u * %u iterations," KBLU " total elapsed
|
|
||||||
time =" RST " %.3f s, " KBLU "average time per call =" RST " %.3f μs ,"
|
|
||||||
KBLU " bandwidth = " RST " %.3f MB/s \n", bench.label, size ,loops,
|
|
||||||
total_sec, avg_time, max_bw );
|
|
||||||
*/
|
|
||||||
printf("%s,0,%u,%u,%.3f,%.3f,%.3f,0\n", bench.label, size, loops,
|
printf("%s,0,%u,%u,%.3f,%.3f,%.3f,0\n", bench.label, size, loops,
|
||||||
total_sec, avg_time, max_bw);
|
total_sec, avg_time, max_bw);
|
||||||
}
|
}
|
||||||
|
@ -26,44 +26,32 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "hwlm/hwlm_literal.h"
|
||||||
|
#include "hwlm/noodle_build.h"
|
||||||
|
#include "hwlm/noodle_engine.h"
|
||||||
|
#include "hwlm/noodle_internal.h"
|
||||||
#include "nfa/shufti.h"
|
#include "nfa/shufti.h"
|
||||||
#include "nfa/shufticompile.h"
|
#include "nfa/shufticompile.h"
|
||||||
#include "nfa/truffle.h"
|
#include "nfa/truffle.h"
|
||||||
#include "nfa/trufflecompile.h"
|
#include "nfa/trufflecompile.h"
|
||||||
#include "nfa/vermicelli.hpp"
|
#include "nfa/vermicelli.hpp"
|
||||||
#include "hwlm/noodle_build.h"
|
|
||||||
#include "hwlm/noodle_engine.h"
|
|
||||||
#include "hwlm/noodle_internal.h"
|
|
||||||
#include "hwlm/hwlm_literal.h"
|
|
||||||
#include "util/bytecode_ptr.h"
|
|
||||||
#include "scratch.h"
|
#include "scratch.h"
|
||||||
|
#include "util/bytecode_ptr.h"
|
||||||
|
|
||||||
/*define colour control characters*/
|
class MicroBenchmark {
|
||||||
#define RST "\x1B[0m"
|
|
||||||
#define KRED "\x1B[31m"
|
|
||||||
#define KGRN "\x1B[32m"
|
|
||||||
#define KYEL "\x1B[33m"
|
|
||||||
#define KBLU "\x1B[34m"
|
|
||||||
#define KMAG "\x1B[35m"
|
|
||||||
#define KCYN "\x1B[36m"
|
|
||||||
#define KWHT "\x1B[37m"
|
|
||||||
|
|
||||||
class MicroBenchmark
|
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
char const *label;
|
char const *label;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
// Shufti/Truffle
|
// Shufti/Truffle
|
||||||
m128 lo, hi;
|
m128 lo, hi;
|
||||||
ue2::CharReach chars;
|
ue2::CharReach chars;
|
||||||
std::vector<u8> buf;
|
std::vector<u8> buf;
|
||||||
|
|
||||||
// Noodle
|
// Noodle
|
||||||
struct hs_scratch scratch;
|
struct hs_scratch scratch;
|
||||||
ue2::bytecode_ptr<noodTable> nt;
|
ue2::bytecode_ptr<noodTable> nt;
|
||||||
|
|
||||||
MicroBenchmark(char const *label_, size_t size_)
|
MicroBenchmark(char const *label_, size_t size_)
|
||||||
:label(label_), size(size_), buf(size_) {
|
: label(label_), size(size_), buf(size_){};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user