8455372320
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
45 lines
1.6 KiB
Plaintext
45 lines
1.6 KiB
Plaintext
$OpenBSD: patch-sysbench_sysbench_c,v 1.1.1.1 2008/04/15 14:14:08 sthen Exp $
|
|
--- sysbench/sysbench.c.orig Tue Jan 31 11:15:53 2006
|
|
+++ sysbench/sysbench.c Tue Apr 15 12:10:58 2008
|
|
@@ -423,12 +423,14 @@ int run_test(sb_test_t *test)
|
|
/* Starting the test threads */
|
|
for(i = 0; i < sb_globals.num_threads; i++)
|
|
{
|
|
+ int err;
|
|
if (sb_globals.error)
|
|
return 1;
|
|
- if (pthread_create(&(threads[i].thread), &thread_attr, &runner_thread,
|
|
- (void*)&(threads[i])) != 0)
|
|
+ if ((err = pthread_create(&(threads[i].thread), &thread_attr,
|
|
+ &runner_thread, (void*)&(threads[i]))) != 0)
|
|
{
|
|
- log_errno(LOG_FATAL, "Thread #%d creation failed", i);
|
|
+ log_text(LOG_FATAL, "Thread #%d creation failed errno = %d (%s)",
|
|
+ i, err, strerror(err));
|
|
return 1;
|
|
}
|
|
}
|
|
@@ -437,9 +439,11 @@ int run_test(sb_test_t *test)
|
|
log_text(LOG_INFO, "Threads started!");
|
|
for(i = 0; i < sb_globals.num_threads; i++)
|
|
{
|
|
- if(pthread_join(threads[i].thread, NULL))
|
|
+ int err;
|
|
+ if((err = pthread_join(threads[i].thread, NULL)))
|
|
{
|
|
- log_errno(LOG_FATAL, "Thread #%d join failed", i);
|
|
+ log_text(LOG_FATAL, "Thread #%d join failed errno = %d (%s)",
|
|
+ i, err, strerror(err));
|
|
return 1;
|
|
}
|
|
}
|
|
@@ -508,7 +512,7 @@ int init(void)
|
|
return 1;
|
|
}
|
|
|
|
- thread_stack_size = sb_get_value_int("thread-stack-size");
|
|
+ thread_stack_size = sb_get_value_size("thread-stack-size");
|
|
if (thread_stack_size <= 0)
|
|
{
|
|
log_text(LOG_FATAL, "Invalid value for thread-stack-size: %d.\n", thread_stack_size);
|