diff --git a/sysbench/sysbench.c b/sysbench/sysbench.c index eac3990..8a550f6 100644 --- a/sysbench/sysbench.c +++ b/sysbench/sysbench.c @@ -427,8 +427,7 @@ static void *runner_thread(void *arg) if (sb_globals.tx_rate > 0) { /* initialize tx_rate variables */ - period_ns = round(1000000000.0 / sb_globals.tx_rate * - sb_globals.num_threads); + period_ns = floor(1e9 / sb_globals.tx_rate * sb_globals.num_threads + 0.5); if (sb_globals.tx_jitter > 0) jitter_ns = sb_globals.tx_jitter * 1000; else diff --git a/sysbench/tests/memory/sb_memory.c b/sysbench/tests/memory/sb_memory.c index 3f11c42..5278ddb 100644 --- a/sysbench/tests/memory/sb_memory.c +++ b/sysbench/tests/memory/sb_memory.c @@ -88,7 +88,7 @@ static sb_test_t memory_test = /* Test arguments */ static ssize_t memory_block_size; -static off_t memory_total_size; +static long long memory_total_size; static unsigned int memory_scope; static unsigned int memory_oper; static unsigned int memory_access_rnd; @@ -98,8 +98,8 @@ static unsigned int memory_hugetlb; /* Statistics */ static unsigned int total_ops; -static off_t total_bytes; -static off_t last_bytes; +static long long total_bytes; +static long long last_bytes; /* Array of per-thread buffers */ static int **buffers;