]>
Commit | Line | Data |
---|---|---|
1f2b7c73 | 1 | %bcond_without tests |
22448fb5 AM |
2 | Summary: a system performance benchmark |
3 | Name: sysbench | |
1f2b7c73 AM |
4 | Version: 1.0.20 |
5 | Release: 1 | |
6 | License: GPL v2+ | |
22448fb5 | 7 | Group: Applications/System |
1f2b7c73 AM |
8 | Source0: https://github.com/akopytov/sysbench/archive/%{version}/%{name}-%{version}.tar.gz |
9 | # Source0-md5: 756381c6fc4e16af1e0831b5e6a3dcb3 | |
10 | Patch0: %{name}-1.0.20-fix_deprecated_egrep_call.patch | |
11 | Patch1: %{name}-1.0.20-python3.patch | |
12 | URL: https://github.com/akopytov/sysbench/ | |
36cb2d83 | 13 | BuildRequires: autoconf |
14 | BuildRequires: automake | |
1f2b7c73 | 15 | BuildRequires: libaio-devel |
36cb2d83 | 16 | BuildRequires: libtool |
1f2b7c73 AM |
17 | BuildRequires: libxslt-progs |
18 | BuildRequires: luajit-devel | |
22448fb5 AM |
19 | BuildRequires: mysql-devel |
20 | BuildRequires: postgresql-devel | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | SysBench is a modular, cross-platform and multi-threaded benchmark | |
25 | tool for evaluating OS parameters that are important for a system | |
26 | running a database under intensive load. | |
27 | ||
28 | The idea of this benchmark suite is to quickly get an impression about | |
29 | system performance without setting up complex database benchmarks or | |
30 | even without installing a database at all. Current features allow to | |
31 | test the following system parameters: | |
32 | - file I/O performance | |
33 | - scheduler performance | |
34 | - memory allocation and transfer speed | |
35 | - POSIX threads implementation performance | |
36 | - database server performance (OLTP benchmark) | |
37 | ||
38 | Primarily written for MySQL server benchmarking, SysBench will be | |
39 | further extended to support multiple database backends, distributed | |
40 | benchmarks and third-party plug-in modules. | |
41 | ||
42 | %prep | |
43 | %setup -q | |
9b878495 | 44 | %patch0 -p1 |
1f2b7c73 AM |
45 | %patch1 -p1 |
46 | ||
47 | %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+bash(\s|$),#!/bin/bash\1,' \ | |
48 | tests/include/drv_common.sh \ | |
49 | tests/include/script_bulk_insert_common.sh \ | |
50 | tests/include/script_oltp_common.sh \ | |
51 | tests/include/script_oltp_legacy_common.sh \ | |
52 | tests/include/script_select_random_common.sh \ | |
53 | tests/include/script_select_random_legacy_common.sh \ | |
54 | tests/test_run.sh | |
55 | ||
56 | %{__sed} -E -i -e '1s,#!\s*%{_bindir}/env\s+sysbench(\s|$),#!%{_bindir}/sysbench\1,' \ | |
57 | src/lua/bulk_insert.lua \ | |
58 | src/lua/oltp_delete.lua \ | |
59 | src/lua/oltp_insert.lua \ | |
60 | src/lua/oltp_point_select.lua \ | |
61 | src/lua/oltp_read_only.lua \ | |
62 | src/lua/oltp_read_write.lua \ | |
63 | src/lua/oltp_update_index.lua \ | |
64 | src/lua/oltp_update_non_index.lua \ | |
65 | src/lua/oltp_write_only.lua \ | |
66 | src/lua/select_random_points.lua \ | |
67 | src/lua/select_random_ranges.lua | |
68 | ||
69 | rm -r third_party/luajit/luajit/ | |
70 | #rm -r third_party/concurrency_kit/ck/ | |
71 | #rm -r third_party/cram/ | |
22448fb5 AM |
72 | |
73 | %build | |
36cb2d83 | 74 | %{__libtoolize} |
75 | %{__aclocal} | |
76 | %{__autoconf} | |
77 | %{__autoheader} | |
78 | %{__automake} | |
22448fb5 AM |
79 | %configure \ |
80 | --with-mysql \ | |
1f2b7c73 AM |
81 | --with-pgsql \ |
82 | --with-system-luajit \ | |
83 | --without-gcc-arch \ | |
84 | --disable-silent-rules | |
85 | # --with-system-ck | |
22448fb5 AM |
86 | %{__make} |
87 | ||
1f2b7c73 AM |
88 | %if %{with tests} |
89 | cd tests | |
90 | ./test_run.sh | |
91 | cd .. | |
92 | %endif | |
93 | ||
22448fb5 AM |
94 | %install |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | ||
97 | %{__make} install \ | |
98 | DESTDIR=$RPM_BUILD_ROOT | |
99 | ||
1f2b7c73 AM |
100 | rm $RPM_BUILD_ROOT%{_docdir}/sysbench/manual.html |
101 | ||
22448fb5 AM |
102 | %clean |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %files | |
106 | %defattr(644,root,root,755) | |
1f2b7c73 | 107 | %doc ChangeLog README.md doc/manual.html |
36cb2d83 | 108 | %attr(755,root,root) %{_bindir}/%{name} |
1f2b7c73 | 109 | %{_datadir}/sysbench |