#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <vector>
#include <chrono>
#include <iostream>
#include <fstream>
#include <stdarg.h>
#include "libs/json.hpp"
Go to the source code of this file.
|
| void | printf_debug (const char *fmt,...) |
| |
| void | cpu_test (json &results, int repetition=REP) |
| |
| template<int N, int M> |
| void | cpu_test_r (json &results, int(&arr)[M], int(&sizes)[N], int repetition=REP) |
| |
| template<int N, int M> |
| void | cpu_test_w (json &results, int(&arr)[M], int(&sizes)[N], int repetition=REP) |
| |
| template<int N, int M> |
| void | cpu_test_rw (json &results, int(&arr)[M], int(&sizes)[N], int repetition=REP) |
| |
| template<int N> |
| void | io_test_rw (json &results, int(&sizes)[N], int file_size, const int buffer_size=1 *MB) |
| |
| void | io_test_many (json &results, int no_files=KILO) |
| |
| int | main (int argc, char *argv[]) |
| |
| #define ARR_SIZE (MB * 100) |
| #define CHAR_SIZE sizeof(char) |
| #define INT_SIZE sizeof(int) |
| #define SHOW_DETAILS true |
| #define SHOW_DURATION true |
| void cpu_test |
( |
json & |
results, |
|
|
int |
repetition = REP |
|
) |
| |
template<int N, int M>
| void cpu_test_r |
( |
json & |
results, |
|
|
int(&) |
arr[M], |
|
|
int(&) |
sizes[N], |
|
|
int |
repetition = REP |
|
) |
| |
template<int N, int M>
| void cpu_test_rw |
( |
json & |
results, |
|
|
int(&) |
arr[M], |
|
|
int(&) |
sizes[N], |
|
|
int |
repetition = REP |
|
) |
| |
template<int N, int M>
| void cpu_test_w |
( |
json & |
results, |
|
|
int(&) |
arr[M], |
|
|
int(&) |
sizes[N], |
|
|
int |
repetition = REP |
|
) |
| |
| void io_test_many |
( |
json & |
results, |
|
|
int |
no_files = KILO |
|
) |
| |
template<int N>
| void io_test_rw |
( |
json & |
results, |
|
|
int(&) |
sizes[N], |
|
|
int |
file_size, |
|
|
const int |
buffer_size = 1 * MB |
|
) |
| |
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Start benchmark, usage: optional <output> file: will create json file output with results optional <scale> float: scales repetition count for benchmark default is 1, for example value 2 will run tests twice as many times, value 0.5 will experiments half as many times
Definition at line 335 of file memory.cc.
| void printf_debug |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |