clang-format mako

This commit is contained in:
Sam Gwydir 2020-01-17 14:43:02 -08:00
parent 389ea1ca64
commit 7662273cd8
4 changed files with 1801 additions and 1954 deletions

441
bindings/c/test/mako/mako.c Executable file → Normal file

File diff suppressed because it is too large Load Diff

7
bindings/c/test/mako/mako.h Executable file → Normal file
View File

@ -32,7 +32,6 @@
#define FDB_ERROR_ABORT -2
#define FDB_ERROR_CONFLICT -3
/* transaction specification */
enum Operations {
OP_GETREADVERSION,
@ -75,11 +74,7 @@ enum Arguments {
ARG_TXNTRACE
};
enum TPSChangeTypes {
TPS_SIN,
TPS_SQUARE,
TPS_PULSE
};
enum TPSChangeTypes { TPS_SIN, TPS_SQUARE, TPS_PULSE };
#define KEYPREFIX "mako"
#define KEYPREFIXLEN 4

8
bindings/c/test/mako/utils.c Executable file → Normal file
View File

@ -1,8 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "utils.h"
#include "mako.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
/* uniform-distribution random */
int urand(int low, int high) {
@ -66,7 +66,6 @@ int digits(int num) {
return digits;
}
/* generate a key for a given key number */
/* len is the buffer size, key length + null */
void genkey(char* str, int num, int rows, int len) {
@ -78,4 +77,3 @@ void genkey(char *str, int num, int rows, int len) {
}
str[len - 1] = '\0';
}

3
bindings/c/test/mako/utils.h Executable file → Normal file
View File

@ -27,8 +27,7 @@ int insert_begin(int rows, int p_idx, int t_idx, int total_p, int total_t);
int insert_end(int rows, int p_idx, int t_idx, int total_p, int total_t);
/* devide a value equally among threads */
int compute_thread_portion(int val, int p_idx, int t_idx, int total_p,
int total_t);
int compute_thread_portion(int val, int p_idx, int t_idx, int total_p, int total_t);
/* similar to insert_begin/end, compute_thread_tps computes
* the per-thread target TPS for given configuration.