openbsd-ports/benchmarks/sysbench/patches/patch-sysbench_sb_logger_c
sthen 8455372320 import sysbench:
SysBench is a modular, cross-platform and multi-threaded benchmark tool
for evaluating OS parameters that are important for a system running a
database under intensive load.

The idea of this benchmark suite is to quickly get an impression about
system performance without setting up complex database benchmarks or
even without installing a database at all.

Current features allow to test the following system parameters:

    * file I/O performance
    * scheduler performance
    * memory allocation and transfer speed
    * POSIX threads implementation performance
    * database server performance (OLTP benchmark)

Primarily written for MySQL server benchmarking, SysBench will be
further extended to support multiple database backends, distributed
benchmarks and third-party plug-in modules.

from Jung (maintainer) with some tweaks.
thanks to landry@ for testing and feedback.

ok landry
2008-04-15 14:14:08 +00:00

45 lines
1.4 KiB
Plaintext

$OpenBSD: patch-sysbench_sb_logger_c,v 1.1.1.1 2008/04/15 14:14:08 sthen Exp $
--- sysbench/sb_logger.c.orig Mon Apr 3 12:39:09 2006
+++ sysbench/sb_logger.c Tue Apr 15 12:10:58 2008
@@ -441,15 +441,17 @@ int oper_handler_init(void)
if (batch_mode)
{
+ int err;
pthread_mutex_init(&batch_mutex, NULL);
pthread_cond_init(&batch_cond, NULL);
/* Create batch thread */
pthread_attr_init(&batch_attr);
- if (pthread_create(&batch_thread, &batch_attr, &batch_runner_proc, NULL)
- != 0)
+ if ((err = pthread_create(&batch_thread, &batch_attr,
+ &batch_runner_proc, NULL)) != 0)
{
- log_errno(LOG_FATAL, "Batch thread creation failed");
+ log_text(LOG_FATAL, "Batch thread creation failed errno = %d (%s)",
+ err, strerror(err));
return 1;
}
batch_status = BATCH_STATUS_STOP;
@@ -541,15 +543,17 @@ int oper_handler_done(void)
if (batch_mode)
{
+ int err;
/* Stop the batch thread */
pthread_mutex_lock(&batch_mutex);
batch_status = BATCH_STATUS_STOP;
pthread_cond_signal(&batch_cond);
pthread_mutex_unlock(&batch_mutex);
- if (pthread_join(batch_thread, NULL))
+ if ((err = pthread_join(batch_thread, NULL)))
{
- log_errno(LOG_FATAL, "Batch thread join failed");
+ log_text(LOG_FATAL, "Batch thread join failed errno = %d (%s)",
+ err, strerror(err));
return 1;
}