Initial import
This commit is contained in:
340
COPYING
Normal file
340
COPYING
Normal file
@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
209
ChangeLog
Normal file
209
ChangeLog
Normal file
@ -0,0 +1,209 @@
|
||||
2006-01-17 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Fixed several memory leaks in OLTP test
|
||||
|
||||
2005-12-14 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Renamed option 'mysql-table-type' to 'mysql-table-engine'
|
||||
* It's now possible to pass arbitrary engine names to MySQL driver
|
||||
* Transactions support must be explicitly specified with
|
||||
'mysql-engine-trx' option for those engines, which are unknown to SysBench
|
||||
|
||||
2005-09-27 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Changed 'thread fairness' calculation from percents to stddev
|
||||
* Added validation mode to OLTP test (--validate switch)
|
||||
* Remove auto_increment from the 'id' field before running OLTP tests
|
||||
* Print separate time for query execution and result fetching in --debug mode
|
||||
* version 0.4.3
|
||||
|
||||
2005-07-25 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Minor cleanups in help messages
|
||||
* Several FreeBSD-related fixes
|
||||
* Fixed the Oracle driver
|
||||
* Version 0.4.1
|
||||
|
||||
2005-03-04 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Fixed a lot of small bugs, including portability issues on Mac OS X,
|
||||
64-bit platforms and old MySQL versions
|
||||
* Documentation added to the main tree
|
||||
* New validation mode in fileio test
|
||||
|
||||
2005-01-27 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Fixed compilation on Solaris
|
||||
* Added call to thr_setconcurrency() on Solaris
|
||||
* Fixed an overflow bug in sb_timer_current()
|
||||
* Changed the default number of threads to 1
|
||||
* Added non-transactional mode to the OLTP test
|
||||
* Fixed bug with excessive number of connections in OLTP test
|
||||
* Handle ER_LOCK_WAIT_TIMEOUT in the same way as ER_LOCK_DEADLOCK
|
||||
* Version 0.3.2
|
||||
|
||||
2004-07-27 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Fixed MySQL driver to use new PS API in MySQL >= 4.1.2
|
||||
|
||||
2004-07-12 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Fixed final fsync in random I/O requests
|
||||
* Fixed several race conditions
|
||||
|
||||
2004-07-09 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Removed --oltp-time-limit option (obsoleted by --max-time)
|
||||
|
||||
2004-07-06 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Changed statistics output to more human-readable format
|
||||
|
||||
2004-07-04 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added new logger interface to internal API
|
||||
* Modified all tests to use the new logger interface
|
||||
|
||||
2004-06-17 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Fixed table type autodetection with MySQL >= 4.1
|
||||
|
||||
2004-06-06 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added preliminary support of prepared statements to DB API
|
||||
|
||||
2004-05-31 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added slow-mmap mode for 32-bit boxes in fileio test
|
||||
|
||||
2004-05-30 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Fixed compilation with gcc >= 3.3
|
||||
* Fixed 'prepare' command for sequential write test
|
||||
|
||||
2004-05-26 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Changed formatting of file sizes in output
|
||||
* Fixed type cast warning on SuSE 8.1
|
||||
|
||||
2004-05-21 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added mutex performance benchmark
|
||||
|
||||
2004-05-12 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Extended memory benchmark to calculate more useful results
|
||||
|
||||
2004-05-10 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Split test file creation, test running and cleaning up into separate
|
||||
commands (prepare, run, cleanup) for fileio test
|
||||
|
||||
2004-05-05 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Removed limit on maximum block size for fileio test
|
||||
|
||||
2004-05-04 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* added --max-time option to limit total test execution time
|
||||
|
||||
2004-05-03 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Fixed compilation with --without-mysql option.
|
||||
|
||||
2004-04-13 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added mmaped I/O support to fileio test
|
||||
|
||||
2004-04-11 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Changed default table size to a lower value in OLTP test
|
||||
|
||||
2004-04-07 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added automatic table type detection to MySQL driver
|
||||
* Changed the default table type for MySQL driver to InnoDB
|
||||
* Added support for BDB and NDB table types
|
||||
|
||||
2004-04-06 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added autoconf macro to handle older (incompatible) version of
|
||||
libaio.h
|
||||
|
||||
2004-04-05 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Fixed compilation on 64-bit systems
|
||||
* Replaced Linux AIO calls with more portable equivalents
|
||||
|
||||
2004-04-04 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added parameter to specify maximum number of queued operations
|
||||
in fileio async mode (file-async-backlog)
|
||||
* Added parameter to specify extra open() flags (file-extra-flags)
|
||||
* Fixed memory allocation bug in command line parser
|
||||
|
||||
2004-04-02 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added Linux asynchronous I/O support to fileio test
|
||||
* Fixed bug with statistic counters
|
||||
|
||||
2004-04-01 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added test file creation to fileio test
|
||||
* Added read-only mode to OLTP test
|
||||
|
||||
2004-03-31 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Close database connections in OLTP test
|
||||
* Added file-fsync-all mode for fileio test
|
||||
|
||||
2004-03-30 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Added myisam-max-rows option for MySQL driver
|
||||
* Fixed configure.ac for cases when no MySQL libraries found
|
||||
|
||||
2004-03-10 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Implement proper handling of table locks in OLTP test
|
||||
|
||||
2004-03-09 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Recognize MySQL table type when creating test database
|
||||
* Fix driver-specific options
|
||||
* Now it's possible to pass MySQL root directory in --with-mysql option
|
||||
* Trim trailing '.libs' if user passed it in --with-mysql-libs option
|
||||
to configure
|
||||
|
||||
2004-03-08 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Build drivers and tests as separate libraries (first step to
|
||||
dynamically loaded modules)
|
||||
* Display help when required arguments are missing in fileio test
|
||||
* Changed code formatting to match MySQL coding guidelines
|
||||
|
||||
2004-03-04 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Generalized DB-dependent code
|
||||
* Added 'database capabilities' feature
|
||||
|
||||
2004-02-28 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Fixed possible memory leak in sql request generator
|
||||
|
||||
2004-03-27 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Split OLTP code into DB-independent part and MySQL driver
|
||||
|
||||
2004-02-23 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Use libtool for linking with external libraries
|
||||
* Statically link external libraries when they are not installed
|
||||
|
||||
2004-02-19 Alexey Kopytov <alexeyk@mysql.com>
|
||||
|
||||
* Print more info when configure finds no MySQL development files
|
||||
* Added --with-mysql-includes and --with-mysql-libs to configure
|
||||
* Fixed compilation error when compiling without MySQL support
|
||||
* Combine several inserts into one query to speed up database creation
|
||||
|
||||
|
||||
229
INSTALL
Normal file
229
INSTALL
Normal file
@ -0,0 +1,229 @@
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
19
Makefile.am
Normal file
19
Makefile.am
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SUBDIRS = doc scripts sysbench
|
||||
|
||||
EXTRA_DIST = autogen.sh README ChangeLog
|
||||
634
Makefile.in
Normal file
634
Makefile.in
Normal file
@ -0,0 +1,634 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(top_srcdir)/config/config.h.in \
|
||||
$(top_srcdir)/configure $(top_srcdir)/doc/xsl/catalog.xml.in \
|
||||
COPYING ChangeLog INSTALL TODO config/compile \
|
||||
config/config.guess config/config.sub config/depcomp \
|
||||
config/install-sh config/ltmain.sh config/missing \
|
||||
config/mkinstalldirs install-sh missing mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES = doc/xsl/catalog.xml
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
SUBDIRS = doc scripts sysbench
|
||||
EXTRA_DIST = autogen.sh README ChangeLog
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config/config.h: config/stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f config/stamp-h1; \
|
||||
$(MAKE) config/stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
config/stamp-h1: $(top_srcdir)/config/config.h.in $(top_builddir)/config.status
|
||||
@rm -f config/stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config/config.h
|
||||
$(top_srcdir)/config/config.h.in: $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f config/stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config/config.h config/stamp-h1
|
||||
doc/xsl/catalog.xml: $(top_builddir)/config.status $(top_srcdir)/doc/xsl/catalog.xml.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/config $(distdir)/doc/xsl
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| mkdir "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="../$(top_distdir)" \
|
||||
distdir="../$(distdir)/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
$(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-libtool clean-recursive \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-recursive distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
66
README
Normal file
66
README
Normal file
@ -0,0 +1,66 @@
|
||||
SysBench: System evaluation benchmark
|
||||
|
||||
|
||||
Why ?
|
||||
The idea is to quickly get an impression about system performance for MySQL
|
||||
usage without setting up complex benchmark and even without installing MySQL.
|
||||
In some cases this is very helpful. This is also the reason for having
|
||||
everything in simple file not depending on any external libraries.
|
||||
|
||||
Description:
|
||||
This benchmark was designed for identifying basic system parameters, as they
|
||||
are important for system using MySQL (w Innodb) under intensive load.
|
||||
Handling of IO in case of many parallel requests, checked as well as
|
||||
memory allocation/transfer speed and scheduler performance.
|
||||
CPU is benchmarked by using 64bit integer manipulation using Euklid
|
||||
algorithms for prime number computation.
|
||||
Benchmarks are designed to show benefit of multiple CPUs as well as of
|
||||
multiple hard drives, battery backed up write cache.
|
||||
|
||||
Sequential read/writes test is a bit tricky, it means request are just given
|
||||
out sequentially, but there is no guaranty they will be actually executed this
|
||||
way, it could result in some sort of random IO in case of bad IO or threads
|
||||
scheduler
|
||||
|
||||
Installing:
|
||||
See the file INSTALL for generic installation instructions.
|
||||
In most cases you will need the following steps:
|
||||
./configure (or ./configure --without-mysql to compile w/o MySQL support)
|
||||
make
|
||||
make install
|
||||
|
||||
Running:
|
||||
The general syntax is
|
||||
sysbench [<general-options>] [<test-options>] <command>
|
||||
To see available options, tests and commands type:
|
||||
sysbench help
|
||||
or
|
||||
sysbench --test=<name> help
|
||||
to see options supported by a specified test. Default values for the options
|
||||
are specified in brackets after description.
|
||||
Currently supported commands are help, run and create-db (for the MySQL test).
|
||||
The latter will create a table and fill it with values required to run the
|
||||
MySQL test, using database, table name and size passed as MySQL test options.
|
||||
|
||||
Notes:
|
||||
* Make sure number of threads is at least 2 times of numbers CPUs you have.
|
||||
* For the fileio test make sure you're using file size which is at least 5
|
||||
times larger than your memory for reliable results. Make sure to use enough
|
||||
files to keep size of each less than 2/4G.
|
||||
* For the threads test --thread-locks should be at least 2 times less than
|
||||
number of threads.
|
||||
* If you're running on 64bit CPU make sure to compile 64bit binary for good
|
||||
results.
|
||||
|
||||
|
||||
Basic design:
|
||||
This test is designed to be easily extensible to add your own test operations,
|
||||
as well as create operation mixes to benchmark some particular load.
|
||||
The architecture is very simple. Several threads are started and they all
|
||||
run in the loop asking for requests from get_request() function, until
|
||||
NULL operation is received. For each request execute_request() is executed,
|
||||
which runs it as designed. This allows to design test highly scalable as well
|
||||
as producing large amount of conflicts if needed for test case.
|
||||
|
||||
Bug reporting:
|
||||
Please report any bugs you encounter to <alexeyk@mysql.com>.
|
||||
456
acinclude.m4
Normal file
456
acinclude.m4
Normal file
@ -0,0 +1,456 @@
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: AC_CHECK_MYSQLR
|
||||
dnl First check for custom MySQL paths in --with-mysql-* options.
|
||||
dnl If some paths are missing, check if mysql_config exists.
|
||||
dnl Then check for the libraries and replace -lmysqlclient with
|
||||
dnl -lmysqlclient_r, to enable threaded client library.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([AC_CHECK_MYSQLR],[
|
||||
# Check for custom MySQL root directory
|
||||
if test [ x$1 != xyes -a x$1 != xno ]
|
||||
then
|
||||
ac_cv_mysql_root=`echo $1 | sed -e 's+/$++'`
|
||||
if test [ -d "$ac_cv_mysql_root/include" -a \
|
||||
-d "$ac_cv_mysql_root/libmysql_r" ]
|
||||
then
|
||||
ac_cv_mysql_includes="$ac_cv_mysql_root/include"
|
||||
ac_cv_mysql_libs="$ac_cv_mysql_root/libmysql_r"
|
||||
elif test [ -x "$ac_cv_mysql_root/bin/mysql_config" ]
|
||||
then
|
||||
mysqlconfig="$ac_cv_mysql_root/bin/mysql_config"
|
||||
else
|
||||
AC_MSG_ERROR([invalid MySQL root directory: $ac_cv_mysql_root])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for custom includes path
|
||||
if test [ -z "$ac_cv_mysql_includes" ]
|
||||
then
|
||||
AC_ARG_WITH([mysql-includes],
|
||||
AC_HELP_STRING([--with-mysql-includes], [path to MySQL header files]),
|
||||
[ac_cv_mysql_includes=$withval])
|
||||
fi
|
||||
if test [ -n "$ac_cv_mysql_includes" ]
|
||||
then
|
||||
AC_CACHE_CHECK([MySQL includes], [ac_cv_mysql_includes], [ac_cv_mysql_includes=""])
|
||||
MYSQL_CFLAGS="-I$ac_cv_mysql_includes"
|
||||
fi
|
||||
|
||||
# Check for custom library path
|
||||
|
||||
if test [ -z "$ac_cv_mysql_libs" ]
|
||||
then
|
||||
AC_ARG_WITH([mysql-libs],
|
||||
AC_HELP_STRING([--with-mysql-libs], [path to MySQL libraries]),
|
||||
[ac_cv_mysql_libs=$withval])
|
||||
fi
|
||||
if test [ -n "$ac_cv_mysql_libs" ]
|
||||
then
|
||||
# Trim trailing '.libs' if user passed it in --with-mysql-libs option
|
||||
ac_cv_mysql_libs=`echo ${ac_cv_mysql_libs} | sed -e 's/.libs$//' \
|
||||
-e 's+.libs/$++'`
|
||||
AC_CACHE_CHECK([MySQL libraries], [ac_cv_mysql_libs], [ac_cv_mysql_libs=""])
|
||||
MYSQL_LIBS="-L$ac_cv_mysql_libs -lmysqlclient_r"
|
||||
fi
|
||||
|
||||
# If some path is missing, try to autodetermine with mysql_config
|
||||
if test [ -z "$ac_cv_mysql_includes" -o -z "$ac_cv_mysql_libs" ]
|
||||
then
|
||||
if test [ -z "$mysqlconfig" ]
|
||||
then
|
||||
AC_PATH_PROG(mysqlconfig,mysql_config)
|
||||
fi
|
||||
if test [ -z "$mysqlconfig" ]
|
||||
then
|
||||
AC_MSG_ERROR([mysql_config executable not found
|
||||
********************************************************************************
|
||||
ERROR: cannot find MySQL libraries. If you want to compile with MySQL support,
|
||||
you must either specify file locations explicitly using
|
||||
--with-mysql-includes and --with-mysql-libs options, or make sure path to
|
||||
mysql_config is listed in your PATH environment variable. If you want to
|
||||
disable MySQL support, use --without-mysql option.
|
||||
********************************************************************************
|
||||
])
|
||||
else
|
||||
if test [ -z "$ac_cv_mysql_includes" ]
|
||||
then
|
||||
AC_MSG_CHECKING(MySQL C flags)
|
||||
MYSQL_CFLAGS=`${mysqlconfig} --cflags`
|
||||
AC_MSG_RESULT($MYSQL_CFLAGS)
|
||||
fi
|
||||
if test [ -z "$ac_cv_mysql_libs" ]
|
||||
then
|
||||
AC_MSG_CHECKING(MySQL linker flags)
|
||||
MYSQL_LIBS=`${mysqlconfig} --libs | sed -e \
|
||||
's/-lmysqlclient /-lmysqlclient_r /' -e 's/-lmysqlclient$/-lmysqlclient_r/'`
|
||||
AC_MSG_RESULT($MYSQL_LIBS)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: AC_CHECK_PGSQL
|
||||
dnl First check for custom PostgreSQL paths in --with-pgsql-* options.
|
||||
dnl If some paths are missing, check if pg_config exists.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([AC_CHECK_PGSQL],[
|
||||
|
||||
# Check for custom includes path
|
||||
if test [ -z "$ac_cv_pgsql_includes" ]
|
||||
then
|
||||
AC_ARG_WITH([pgsql-includes],
|
||||
AC_HELP_STRING([--with-pgsql-includes], [path to PostgreSQL header files]),
|
||||
[ac_cv_pgsql_includes=$withval])
|
||||
fi
|
||||
if test [ -n "$ac_cv_pgsql_includes" ]
|
||||
then
|
||||
AC_CACHE_CHECK([PostgreSQL includes], [ac_cv_pgsql_includes], [ac_cv_pgsql_includes=""])
|
||||
MYSQL_CFLAGS="-I$ac_cv_mysql_includes"
|
||||
fi
|
||||
|
||||
# Check for custom library path
|
||||
|
||||
if test [ -z "$ac_cv_pgsql_libs" ]
|
||||
then
|
||||
AC_ARG_WITH([pgsql-libs],
|
||||
AC_HELP_STRING([--with-pgsql-libs], [path to PostgreSQL libraries]),
|
||||
[ac_cv_pgsql_libs=$withval])
|
||||
fi
|
||||
|
||||
# If some path is missing, try to autodetermine with pgsql_config
|
||||
if test [ -z "$ac_cv_pgsql_includes" -o -z "$ac_cv_pgsql_libs" ]
|
||||
then
|
||||
if test [ -z "$pgconfig" ]
|
||||
then
|
||||
AC_PATH_PROG(pgconfig,pg_config)
|
||||
fi
|
||||
if test [ -z "$pgconfig" ]
|
||||
then
|
||||
AC_MSG_ERROR([pg_config executable not found
|
||||
********************************************************************************
|
||||
ERROR: cannot find PostgreSQL libraries. If you want to compile with PosgregSQL support,
|
||||
you must either specify file locations explicitly using
|
||||
--with-pgsql-includes and --with-pgsql-libs options, or make sure path to
|
||||
pg_config is listed in your PATH environment variable. If you want to
|
||||
disable PostgreSQL support, use --without-pgsql option.
|
||||
********************************************************************************
|
||||
])
|
||||
else
|
||||
if test [ -z "$ac_cv_pgsql_includes" ]
|
||||
then
|
||||
AC_MSG_CHECKING(PostgreSQL C flags)
|
||||
PGSQL_CFLAGS="-I`${pgconfig} --includedir`"
|
||||
AC_MSG_RESULT($PGSQL_CFLAGS)
|
||||
fi
|
||||
if test [ -z "$ac_cv_pgsql_libs" ]
|
||||
then
|
||||
AC_MSG_CHECKING(PostgreSQL linker flags)
|
||||
PGSQL_LIBS="-L`${pgconfig} --libdir` -lpq"
|
||||
AC_MSG_RESULT($PGSQL_LIBS)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: AC_CHECK_AIO
|
||||
dnl Check for Linux AIO availability on the target system
|
||||
dnl Also, check the version of libaio library (at the moment, there are two
|
||||
dnl versions with incompatible interfaces).
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([AC_CHECK_AIO],[
|
||||
if test x$enable_aio = xyes; then
|
||||
AC_CHECK_HEADER([libaio.h],
|
||||
[AC_DEFINE(HAVE_LIBAIO_H,1,[Define to 1 if your system has <libaio.h> header file])],
|
||||
[enable_aio=no])
|
||||
fi
|
||||
if test x$enable_aio = xyes; then
|
||||
AC_CHECK_LIB([aio], [io_queue_init], , [enable_aio=no])
|
||||
fi
|
||||
if test x$enable_aio = xyes; then
|
||||
AC_MSG_CHECKING(if io_getevents() has an old interface)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[
|
||||
#ifdef HAVE_LIBAIO_H
|
||||
# include <libaio.h>
|
||||
#endif
|
||||
struct io_event event;
|
||||
io_context_t ctxt;
|
||||
]],
|
||||
[[
|
||||
(void)io_getevents(ctxt, 1, &event, NULL);
|
||||
]] )
|
||||
], [
|
||||
AC_DEFINE([HAVE_OLD_GETEVENTS], 1, [Define to 1 if libaio has older getevents() interface])
|
||||
AC_MSG_RESULT(yes)
|
||||
],
|
||||
[AC_MSG_RESULT(no)]
|
||||
)
|
||||
fi
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: AX_CHECK_DOCBOOK
|
||||
dnl Check for availability of various DocBook utilities and perform necessary
|
||||
dnl substitutions
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([AX_CHECK_DOCBOOK], [
|
||||
# It's just rude to go over the net to build
|
||||
XSLTPROC_FLAGS=--nonet
|
||||
DOCBOOK_ROOT=
|
||||
if test ! -f /etc/xml/catalog; then
|
||||
for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/;
|
||||
do
|
||||
if test -d "$i"; then
|
||||
DOCBOOK_ROOT=$i
|
||||
fi
|
||||
done
|
||||
|
||||
# Last resort - try net
|
||||
if test -z "$DOCBOOK_ROOT"; then
|
||||
XSLTPROC_FLAGS=
|
||||
fi
|
||||
else
|
||||
XML_CATALOG=/etc/xml/catalog
|
||||
CAT_ENTRY_START='<!--'
|
||||
CAT_ENTRY_END='-->'
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,)
|
||||
XSLTPROC_WORKS=no
|
||||
if test -n "$XSLTPROC"; then
|
||||
AC_MSG_CHECKING([whether xsltproc works])
|
||||
|
||||
if test -n "$XML_CATALOG"; then
|
||||
DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
|
||||
else
|
||||
DB_FILE="$DOCBOOK_ROOT/docbook.xsl"
|
||||
fi
|
||||
|
||||
$XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END
|
||||
<?xml version="1.0" encoding='ISO-8859-1'?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
|
||||
<book id="test">
|
||||
</book>
|
||||
END
|
||||
if test "$?" = 0; then
|
||||
XSLTPROC_WORKS=yes
|
||||
fi
|
||||
AC_MSG_RESULT($XSLTPROC_WORKS)
|
||||
fi
|
||||
AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes")
|
||||
|
||||
AC_SUBST(XML_CATALOG)
|
||||
AC_SUBST(XSLTPROC_FLAGS)
|
||||
AC_SUBST(DOCBOOK_ROOT)
|
||||
AC_SUBST(CAT_ENTRY_START)
|
||||
AC_SUBST(CAT_ENTRY_END)
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: ACX_PTHREAD
|
||||
dnl This macro figures out how to build C programs using POSIX threads. It sets
|
||||
dnl the PTHREAD_LIBS output variable to the threads library and linker flags,
|
||||
dnl and the PTHREAD_CFLAGS output variable to any special C compiler flags that
|
||||
dnl are needed. (The user can also force certain compiler flags/libs to be
|
||||
dnl tested by setting these environment variables.)
|
||||
dnl
|
||||
dnl Also sets PTHREAD_CC to any special C compiler that is needed for
|
||||
dnl multi-threaded programs (defaults to the value of CC otherwise).
|
||||
dnl (This is necessary on AIX to use the special cc_r compiler alias.)
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([ACX_PTHREAD], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
acx_pthread_ok=no
|
||||
|
||||
# We used to check for pthread.h first, but this fails if pthread.h
|
||||
# requires special compiler flags (e.g. on True64 or Sequent).
|
||||
# It gets checked for in the link test anyway.
|
||||
|
||||
# First of all, check if the user has set any of the PTHREAD_LIBS,
|
||||
# etcetera environment variables, and if threads linking works using
|
||||
# them:
|
||||
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
|
||||
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
|
||||
AC_MSG_RESULT($acx_pthread_ok)
|
||||
if test x"$acx_pthread_ok" = xno; then
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
fi
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
fi
|
||||
|
||||
# We must check for the threads library under a number of different
|
||||
# names; the ordering is very important because some systems
|
||||
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
|
||||
# libraries is broken (non-POSIX).
|
||||
|
||||
# Create a list of thread flags to try. Items starting with a "-" are
|
||||
# C compiler flags, and other items are library names, except for "none"
|
||||
# which indicates that we try without any flags at all, and "pthread-config"
|
||||
# which is a program returning the flags for the Pth emulation library.
|
||||
|
||||
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
||||
|
||||
# The ordering *is* (sometimes) important. Some notes on the
|
||||
# individual items follow:
|
||||
|
||||
# pthreads: AIX (must check this before -lpthread)
|
||||
# none: in case threads are in libc; should be tried before -Kthread and
|
||||
# other compiler flags to prevent continual compiler warnings
|
||||
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
|
||||
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
||||
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
||||
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
|
||||
# -pthreads: Solaris/gcc
|
||||
# -mthreads: Mingw32/gcc, Lynx/gcc
|
||||
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
||||
# doesn't hurt to check since this sometimes defines pthreads too;
|
||||
# also defines -D_REENTRANT)
|
||||
# pthread: Linux, etcetera
|
||||
# --thread-safe: KAI C++
|
||||
# pthread-config: use pthread-config program (for GNU Pth library)
|
||||
|
||||
case "${host_cpu}-${host_os}" in
|
||||
*solaris*)
|
||||
|
||||
# On Solaris (at least, for some versions), libc contains stubbed
|
||||
# (non-functional) versions of the pthreads routines, so link-based
|
||||
# tests will erroneously succeed. (We need to link with -pthread or
|
||||
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
|
||||
# a function called by this macro, so we could check for that, but
|
||||
# who knows whether they'll stub that too in a future libc.) So,
|
||||
# we'll just look for -pthreads and -lpthread first:
|
||||
|
||||
acx_pthread_flags="pthread -pthread -pthreads -mt $acx_pthread_flags"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test x"$acx_pthread_ok" = xno; then
|
||||
for flag in $acx_pthread_flags; do
|
||||
|
||||
case $flag in
|
||||
none)
|
||||
AC_MSG_CHECKING([whether pthreads work without any flags])
|
||||
;;
|
||||
|
||||
-*)
|
||||
AC_MSG_CHECKING([whether pthreads work with $flag])
|
||||
PTHREAD_CFLAGS="$flag"
|
||||
;;
|
||||
|
||||
pthread-config)
|
||||
AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
|
||||
if test x"$acx_pthread_config" = xno; then continue; fi
|
||||
PTHREAD_CFLAGS="`pthread-config --cflags`"
|
||||
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_CHECKING([for the pthreads library -l$flag])
|
||||
PTHREAD_LIBS="-l$flag"
|
||||
;;
|
||||
esac
|
||||
|
||||
save_LIBS="$LIBS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
|
||||
# Check for various functions. We must include pthread.h,
|
||||
# since some functions may be macros. (On the Sequent, we
|
||||
# need a special flag -Kthread to make this header compile.)
|
||||
# We check for pthread_join because it is in -lpthread on IRIX
|
||||
# while pthread_create is in libc. We check for pthread_attr_init
|
||||
# due to DEC craziness with -lpthreads. We check for
|
||||
# pthread_cleanup_push because it is one of the few pthread
|
||||
# functions on Solaris that doesn't have a non-functional libc stub.
|
||||
# We try pthread_create on general principles.
|
||||
AC_TRY_LINK([#include <pthread.h>],
|
||||
[pthread_t th; pthread_join(th, 0);
|
||||
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
||||
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
||||
[acx_pthread_ok=yes])
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
AC_MSG_RESULT($acx_pthread_ok)
|
||||
if test "x$acx_pthread_ok" = xyes; then
|
||||
break;
|
||||
fi
|
||||
|
||||
PTHREAD_LIBS=""
|
||||
PTHREAD_CFLAGS=""
|
||||
done
|
||||
fi
|
||||
|
||||
# Various other checks:
|
||||
if test "x$acx_pthread_ok" = xyes; then
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$PTHREAD_LIBS $LIBS"
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
||||
|
||||
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
|
||||
AC_MSG_CHECKING([for joinable pthread attribute])
|
||||
attr_name=unknown
|
||||
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
||||
AC_TRY_LINK([#include <pthread.h>], [int attr=$attr;],
|
||||
[attr_name=$attr; break])
|
||||
done
|
||||
AC_MSG_RESULT($attr_name)
|
||||
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
|
||||
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
|
||||
[Define to necessary symbol if this constant
|
||||
uses a non-standard name on your system.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if more special flags are required for pthreads])
|
||||
flag=no
|
||||
case "${host_cpu}-${host_os}" in
|
||||
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
|
||||
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
|
||||
esac
|
||||
AC_MSG_RESULT(${flag})
|
||||
if test "x$flag" != xno; then
|
||||
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
|
||||
fi
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
# More AIX lossage: must compile with cc_r
|
||||
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
|
||||
else
|
||||
PTHREAD_CC="$CC"
|
||||
fi
|
||||
|
||||
AC_SUBST(PTHREAD_LIBS)
|
||||
AC_SUBST(PTHREAD_CFLAGS)
|
||||
AC_SUBST(PTHREAD_CC)
|
||||
|
||||
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
||||
if test x"$acx_pthread_ok" = xyes; then
|
||||
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
|
||||
:
|
||||
else
|
||||
acx_pthread_ok=no
|
||||
$2
|
||||
fi
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
6867
aclocal.m4
vendored
Normal file
6867
aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
autogen.sh
Executable file
4
autogen.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
aclocal && automake -c --foreign --add-missing && autoheader && autoconf
|
||||
|
||||
99
config/compile
Executable file
99
config/compile
Executable file
@ -0,0 +1,99 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Wrapper for compilers which do not understand `-c -o'.
|
||||
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Usage:
|
||||
# compile PROGRAM [ARGS]...
|
||||
# `-o FOO.o' is removed from the args passed to the actual compile.
|
||||
|
||||
prog=$1
|
||||
shift
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
args=
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-o)
|
||||
# configure might choose to run compile as `compile cc -o foo foo.c'.
|
||||
# So we do something ugly here.
|
||||
ofile=$2
|
||||
shift
|
||||
case "$ofile" in
|
||||
*.o | *.obj)
|
||||
;;
|
||||
*)
|
||||
args="$args -o $ofile"
|
||||
ofile=
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
args="$args $1"
|
||||
;;
|
||||
*)
|
||||
args="$args $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no `-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# `.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$prog" $args
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use `[/.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir $lockdir > /dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir $lockdir; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$prog" $args
|
||||
status=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
mv "$cofile" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir $lockdir
|
||||
exit $status
|
||||
1388
config/config.guess
vendored
Executable file
1388
config/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
216
config/config.h.in
Normal file
216
config/config.h.in
Normal file
@ -0,0 +1,216 @@
|
||||
/* config/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if you have clock_gettime() declared in <time.h> */
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
|
||||
/* Define to 1 if you have the declaration of `O_SYNC', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_O_SYNC
|
||||
|
||||
/* Define to 1 if you have the declaration of `SHM_HUGETLB', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_SHM_HUGETLB
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRERROR_R
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `fdatasync' function. */
|
||||
#undef HAVE_FDATASYNC
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have large pages support */
|
||||
#undef HAVE_LARGE_PAGES
|
||||
|
||||
/* Define to 1 if you have the `aio' library (-laio). */
|
||||
#undef HAVE_LIBAIO
|
||||
|
||||
/* Define to 1 if your system has <libaio.h> header file */
|
||||
#undef HAVE_LIBAIO_H
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#undef HAVE_LIBM
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the <math.h> header file. */
|
||||
#undef HAVE_MATH_H
|
||||
|
||||
/* Define to 1 if you have the `memalign' function. */
|
||||
#undef HAVE_MEMALIGN
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define to 1 if libaio has older getevents() interface */
|
||||
#undef HAVE_OLD_GETEVENTS
|
||||
|
||||
/* Define to 1 if you have the `posix_memalign' function. */
|
||||
#undef HAVE_POSIX_MEMALIGN
|
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */
|
||||
#undef HAVE_PTHREAD
|
||||
|
||||
/* Define to 1 if you have the <pthread.h> header file. */
|
||||
#undef HAVE_PTHREAD_H
|
||||
|
||||
/* Define to 1 if you have the `pthread_yield' function. */
|
||||
#undef HAVE_PTHREAD_YIELD
|
||||
|
||||
/* Define to 1 if you have the <sched.h> header file. */
|
||||
#undef HAVE_SCHED_H
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#undef HAVE_SIGNAL_H
|
||||
|
||||
/* Define to 1 if you have the `sqrt' function. */
|
||||
#undef HAVE_SQRT
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define to 1 if you have the `strerror_r' function. */
|
||||
#undef HAVE_STRERROR_R
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/aio.h> header file. */
|
||||
#undef HAVE_SYS_AIO_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ipc.h> header file. */
|
||||
#undef HAVE_SYS_IPC_H
|
||||
|
||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||
#undef HAVE_SYS_MMAN_H
|
||||
|
||||
/* Define to 1 if you have the <sys/shm.h> header file. */
|
||||
#undef HAVE_SYS_SHM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <thread.h> header file. */
|
||||
#undef HAVE_THREAD_H
|
||||
|
||||
/* Define to 1 if you have the `thr_setconcurrency' function. */
|
||||
#undef HAVE_THR_SETCONCURRENCY
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `valloc' function. */
|
||||
#undef HAVE_VALLOC
|
||||
|
||||
/* Define if /proc/meminfo shows the huge page size (Linux only) */
|
||||
#undef HUGETLB_USE_PROC_MEMINFO
|
||||
|
||||
/* Define to the appropriate value for O_SYNC on your platform */
|
||||
#undef O_SYNC
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
#undef PTHREAD_CREATE_JOINABLE
|
||||
|
||||
/* The size of a `size_t', as computed by sizeof. */
|
||||
#undef SIZEOF_SIZE_T
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if strerror_r returns char *. */
|
||||
#undef STRERROR_R_CHAR_P
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define to 1 if you want to compile with MySQL support */
|
||||
#undef USE_MYSQL
|
||||
|
||||
/* Define to 1 if you want to compile with Oracle support */
|
||||
#undef USE_ORACLE
|
||||
|
||||
/* Define to 1 if you want to compile with PostgreSQL support */
|
||||
#undef USE_PGSQL
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to `long' if <sys/types.h> does not define. */
|
||||
#undef off_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
1489
config/config.sub
vendored
Executable file
1489
config/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
479
config/depcomp
Executable file
479
config/depcomp
Executable file
@ -0,0 +1,479 @@
|
||||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
294
config/install-sh
Executable file
294
config/install-sh
Executable file
@ -0,0 +1,294 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
#
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd=$cpprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "$0: no input file specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d "$dst" ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f "$src" ] || [ -d "$src" ]
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "$0: $src does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "$0: no destination specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d "$dst" ]
|
||||
then
|
||||
dst=$dst/`basename "$src"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
|
||||
if [ ! -d "$pathcomp" ] ;
|
||||
then
|
||||
$mkdirprog "$pathcomp"
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd "$dst" &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
dstfile=`basename "$dst" $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up temp files at exit.
|
||||
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
|
||||
|
||||
# Now remove or move aside any old file at destination location. We try this
|
||||
# two ways since rm can't unlink itself on some systems and the destination
|
||||
# file might be busy for other reasons. In this case, the final cleanup
|
||||
# might fail but the new file should still install successfully.
|
||||
|
||||
{
|
||||
if [ -f "$dstdir/$dstfile" ]
|
||||
then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
|
||||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
|
||||
{
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
|
||||
fi &&
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
||||
6293
config/ltmain.sh
Executable file
6293
config/ltmain.sh
Executable file
File diff suppressed because it is too large
Load Diff
336
config/missing
Executable file
336
config/missing
Executable file
@ -0,0 +1,336 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
111
config/mkinstalldirs
Executable file
111
config/mkinstalldirs
Executable file
@ -0,0 +1,111 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage" 1>&2
|
||||
exit 0
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
195
configure.ac
Normal file
195
configure.ac
Normal file
@ -0,0 +1,195 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.57)
|
||||
AC_INIT(sysbench, 0.4.4, alexeyk@mysql.com)
|
||||
AC_CONFIG_AUX_DIR([config])
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE()
|
||||
AC_CONFIG_SRCDIR([sysbench/sysbench.c])
|
||||
AM_CONFIG_HEADER([config/config.h])
|
||||
|
||||
# Checks for user arguments
|
||||
|
||||
# Check if we should compile with MySQL support
|
||||
AC_ARG_WITH([mysql],
|
||||
AC_HELP_STRING([--with-mysql], [compile with MySQL support (default is enabled)]),
|
||||
[ac_cv_use_mysql=$withval], [ac_cv_use_mysql=yes]
|
||||
)
|
||||
AC_CACHE_CHECK([whether to compile with MySQL support], [ac_cv_use_mysql], [ac_cv_use_mysql=no])
|
||||
|
||||
# Check if we should compile with Oracle support
|
||||
AC_ARG_WITH([oracle],
|
||||
AC_HELP_STRING([--with-oracle], [compile with Oracle support (default is disabled)]),
|
||||
[ac_cv_use_oracle=$withval], [ac_cv_use_oracle=no]
|
||||
)
|
||||
AC_CACHE_CHECK([whether to compile with Oracle support], [ac_cv_use_oracle], [ac_cv_use_oracle=yes])
|
||||
|
||||
# Check if we should compile with PostgreSQL support
|
||||
AC_ARG_WITH([pgsql],
|
||||
AC_HELP_STRING([--with-pgsql], [compile with PostgreSQL support (default is disabled)]),
|
||||
[ac_cv_use_pgsql=$withval], [ac_cv_use_pgsql=no]
|
||||
)
|
||||
AC_CACHE_CHECK([whether to compile with PostgreSQL support], [ac_cv_use_pgsql], [ac_cv_use_pgsql=yes])
|
||||
|
||||
# Check if we should enable large files support
|
||||
AC_ARG_ENABLE(largefile,
|
||||
AC_HELP_STRING([--enable-largefile],[enable large files support (default is enabled)]), ,
|
||||
enable_largefile=yes
|
||||
)
|
||||
|
||||
# For SHM_HUGETLB on Linux
|
||||
AC_CHECK_DECLS(SHM_HUGETLB,
|
||||
AC_DEFINE([HAVE_LARGE_PAGES], [1],
|
||||
[Define if you have large pages support])
|
||||
AC_DEFINE([HUGETLB_USE_PROC_MEMINFO], [1],
|
||||
[Define if /proc/meminfo shows the huge page size (Linux only)])
|
||||
, ,
|
||||
[
|
||||
#include <sys/shm.h>
|
||||
]
|
||||
)
|
||||
|
||||
# Check if we should enable Linux AIO support
|
||||
AC_ARG_ENABLE(aio,
|
||||
AC_HELP_STRING([--enable-aio],[enable Linux asynchronous I/O support (default is enabled)]), ,
|
||||
enable_aio=yes
|
||||
)
|
||||
|
||||
AC_CHECK_DECLS(O_SYNC, ,
|
||||
AC_DEFINE([O_SYNC], [O_FSYNC],
|
||||
[Define to the appropriate value for O_SYNC on your platform]),
|
||||
[
|
||||
#include <fcntl.h>
|
||||
]
|
||||
)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AX_CHECK_DOCBOOK
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
ACX_PTHREAD
|
||||
|
||||
AC_CHECK_LIB([m], [sqrt])
|
||||
|
||||
if test x$ac_cv_use_mysql != xno; then
|
||||
AC_CHECK_MYSQLR([$ac_cv_use_mysql])
|
||||
AC_DEFINE(USE_MYSQL,1,[Define to 1 if you want to compile with MySQL support])
|
||||
AC_SUBST([MYSQL_LIBS])
|
||||
AC_SUBST([MYSQL_CFLAGS])
|
||||
fi
|
||||
AM_CONDITIONAL(USE_MYSQL, test x$ac_cv_use_mysql != xno)
|
||||
|
||||
AM_CONDITIONAL(USE_ORACLE, test x$ac_cv_use_oracle != xno)
|
||||
if test x$ac_cv_use_oracle != xno; then
|
||||
AC_DEFINE(USE_ORACLE,1,[Define to 1 if you want to compile with Oracle support])
|
||||
ORA_LIBS="-L${ac_cv_use_oracle}/lib -lclntsh"
|
||||
ORA_CFLAGS="-I${ac_cv_use_oracle}/rdbms/demo -I${ac_cv_use_oracle}/rdbms/public"
|
||||
AC_SUBST([ORA_LIBS])
|
||||
AC_SUBST([ORA_CFLAGS])
|
||||
fi
|
||||
|
||||
if test x$ac_cv_use_pgsql != xno; then
|
||||
AC_CHECK_PGSQL([$ac_cv_use_pgsql])
|
||||
AC_DEFINE(USE_PGSQL,1,[Define to 1 if you want to compile with PostgreSQL support])
|
||||
AC_SUBST([PGSQL_LIBS])
|
||||
AC_SUBST([PGSQL_CFLAGS])
|
||||
fi
|
||||
AM_CONDITIONAL(USE_PGSQL, test x$ac_cv_use_pgsql != xno)
|
||||
|
||||
# Check for libaio
|
||||
AC_CHECK_AIO
|
||||
AM_CONDITIONAL(USE_AIO, test x$enable_aio = xyes)
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_CHECK_HEADERS([ \
|
||||
errno.h \
|
||||
fcntl.h \
|
||||
math.h \
|
||||
pthread.h \
|
||||
sched.h \
|
||||
signal.h \
|
||||
stdlib.h \
|
||||
string.h \
|
||||
sys/aio.h \
|
||||
sys/ipc.h \
|
||||
sys/time.h \
|
||||
sys/mman.h \
|
||||
sys/shm.h \
|
||||
thread.h \
|
||||
unistd.h \
|
||||
])
|
||||
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_INLINE
|
||||
AC_TYPE_OFF_T
|
||||
AC_TYPE_SIZE_T
|
||||
AC_HEADER_TIME
|
||||
|
||||
if test "$enable_largefile" = yes; then
|
||||
AC_SYS_LARGEFILE
|
||||
fi
|
||||
|
||||
AC_CHECK_SIZEOF(size_t)
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_MMAP
|
||||
AC_FUNC_STRERROR_R
|
||||
|
||||
AC_CHECK_DECL([clock_gettime],
|
||||
AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [Define if you have clock_gettime() declared in <time.h>]),,
|
||||
[
|
||||
#define _XOPEN_SOURCE 500
|
||||
#include <time.h>
|
||||
]
|
||||
)
|
||||
AC_SEARCH_LIBS([clock_gettime], [rt])
|
||||
|
||||
AC_CHECK_FUNCS([ \
|
||||
fdatasync \
|
||||
gettimeofday \
|
||||
memalign \
|
||||
memset \
|
||||
posix_memalign \
|
||||
pthread_yield \
|
||||
sqrt \
|
||||
strdup \
|
||||
thr_setconcurrency \
|
||||
valloc \
|
||||
])
|
||||
|
||||
AM_CFLAGS="-W -Wall -Wpointer-arith -Wbad-function-cast \
|
||||
-Wstrict-prototypes -Wnested-externs -Winline \
|
||||
-funroll-loops $PTHREAD_CFLAGS"
|
||||
AM_CPPFLAGS="-D_REENTRANT -D_XOPEN_SOURCE=500 -D_GNU_SOURCE"
|
||||
AM_LDFLAGS="$PTHREAD_LIBS"
|
||||
|
||||
AC_SUBST(AM_CFLAGS)
|
||||
AC_SUBST(AM_CPPFLAGS)
|
||||
AC_SUBST(AM_LDFLAGS)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
doc/xsl/catalog.xml
|
||||
doc/Makefile
|
||||
scripts/Makefile
|
||||
sysbench/Makefile
|
||||
sysbench/drivers/Makefile
|
||||
sysbench/drivers/mysql/Makefile
|
||||
sysbench/drivers/oracle/Makefile
|
||||
sysbench/drivers/pgsql/Makefile
|
||||
sysbench/tests/Makefile
|
||||
sysbench/tests/cpu/Makefile
|
||||
sysbench/tests/fileio/Makefile
|
||||
sysbench/tests/memory/Makefile
|
||||
sysbench/tests/threads/Makefile
|
||||
sysbench/tests/mutex/Makefile
|
||||
sysbench/tests/oltp/Makefile
|
||||
])
|
||||
33
doc/Makefile.am
Normal file
33
doc/Makefile.am
Normal file
@ -0,0 +1,33 @@
|
||||
XSLTPROC=xsltproc
|
||||
XSLTPROC_FLAGS=@XSLTPROC_FLAGS@
|
||||
XHTML_STYLESHEET=$(srcdir)/xsl/xhtml.xsl
|
||||
CHUNK_XHTML_STYLESHEET=$(srcdir)/xsl/xhtml-chunk.xsl
|
||||
XML_CATALOG_FILES=xsl/catalog.xml
|
||||
|
||||
htmldir = $(prefix)/share/doc/sysbench
|
||||
dist_html_DATA = manual.html
|
||||
|
||||
EXTRA_DIST=manual.xml xsl/catalog.xml.in xsl/xhtml-chunk.xsl xsl/xhtml-common.xsl xsl/xhtml.xsl
|
||||
|
||||
if have_xsltproc
|
||||
|
||||
manual.html: ${top_srcdir}/doc/manual.xml
|
||||
XML_CATALOG_FILES=$(XML_CATALOG_FILES) $(XSLTPROC) $(XSLTPROC_FLAGS) -o $@ $(XHTML_STYLESHEET) $<
|
||||
|
||||
chunk: ${top_srcdir}/doc/manual.xml
|
||||
$(XSLTPROC) $(XSLTPROC_FLAGS) $(CHUNK_XHTML_STYLESHEET) $<
|
||||
|
||||
else
|
||||
|
||||
chunk:
|
||||
|
||||
manual.html:
|
||||
touch $@
|
||||
|
||||
endif
|
||||
|
||||
clean-local:
|
||||
$(RM) -f *.html
|
||||
|
||||
distclean-local:
|
||||
$(RM) -f xsl/catalog.xml
|
||||
402
doc/Makefile.in
Normal file
402
doc/Makefile.in
Normal file
@ -0,0 +1,402 @@
|
||||
# Makefile.in generated by automake 1.9.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(dist_html_DATA) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(htmldir)"
|
||||
dist_htmlDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(dist_html_DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AM_LDFLAGS = @AM_LDFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
ORA_CFLAGS = @ORA_CFLAGS@
|
||||
ORA_LIBS = @ORA_LIBS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PGSQL_CFLAGS = @PGSQL_CFLAGS@
|
||||
PGSQL_LIBS = @PGSQL_LIBS@
|
||||
PTHREAD_CC = @PTHREAD_CC@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
USE_ORACLE_FALSE = @USE_ORACLE_FALSE@
|
||||
USE_ORACLE_TRUE = @USE_ORACLE_TRUE@
|
||||
USE_PGSQL_FALSE = @USE_PGSQL_FALSE@
|
||||
USE_PGSQL_TRUE = @USE_PGSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = xsltproc
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
acx_pthread_config = @acx_pthread_config@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
pgconfig = @pgconfig@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
XHTML_STYLESHEET = $(srcdir)/xsl/xhtml.xsl
|
||||
CHUNK_XHTML_STYLESHEET = $(srcdir)/xsl/xhtml-chunk.xsl
|
||||
XML_CATALOG_FILES = xsl/catalog.xml
|
||||
htmldir = $(prefix)/share/doc/sysbench
|
||||
dist_html_DATA = manual.html
|
||||
EXTRA_DIST = manual.xml xsl/catalog.xml.in xsl/xhtml-chunk.xsl xsl/xhtml-common.xsl xsl/xhtml.xsl
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-dist_htmlDATA: $(dist_html_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(htmldir)" || $(mkdir_p) "$(DESTDIR)$(htmldir)"
|
||||
@list='$(dist_html_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(dist_htmlDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(dist_htmlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-dist_htmlDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(dist_html_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(mkdir_p) $(distdir)/xsl
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(htmldir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-local
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-dist_htmlDATA
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-dist_htmlDATA uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
clean-local distclean distclean-generic distclean-libtool \
|
||||
distclean-local distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-dist_htmlDATA install-exec install-exec-am \
|
||||
install-info install-info-am install-man install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-dist_htmlDATA uninstall-info-am
|
||||
|
||||
|
||||
@have_xsltproc_TRUE@manual.html: ${top_srcdir}/doc/manual.xml
|
||||
@have_xsltproc_TRUE@ XML_CATALOG_FILES=$(XML_CATALOG_FILES) $(XSLTPROC) $(XSLTPROC_FLAGS) -o $@ $(XHTML_STYLESHEET) $<
|
||||
|
||||
@have_xsltproc_TRUE@chunk: ${top_srcdir}/doc/manual.xml
|
||||
@have_xsltproc_TRUE@ $(XSLTPROC) $(XSLTPROC_FLAGS) $(CHUNK_XHTML_STYLESHEET) $<
|
||||
|
||||
@have_xsltproc_FALSE@chunk:
|
||||
|
||||
@have_xsltproc_FALSE@manual.html:
|
||||
@have_xsltproc_FALSE@ touch $@
|
||||
|
||||
clean-local:
|
||||
$(RM) -f *.html
|
||||
|
||||
distclean-local:
|
||||
$(RM) -f xsl/catalog.xml
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
925
doc/manual.html
Normal file
925
doc/manual.html
Normal file
@ -0,0 +1,925 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<title>SysBench manual</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.67.2" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="book" lang="en" xml:lang="en">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div>
|
||||
<h1 class="title"><a id="sysbench-guide"></a>SysBench manual</h1>
|
||||
</div>
|
||||
<div>
|
||||
<div class="authorgroup">
|
||||
<div class="author">
|
||||
<h3 class="author"><span class="firstname">Alexey</span> <span class="surname">Kopytov</span></h3>
|
||||
<div class="affiliation">
|
||||
<div class="address">
|
||||
<p>
|
||||
<code class="email"><<a href="mailto:kaamos@users.sourceforge.net">kaamos@users.sourceforge.net</a>></code>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p class="copyright">Copyright � 2004-2005 MySQL AB</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="toc">
|
||||
<p>
|
||||
<b>Table of Contents</b>
|
||||
</p>
|
||||
<dl>
|
||||
<dt>
|
||||
<span class="chapter">
|
||||
<a href="#introduction">1. Introduction</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#features">1. Features of SysBench</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#design">2. Design</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#links">3. Links</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#install">4. Installation</a>
|
||||
</span>
|
||||
</dt>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="chapter">
|
||||
<a href="#usage">2. Usage</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#general_syntax">1. General syntax</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#common_options">2. Common command line options</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#batch_mode">3. Batch mode</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#test_modes">4. Test modes</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#cpu_mode">4.1. <code class="option">cpu</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#threads_mode">4.2. <code class="option">threads</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#mutex_mode">4.3. <code class="option">mutex</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#memory_mode">4.4. <code class="option">memory</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#fileio_mode">4.5. <code class="option">fileio</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#database_mode">4.6. <code class="option">oltp</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="chapter" lang="en" xml:lang="en">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div>
|
||||
<h2 class="title"><a id="introduction"></a>Chapter�1.�Introduction</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toc">
|
||||
<p>
|
||||
<b>Table of Contents</b>
|
||||
</p>
|
||||
<dl>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#features">1. Features of SysBench</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#design">2. Design</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#links">3. Links</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#install">4. Installation</a>
|
||||
</span>
|
||||
</dt>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<div class="section" lang="en" xml:lang="en">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div>
|
||||
<h2 class="title" style="clear: both"><a id="features"></a>1.�Features of SysBench</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Current features allow to test the following system parameters:
|
||||
</p>
|
||||
<div class="itemizedlist">
|
||||
<ul type="disc">
|
||||
<li>
|
||||
<p>file I/O performance</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>scheduler performance</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>memory allocation and transfer speed</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>POSIX threads implementation performance</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>database server performance</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en" xml:lang="en">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div>
|
||||
<h2 class="title" style="clear: both"><a id="design"></a>2.�Design</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
The design is very simple. SysBench runs a specified number of threads and they all execute requests in parallel.
|
||||
The actual workload produced by requests depends on the specified test mode. You can limit either the total number of
|
||||
requests or the total time for the benchmark, or both.
|
||||
</p>
|
||||
<p>
|
||||
Available test modes are implemented by compiled-in modules, and SysBench was designed to make adding new test modes
|
||||
an easy task. Each test mode may have additional (or workload-specific) options.
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en" xml:lang="en">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div>
|
||||
<h2 class="title" style="clear: both"><a id="links"></a>3.�Links</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="variablelist">
|
||||
<dl>
|
||||
<dt>
|
||||
<span class="term">Home page</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>
|
||||
<a href="http://sysbench.sf.net/">http://sysbench.sf.net/</a>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">Download</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>
|
||||
<a href="http://sf.net/projects/sysbench/">http://sf.net/projects/sysbench/</a>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">Mailing lists</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>
|
||||
<a href="http://sourceforge.net/mail/?group_id=102348">sysbench-general</a>
|
||||
</p>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">Web forums</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist">
|
||||
<ul type="disc">
|
||||
<li>
|
||||
<a href="http://sourceforge.net/forum/forum.php?forum_id=353125">Developers</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://sourceforge.net/forum/forum.php?forum_id=353124">Help</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://sourceforge.net/forum/forum.php?forum_id=353123">Open discussion</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>
|
||||
</p>
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">Bug tracking system</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<p>
|
||||
</p>
|
||||
<div class="itemizedlist">
|
||||
<ul type="disc">
|
||||
<li>
|
||||
<a href="http://sourceforge.net/tracker/?atid=631676&group_id=102348&func=browse">
|
||||
Bug reports
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://sourceforge.net/tracker/?atid=631679&group_id=102348&func=browse">
|
||||
Feature requests
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" lang="en" xml:lang="en">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div>
|
||||
<h2 class="title" style="clear: both"><a id="install"></a>4.�Installation</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
The following standart procedure will be sufficient to build SysBench in most cases:
|
||||
</p>
|
||||
<table xmlns="" border="0" style="background: #E0E0E0;" width="90%">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="synopsis">
|
||||
<span xmlns="http://www.w3.org/1999/xhtml"><strong class="command">./configure</strong></span>
|
||||
<span xmlns="http://www.w3.org/1999/xhtml"><strong class="command">make</strong></span>
|
||||
<span xmlns="http://www.w3.org/1999/xhtml"><strong class="command">make install</strong></span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
The above procedure will try to compile SysBench with MySQL support by default. If you have MySQL headers and libraries
|
||||
in non-standard locations (and no <span><strong class="command">mysql_config</strong></span> can be found in the <code class="constant">PATH</code>
|
||||
environmental variable), then you can specify them explicitly with <code class="option">--with-mysql-includes</code> and
|
||||
<code class="option">--with-mysql-libs</code> options to <span><strong class="command">./configure</strong></span>.
|
||||
</p>
|
||||
<p>
|
||||
To compile SysBench without MySQL support, use <code class="option">--without-mysql</code>. In this case all database-related
|
||||
test modes will be unavailable.
|
||||
</p>
|
||||
<p>
|
||||
If you are running on a 64-bit platform, make sure to build a 64-bit binary by passing the proper target platform and compiler options to <span><strong class="command">configure</strong></span> script. You can also consult the INSTALL file for generic installation instructions.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chapter" lang="en" xml:lang="en">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div>
|
||||
<h2 class="title"><a id="usage"></a>Chapter�2.�Usage</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toc">
|
||||
<p>
|
||||
<b>Table of Contents</b>
|
||||
</p>
|
||||
<dl>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#general_syntax">1. General syntax</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#common_options">2. Common command line options</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#batch_mode">3. Batch mode</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#test_modes">4. Test modes</a>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<dl>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#cpu_mode">4.1. <code class="option">cpu</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#threads_mode">4.2. <code class="option">threads</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#mutex_mode">4.3. <code class="option">mutex</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#memory_mode">4.4. <code class="option">memory</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#fileio_mode">4.5. <code class="option">fileio</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
<dt>
|
||||
<span class="section">
|
||||
<a href="#database_mode">4.6. <code class="option">oltp</code></a>
|
||||
</span>
|
||||
</dt>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" lang="en" xml:lang="en">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div>
|
||||
<h2 class="title" style="clear: both"><a id="general_syntax"></a>1.�General syntax</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
The general syntax for SysBench is as follows:
|
||||
</p>
|
||||
<table xmlns="" border="0" style="background: #E0E0E0;" width="90%">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="screen">
|
||||
sysbench <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>[common-options]</em></span> --test=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>name</em></span> <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>[test-options]</em></span> <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>command</em></span>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
See <a href="#common_options" title="2.�Common command line options">Section�2, “Common command line options”</a> for a description of common options and documentation for particular test mode for a list
|
||||
of test-specific options.
|
||||
</p>
|
||||
<p>
|
||||
Below is a brief description of available commands and their purpose:
|
||||
</p>
|
||||
<div class="variablelist">
|
||||
<dl>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<span>
|
||||
<strong class="command">prepare</strong>
|
||||
</span>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>Performs preparative actions for those tests which need them, e.g. creating the necessary
|
||||
files on disk for the <code class="option">fileio</code> test, or filling the test database for the
|
||||
<code class="option">oltp</code> test.
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<span>
|
||||
<strong class="command">run</strong>
|
||||
</span>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>Runs the actual test specified with the <code class="option">--test=<span class="emphasis"><em>name</em></span></code> option.
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<span>
|
||||
<strong class="command">cleanup</strong>
|
||||
</span>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>Removes temporary data after the test run in those tests which create one.
|
||||
</dd>
|
||||
<dt>
|
||||
<span class="term">
|
||||
<span>
|
||||
<strong class="command">help</strong>
|
||||
</span>
|
||||
</span>
|
||||
</dt>
|
||||
<dd>Displays usage information for a test specified with the
|
||||
<code class="option">--test=<span class="emphasis"><em>name</em></span></code> option.
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
Also you can use <span><strong class="command">sysbench help</strong></span> to display the brief usage summary and the list of available test modes.
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en" xml:lang="en">
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div>
|
||||
<h2 class="title" style="clear: both"><a id="common_options"></a>2.�Common command line options</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
The table below lists the supported common options, their descriptions and default values:
|
||||
</p>
|
||||
<div class="informaltable">
|
||||
<table border="1">
|
||||
<colgroup>
|
||||
<col />
|
||||
<col />
|
||||
<col />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="emphasis">
|
||||
<em>Option</em>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="emphasis">
|
||||
<em>Description</em>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="emphasis">
|
||||
<em>Default value</em>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--num-threads</code>
|
||||
</td>
|
||||
<td>The total number of worker threads to create</td>
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--max-requests</code>
|
||||
</td>
|
||||
<td>Limit for total number of requests. 0 means unlimited</td>
|
||||
<td>10000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--max-time</code>
|
||||
</td>
|
||||
<td>Limit for total execution time in seconds. 0 (default) means unlimited</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--thread-stack-size</code>
|
||||
</td>
|
||||
<td>Size of stack for each thread</td>
|
||||
<td>32K</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--init-rnd</code>
|
||||
</td>
|
||||
<td>Specifies if random numbers generator should be initialized from timer before the test start</td>
|
||||
<td>off</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--test</code>
|
||||
</td>
|
||||
<td>Name of the test mode to run</td>
|
||||
<td>
|
||||
<span class="emphasis">
|
||||
<em>Required</em>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--debug</code>
|
||||
</td>
|
||||
<td>Print more debug info</td>
|
||||
<td>off</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--validate</code>
|
||||
</td>
|
||||
<td>Perform
|
||||
validation of test results where possible </td>
|
||||
<td>off</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--help</code>
|
||||
</td>
|
||||
<td>Print help on general syntax or on a test mode specified with --test, and exit</td>
|
||||
<td>off</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--verbosity</code>
|
||||
</td>
|
||||
<td>Verbosity level (0 - only critical messages, 5 - debug)</td>
|
||||
<td>4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--percentile</code>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
SysBench measures execution times for all processed
|
||||
requests to display statistical information like minimal, average and
|
||||
maximum execution time. For most benchmarks it is also useful to know
|
||||
a request execution time value matching some percentile (e.g. 95%
|
||||
percentile means we should drop 5% of the most long requests and
|
||||
choose the maximal value from the remaining ones).
|
||||
</p>
|
||||
<p>
|
||||
This option allows to specify a percentile rank of query
|
||||
execution times to count
|
||||
</p>
|
||||
</td>
|
||||
<td>95</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--batch</code>
|
||||
</td>
|
||||
<td>Dump current results periodically (see <a href="#batch_mode" title="3.�Batch mode">Section�3, “Batch mode”</a>)</td>
|
||||
<td>off</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--batch-delay</code>
|
||||
</td>
|
||||
<td>Delay between batch dumps in secods (see <a href="#batch_mode" title="3.�Batch mode">Section�3, “Batch mode”</a>)</td>
|
||||
<td>300</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code class="option">--validate</code>
|
||||
</td>
|
||||
<td>Perform validation of test results where possible</td>
|
||||
<td>off</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>
|
||||
Note that numerical values for all <span class="emphasis"><em>size</em></span> options
|
||||
(like <code class="option">--thread-stack-size</code> in this table) may be
|
||||
specified by appending the corresponding multiplicative suffix (K for
|
||||
kilobytes, M for megabytes, G for gigabytes and T for terabytes).
|
||||
</p>
|
||||
</div>
|
||||
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="batch_mode"></a>3.�Batch mode</h2></div></div></div>
|
||||
In some cases it is useful to have not only the final benchmarks
|
||||
statistics, but also periodical dumps of current stats to see how they
|
||||
change over the test run. For this purpose SysBench has a batch
|
||||
execution mode which is turned on by the <code class="option">--batch</code>
|
||||
option. You may specify the delay in seconds between the consequent dumps with
|
||||
the <code class="option">--batch-delay</code> option. Example:
|
||||
<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">
|
||||
sysbench --batch --batch-delay=5 --test=threads run
|
||||
</pre></td></tr></table>
|
||||
This will run SysBench in a threads test mode, with the current values
|
||||
of minimum, average, maximum and percentile for request execution
|
||||
times printed every 5 seconds.
|
||||
</div>
|
||||
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="test_modes"></a>4.�Test modes</h2></div></div></div>
|
||||
This section gives a detailed description for each test mode available
|
||||
in SysBench.
|
||||
|
||||
<div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="cpu_mode"></a>4.1.�<code class="option">cpu</code></h3></div></div></div></div><p>
|
||||
The <code class="option">cpu</code> is one of the most simple benchmarks in
|
||||
SysBench. In this mode each request consists in calculation of prime numbers up to a value
|
||||
specified by the <code class="option">--cpu-max-primes</code> option. All calculations are performed using 64-bit integers.
|
||||
</p><p>
|
||||
Each thread executes the requests concurrently until either the total number of requests or the total execution
|
||||
time exceed the limits specified with the common command line options.
|
||||
</p><p>
|
||||
Example:
|
||||
</p><table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">
|
||||
sysbench --test=cpu --cpu-max-prime=20000 run
|
||||
</pre></td></tr></table><p>
|
||||
</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="threads_mode"></a>4.2.�<code class="option">threads</code></h3></div></div></div></div><p>
|
||||
This test mode was written to benchmark scheduler performance, more specifically the cases
|
||||
when a scheduler has a large number of threads competing for some set of mutexes.
|
||||
</p><p>
|
||||
SysBench creates a specified number of threads and a specified number of mutexes. Then each thread
|
||||
starts running the requests consisting of locking the mutex, yielding the CPU, so the thread is
|
||||
placed in the run queue by the scheduler, then unlocking the mutex when the thread is rescheduled back
|
||||
to execution. For each request, the above actions are run several times in a loop, so the more iterations
|
||||
is performed, the more concurrency is placed on each mutex.
|
||||
</p><p>
|
||||
The following options are available in this test mode:
|
||||
</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><tbody><tr><td><span class="emphasis"><em>Option</em></span></td><td><span class="emphasis"><em>Description</em></span></td><td><span class="emphasis"><em>Default value</em></span></td></tr><tr><td><code class="option">--thread-yields</code></td><td>Number of <span class="emphasis"><em>lock/yield/unlock</em></span> loops to execute per each request</td><td>1000</td></tr><tr><td><code class="option">--thread-locks</code></td><td>Number of mutexes to create</td><td>8</td></tr></tbody></table></div><p>
|
||||
</p><p>
|
||||
Example:
|
||||
</p><table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">
|
||||
sysbench --num-threads=64 --test=threads --thread-yields=100 --thread-locks=2 run
|
||||
</pre></td></tr></table><p>
|
||||
</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="mutex_mode"></a>4.3.�<code class="option">mutex</code></h3></div></div></div></div><p>
|
||||
This test mode was written to emulate a situation when all threads run concurrently most of the time,
|
||||
acquiring the mutex lock only for a short period of time (incrementing a global variable). So the purpose
|
||||
of this benchmarks is to examine the performance of mutex implementation.
|
||||
</p><p>
|
||||
The following options are available in this test mode:
|
||||
</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><tbody><tr><td><span class="emphasis"><em>Option</em></span></td><td><span class="emphasis"><em>Description</em></span></td><td><span class="emphasis"><em>Default value</em></span></td></tr><tr><td><code class="option">--mutex-num</code></td><td>Number of mutexes. The actual mutex to lock is chosen randomly before each lock</td><td>4096</td></tr><tr><td><code class="option">--mutex-locks</code></td><td>Number of mutex locks to acquire per each request</td><td>50000</td></tr><tr><td><code class="option">--mutex-loops</code></td><td>Number of iterations for an empty loop to perform before acquiring the lock</td><td>10000</td></tr></tbody></table></div><p>
|
||||
</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="memory_mode"></a>4.4.�<code class="option">memory</code></h3></div></div></div><p>
|
||||
This test mode can be used to benchmark sequential memory reads or writes. Depending on command line
|
||||
options each thread can access either a global or a local block for all memory operations.
|
||||
</p><p>
|
||||
The following options are available in this test mode:
|
||||
</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><tbody><tr><td><span class="emphasis"><em>Option</em></span></td><td><span class="emphasis"><em>Description</em></span></td><td><span class="emphasis"><em>Default value</em></span></td></tr><tr><td><code class="option">--memory-block-size</code></td><td>Size of memory block to use</td><td>1K</td></tr><tr><td><code class="option">--memory-scope</code></td><td>
|
||||
Possible values: <code class="option">global</code>, <code class="option">local</code>. Specifies whether each thread will
|
||||
use a globally allocated memory block, or a local one.
|
||||
</td><td>global</td></tr><tr><td><code class="option">--memory-total-size</code></td><td>Total size of data to transfer</td><td>100G</td></tr><tr><td><code class="option">--memory-oper</code></td><td>
|
||||
Type of memory operations. Possible values: <code class="option">read</code>, <code class="option">write</code>.
|
||||
</td><td>100G</td></tr></tbody></table></div><p>
|
||||
</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fileio_mode"></a>4.5.�<code class="option">fileio</code></h3></div></div></div><p>
|
||||
This test mode can be used to produce various kinds of file I/O workloads. At the <code class="option">prepare</code>
|
||||
stage SysBench creates a specified number of files with a specified total size, then at the <code class="option">run</code>
|
||||
stage, each thread performs specified I/O operations on this set of files.
|
||||
</p><p>
|
||||
When the global <code class="option">--validate</code> option is used with the <code class="option">fileio</code> test mode, SysBench
|
||||
performs checksums validation on all data read from the disk. On each write operation the block is filled with random values,
|
||||
then the checksum is calculated
|
||||
and stored in the block along with the offset of this block within a file. On each read operation the block is validated
|
||||
by comparing the stored offset with the real offset, and the stored checksum with the real calculated checksum.
|
||||
</p><p>
|
||||
The following I/O operations are supported:
|
||||
|
||||
</p><div class="variablelist"><dl><dt><span class="term"><span><strong class="command">seqwr</strong></span></span></dt><dd>sequential write
|
||||
</dd><dt><span class="term"><span><strong class="command">seqrewr</strong></span></span></dt><dd>sequential rewrite
|
||||
</dd><dt><span class="term"><span><strong class="command">seqrd</strong></span></span></dt><dd>sequential read
|
||||
</dd><dt><span class="term"><span><strong class="command">rndrd</strong></span></span></dt><dd>random read
|
||||
</dd><dt><span class="term"><span><strong class="command">rndwr</strong></span></span></dt><dd>random write
|
||||
</dd><dt><span class="term"><span><strong class="command">rndrw</strong></span></span></dt><dd>combined random read/write
|
||||
</dd></dl></div><p>
|
||||
</p><p>
|
||||
Also, the following file access modes can be specified, if the underlying platform supports them:
|
||||
</p><div class="variablelist"><dl><dt><span class="term">Asynchronous I/O mode</span></dt><dd>
|
||||
At the moment only Linux AIO implementation is supported. When running in asynchronous mode,
|
||||
SysBench queues a specified number of I/O requests using Linux AIO API, then waits for
|
||||
at least one of submitted requests to complete. After that a new series of I/O requests
|
||||
is submitted.
|
||||
</dd><dt><span class="term">Slow <code class="option">mmap()</code> mode</span></dt><dd>In this mode SysBench will use <code class="option">mmap</code>'ed I/O. However, a separate
|
||||
<code class="option">mmap</code> will be used for each I/O request due to the limitation of 32-bit
|
||||
architectures (we cannot <code class="option">mmap()</code> the whole file, as its size migth possibly
|
||||
exceed the maximum of 2 GB of the process address space).
|
||||
</dd><dt><span class="term">Fast <code class="option">mmap()</code> mode</span></dt><dd>On 64-bit architectures it is possible to <code class="option">mmap()</code> the whole file
|
||||
into the process address space, avoiding the limitation of 2 GB on 32-bit platforms.
|
||||
</dd><dt><span class="term">Using <code class="option">fdatasync()</code> instead of <code class="option">fsync()</code></span></dt><dd></dd><dt><span class="term">Additional flags to <code class="option">open(2)</code></span></dt><dd>SysBench can use additional flags to <code class="option">open(2)</code>, such as <code class="option">O_SYNC</code>,
|
||||
<code class="option">O_DSYNC</code> and <code class="option">O_DIRECT</code>.
|
||||
</dd></dl></div><p>
|
||||
</p><p>
|
||||
Below is a list of test-specific option for the <span><strong class="command">fileio</strong></span> mode:
|
||||
|
||||
</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><tbody><tr><td><span class="emphasis"><em>Option</em></span></td><td><span class="emphasis"><em>Description</em></span></td><td><span class="emphasis"><em>Default value</em></span></td></tr><tr><td><code class="option">--file-num</code></td><td>Number of files to create</td><td>128</td></tr><tr><td><code class="option">--file-block-size</code></td><td>
|
||||
Block size to use in all I/O operations
|
||||
</td><td>16K</td></tr><tr><td><code class="option">--file-total-size</code></td><td>Total size of files</td><td>2G</td></tr><tr><td><code class="option">--file-test-mode</code></td><td>
|
||||
Type of workload to produce. Possible values: <code class="option">seqwr</code>, <code class="option">seqrewr</code>,
|
||||
<code class="option">seqrd</code>, <code class="option">rndrd</code>, <code class="option">rndwr</code>, <code class="option">rndwr</code> (see above)
|
||||
</td><td><span class="emphasis"><em>required</em></span></td></tr><tr><td><code class="option">--file-io-mode</code></td><td>
|
||||
I/O mode. Possible values: <code class="option">sync</code>, <code class="option">async</code>, <code class="option">fastmmap</code>,
|
||||
<code class="option">slowmmap</code> (only if supported by the platform, see above).
|
||||
</td><td>sync</td></tr><tr><td><code class="option">--file-async-backlog</code></td><td>
|
||||
Number of asynchronous operations to queue per thread (only for <code class="option">--file-io-mode=async</code>, see above)
|
||||
</td><td>128</td></tr><tr><td><code class="option"> --file-extra-flags</code></td><td>
|
||||
Additional flags to use with <code class="option">open(2)</code>
|
||||
</td><td>�</td></tr><tr><td><code class="option">--file-fsync-freq</code></td><td>
|
||||
Do <code class="option">fsync()</code> after this number of requests (0 - don't use <code class="option">fsync()</code>)
|
||||
</td><td>100</td></tr><tr><td><code class="option">--file-fsync-all</code></td><td>
|
||||
Do <code class="option">fsync()</code> after each write operation
|
||||
</td><td>no</td></tr><tr><td><code class="option">--file-fsync-end</code></td><td>
|
||||
Do <code class="option">fsync()</code> at the end of the test
|
||||
</td><td>yes</td></tr><tr><td><code class="option">--file-fsync-mode</code></td><td>
|
||||
Which method to use for synchronization. Possible values: <code class="option">fsync</code>, <code class="option">fdatasync</code> (see above)
|
||||
</td><td>fsync</td></tr><tr><td><code class="option">--file-merged-requests</code></td><td>
|
||||
Merge at most this number of I/O requests if possible (0 - don't merge)
|
||||
</td><td>0</td></tr><tr><td><code class="option">--file-rw-ratio</code></td><td>
|
||||
reads/writes ration for combined random read/write test
|
||||
</td><td>1.5</td></tr></tbody></table></div><p>
|
||||
|
||||
</p><p>
|
||||
Usage example:
|
||||
</p><table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">
|
||||
$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw prepare
|
||||
$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw run
|
||||
$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw cleanup
|
||||
</pre></td></tr></table><p>
|
||||
In the above example the first command creates 128 files with the total size of 3 GB in the current directory, the
|
||||
second command runs the actual benchmark and displays the results upon completion, and the third one removes the files
|
||||
used for the test.
|
||||
</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="database_mode"></a>4.6.�<code class="option">oltp</code></h3></div></div></div></div><p>
|
||||
This test mode was written to benchmark a real database performance. At the <span><strong class="command">prepare</strong></span> stage
|
||||
the following table is created in the specified database (<code class="option">sbtest</code> by default):
|
||||
</p><table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">
|
||||
CREATE TABLE `sbtest` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`k` int(10) unsigned NOT NULL default '0',
|
||||
`c` char(120) NOT NULL default '',
|
||||
`pad` char(60) NOT NULL default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `k` (`k`);
|
||||
</pre></td></tr></table><p>
|
||||
Then this table is filled with a specified number of rows.
|
||||
</p><p>
|
||||
The following execution modes are available at the <span><strong class="command">run</strong></span> stage:
|
||||
</p><div class="variablelist"><dl><dt><span class="term">Simple</span></dt><dd><p>
|
||||
In this mode each thread runs simple queries of the following form:
|
||||
</p><table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen"> SELECT c FROM sbtest WHERE id=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span> </pre></td></tr></table><p>
|
||||
where <span class="emphasis"><em>N</em></span> takes a random value in range 1..<span class="emphasis"><em><table size></em></span>
|
||||
</p></dd><dt><span class="term">Advanced transactional</span></dt><dd><p>
|
||||
Each thread performs transactions on the test table. If the test table and database support transactions
|
||||
(e.g. InnoDB engine in MySQL), then <code class="option">BEGIN</code>/<code class="option">COMMIT</code> statements will be used
|
||||
to start/stop a transaction. Otherwise, SysBench will use <code class="option">LOCK TABLES</code>/<code class="option">UNLOCK TABLES
|
||||
</code> statements (e.g. for MyISAM engine in MySQL). If some rows are deleted in a transaction,
|
||||
the same rows will be inserted within the same transaction, so this test mode does not destruct any data
|
||||
in the test table and can be run multiple times on the same table.
|
||||
</p>
|
||||
|
||||
Depending on the command line options, each transaction may contain the following statements:
|
||||
<div class="itemizedlist"><ul type="disc"><li>Point queries: <table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">SELECT c FROM sbtest WHERE id=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span></pre></td></tr></table></li><li>
|
||||
Range queries: <table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">SELECT c FROM sbtest WHERE id BETWEEN <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span> AND <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>M</em></span> </pre></td></tr></table></li><li>
|
||||
Range SUM() queries: <table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">SELECT SUM(K) FROM sbtest WHERE id BETWEEN <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span> and <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>M</em></span></pre></td></tr></table></li><li>Range ORDER BY queries:<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">SELECT c FROM sbtest WHERE id between <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span> and <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>M</em></span> ORDER BY c</pre></td></tr></table></li><li>Range DISTINCT queries:<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">SELECT DISTINCT c FROM sbtest WHERE id BETWEEN <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span> and <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>M</em></span> ORDER BY c</pre></td></tr></table></li><li>UPDATEs on index column:<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">UPDATE sbtest SET k=k+1 WHERE id=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span> </pre></td></tr></table></li><li>UPDATEs on non-index column:<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">UPDATE sbtest SET c=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span> WHERE id=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>M</em></span> </pre></td></tr></table></li><li>DELETE queries:<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">DELETE FROM sbtest WHERE id=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span> </pre></td></tr></table></li><li>INSERT queries:<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">INSERT INTO sbtest VALUES (<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>...</em></span>) </pre></td></tr></table></li></ul></div></dd><dt><span class="term">Non-transactional</span></dt><dd><p>
|
||||
This mode is similar to <span><strong class="command">Simple</strong></span>, but you can also choose the query to run. Note that unlike the
|
||||
<span><strong class="command">Advanced transactional</strong></span> mode, this one does not preserve the test table between requests, so
|
||||
you should recreate it with the appropriate <span><strong class="command">cleanup</strong></span>/<span><strong class="command">prepare</strong></span> commands between
|
||||
consecutive benchmarks.
|
||||
</p><p>
|
||||
Below is a list of possible queries:
|
||||
</p><div class="itemizedlist"><ul type="disc"><li>
|
||||
Point queries:
|
||||
<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">SELECT pad FROM sbtest WHERE id=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span></pre></td></tr></table></li><li>
|
||||
UPDATEs on index column:
|
||||
<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">UPDATE sbtest SET k=k+1 WHERE id=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span></pre></td></tr></table></li><li>
|
||||
UPDATEs on non-index column:
|
||||
<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">UPDATE sbtest SET c=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span> WHERE id=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>M</em></span></pre></td></tr></table></li><li>
|
||||
DELETE queries:
|
||||
<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">DELETE FROM sbtest WHERE id=<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span></pre></td></tr></table>
|
||||
The generated row IDs are unique over each test run, so no row is deleted twice.
|
||||
</li><li>
|
||||
INSERT queries:
|
||||
<table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">INSERT INTO sbtest (k, c, pad) VALUES(<span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>N</em></span>, <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>M</em></span>, <span xmlns="http://www.w3.org/1999/xhtml" class="emphasis"><em>S</em></span>)</pre></td></tr></table></li></ul></div><p>
|
||||
</p></dd></dl></div><p>
|
||||
</p><p>
|
||||
Below is a list of options available for the database test mode:
|
||||
|
||||
</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><tbody><tr><td><span class="emphasis"><em>Option</em></span></td><td><span class="emphasis"><em>Description</em></span></td><td><span class="emphasis"><em>Default value</em></span></td></tr><tr><td><code class="option">--oltp-test-mode</code></td><td>Execution mode (see above). Possible values: <code class="option">simpe</code> (simple), <code class="option">complex</code> (advanced transactional) and <code class="option">nontrx</code> (non-transactional)</td><td><code class="option">complex</code></td></tr><tr><td><code class="option">--oltp-read-only</code></td><td>
|
||||
Read-only mode. No <code class="option">UPDATE</code>, <code class="option">DELETE</code> or <code class="option">INSERT</code> queries will be performed.
|
||||
</td><td>off</td></tr><tr><td><code class="option">--oltp-range-size</code></td><td>Range size for range queries</td><td>100</td></tr><tr><td><code class="option">--oltp-point-selects</code></td><td>
|
||||
Number of point select queries in a single transaction
|
||||
</td><td>10</td></tr><tr><td><code class="option">--oltp-simple-ranges</code></td><td>
|
||||
Number of simple range queries in a single transaction
|
||||
</td><td>1</td></tr><tr><td><code class="option">--oltp-sum-ranges</code></td><td>
|
||||
Number of SUM range queries in a single transaction
|
||||
</td><td>1</td></tr><tr><td><code class="option">--oltp-order-ranges</code></td><td>
|
||||
Number of ORDER range queries in a single transaction
|
||||
</td><td>1</td></tr><tr><td><code class="option">--oltp-distinct-ranges</code></td><td>
|
||||
Number of DISTINCT range queries in a single transaction
|
||||
</td><td>1</td></tr><tr><td><code class="option">--oltp-index-updates</code></td><td>
|
||||
Number of index UPDATE queries in a single transaction
|
||||
</td><td>1</td></tr><tr><td><code class="option">--oltp-non-index-updates</code></td><td>
|
||||
Number of non-index UPDATE queries in a single transaction
|
||||
</td><td>1</td></tr><tr><td><code class="option"> --oltp-nontrx-mode</code></td><td>
|
||||
Type of queries for non-transactional execution mode (see above). Possible values: <code class="option">select</code>,
|
||||
<code class="option">update_key</code>, <code class="option">update_nokey</code>, <code class="option">insert</code>, <code class="option">delete</code>.
|
||||
</td><td><code class="option">select</code></td></tr><tr><td><code class="option">--oltp-connect-delay</code></td><td>
|
||||
Time in microseconds to sleep after each connection to database
|
||||
</td><td>10000</td></tr><tr><td><code class="option">--oltp-user-delay-min</code></td><td>
|
||||
Minimum time in microseconds to sleep after each request
|
||||
</td><td>0</td></tr><tr><td><code class="option">--oltp-user-delay-max</code></td><td>
|
||||
Maximum time in microseconds to sleep after each request
|
||||
</td><td>0</td></tr><tr><td><code class="option">--oltp-table-name</code></td><td>
|
||||
Name of the test table
|
||||
</td><td>sbtest</td></tr><tr><td><code class="option">--oltp-table-size</code></td><td>
|
||||
Number of rows in the test table
|
||||
</td><td>10000</td></tr><tr><td><code class="option">--oltp-dist-type</code></td><td>
|
||||
<p>
|
||||
Distribution of random numbers. Possible values: <code class="option">uniform</code> (uniform distribution),
|
||||
<code class="option">gauss</code> (gaussian distribution) and <code class="option">special</code>.
|
||||
</p>
|
||||
<p>
|
||||
With special distribution a specified percent of numbers is generated in a specified percent of cases (see options below).
|
||||
</p>
|
||||
</td><td><code class="option">special</code></td></tr><tr><td><code class="option">--oltp-dist-pct</code></td><td>
|
||||
Percentage of values to be treated as 'special' (for special distribution)
|
||||
</td><td>1</td></tr><tr><td><code class="option">--oltp-dist-res</code></td><td>
|
||||
Percentage of cases when 'special' values are generated (for special distribution)
|
||||
</td><td>75</td></tr><tr><td><code class="option">--db-ps-mode</code></td><td>
|
||||
If the database driver supports Prepared Statements API, SysBench will use server-side prepared statements for all queries
|
||||
where possible. Otherwise, client-side (or emulated) prepared statements will be used. This option allows to force using
|
||||
emulation even when PS API is available. Possible values: <code class="option">disable</code>, <code class="option">auto</code>.
|
||||
</td><td><code class="option">auto</code></td></tr></tbody></table></div><p>
|
||||
</p><p>
|
||||
Also, each database driver may provide its own options. Currently only MySQL driver is available. Below is a list of MySQL-specific options:
|
||||
|
||||
</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><tbody><tr><td><span class="emphasis"><em>Option</em></span></td><td><span class="emphasis"><em>Description</em></span></td><td><span class="emphasis"><em>Default value</em></span></td></tr><tr><td><code class="option">--mysql-host</code></td><td>MySQL server host</td><td><code class="option">localhost</code></td></tr><tr><td><code class="option">--mysql-port</code></td><td>
|
||||
MySQL server port (in case TCP/IP connection should be used)
|
||||
</td><td>3306</td></tr><tr><td><code class="option">--mysql-socket</code></td><td>Unix socket file to communicate with the MySQL server</td><td>�</td></tr><tr><td><code class="option">--mysql-user</code></td><td>
|
||||
MySQL user
|
||||
</td><td>user</td></tr><tr><td><code class="option">--mysql-password</code></td><td>
|
||||
MySQL password
|
||||
</td><td>�</td></tr><tr><td><code class="option">--mysql-db</code></td><td>
|
||||
MySQL database name. Note SysBench will not automatically create this database. You should create it manually and grant
|
||||
the appropriate privileges to a user which will be used to access the test table.
|
||||
</td><td>sbtest</td></tr><tr><td><code class="option">--mysql-table-type</code></td><td>
|
||||
Type of the test table. Possible values: <code class="option">myisam</code>, <code class="option">innodb</code>, <code class="option">heap</code>,
|
||||
<code class="option">ndbcluster</code>, <code class="option">bdb</code>.
|
||||
</td><td>innodb</td></tr><tr><td><code class="option">--myisam-max-rows</code></td><td>
|
||||
MAX_ROWS option for MyISAM tables (required for big tables)
|
||||
</td><td>1000000</td></tr></tbody></table></div><p>
|
||||
</p><p>
|
||||
Example usage:
|
||||
</p><table xmlns="" border="0" style="background: #E0E0E0;" width="90%"><tr><td><pre class="screen">
|
||||
$ sysbench --test=oltp --mysql-table-type=myisam --oltp-table-size=1000000 --mysql-socket=/tmp/mysql.sock prepare
|
||||
$ sysbench --num-threads=16 --max-requests=100000 --test=oltp --oltp-table-size=1000000 --mysql-socket=/tmp/mysql.sock --oltp-read-only run
|
||||
</pre></td></tr></table><p>
|
||||
The first command will create a MyISAM table 'sbtest' in a database 'sbtest' on a MySQL server using <code class="option">/tmp/mysql.sock</code> socket, then fill this table with 1M records. The second command will run the actual benchmark with 16 client threads, limiting the total number of request by 100,000.
|
||||
</p></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
751
doc/manual.xml
Normal file
751
doc/manual.xml
Normal file
@ -0,0 +1,751 @@
|
||||
<?xml version="1.0" encoding='ISO-8859-1'?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
|
||||
|
||||
<book id="sysbench-guide">
|
||||
<bookinfo>
|
||||
<title>SysBench manual</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Alexey</firstname>
|
||||
<surname>Kopytov</surname>
|
||||
<affiliation>
|
||||
<address><email>kaamos@users.sourceforge.net</email></address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<copyright>
|
||||
<year>2004-2005</year>
|
||||
<holder>MySQL AB</holder>
|
||||
</copyright></bookinfo>
|
||||
|
||||
<toc></toc>
|
||||
|
||||
<chapter id="introduction">
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
<section id="features">
|
||||
<title>Features of SysBench</title>
|
||||
<para>
|
||||
Current features allow to test the following system parameters:
|
||||
<itemizedlist>
|
||||
<listitem><para>file I/O performance</para></listitem>
|
||||
<listitem><para>scheduler performance</para></listitem>
|
||||
<listitem><para>memory allocation and transfer speed</para></listitem>
|
||||
<listitem><para>POSIX threads implementation performance</para></listitem>
|
||||
<listitem><para>database server performance</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="design">
|
||||
<title>Design</title>
|
||||
<para>
|
||||
The design is very simple. SysBench runs a specified number of threads and they all execute requests in parallel.
|
||||
The actual workload produced by requests depends on the specified test mode. You can limit either the total number of
|
||||
requests or the total time for the benchmark, or both.
|
||||
</para>
|
||||
<para>
|
||||
Available test modes are implemented by compiled-in modules, and SysBench was designed to make adding new test modes
|
||||
an easy task. Each test mode may have additional (or workload-specific) options.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="links">
|
||||
<title>Links</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Home page</term>
|
||||
<listitem><para>
|
||||
<ulink url="http://sysbench.sf.net/">http://sysbench.sf.net/</ulink>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Download</term>
|
||||
<listitem><para>
|
||||
<ulink url="http://sf.net/projects/sysbench/">http://sf.net/projects/sysbench/</ulink>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Mailing lists</term>
|
||||
<listitem><para>
|
||||
<ulink url="http://sourceforge.net/mail/?group_id=102348">sysbench-general</ulink>
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Web forums</term>
|
||||
<listitem><para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<ulink url="http://sourceforge.net/forum/forum.php?forum_id=353125">Developers</ulink>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<ulink url="http://sourceforge.net/forum/forum.php?forum_id=353124">Help</ulink>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<ulink url="http://sourceforge.net/forum/forum.php?forum_id=353123">Open discussion</ulink>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Bug tracking system</term>
|
||||
<listitem><para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<ulink url="http://sourceforge.net/tracker/?atid=631676&group_id=102348&func=browse">
|
||||
Bug reports
|
||||
</ulink>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<ulink url="http://sourceforge.net/tracker/?atid=631679&group_id=102348&func=browse">
|
||||
Feature requests
|
||||
</ulink>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="install">
|
||||
<title>Installation</title>
|
||||
|
||||
<para>
|
||||
The following standart procedure will be sufficient to build SysBench in most cases:
|
||||
<synopsis>
|
||||
<command>./configure</command>
|
||||
<command>make</command>
|
||||
<command>make install</command>
|
||||
</synopsis>
|
||||
The above procedure will try to compile SysBench with MySQL support by default. If you have MySQL headers and libraries
|
||||
in non-standard locations (and no <command>mysql_config</command> can be found in the <constant>PATH</constant>
|
||||
environmental variable), then you can specify them explicitly with <option>--with-mysql-includes</option> and
|
||||
<option>--with-mysql-libs</option> options to <command>./configure</command>.
|
||||
</para>
|
||||
<para>
|
||||
To compile SysBench without MySQL support, use <option>--without-mysql</option>. In this case all database-related
|
||||
test modes will be unavailable.
|
||||
</para>
|
||||
<para>
|
||||
If you are running on a 64-bit platform, make sure to build a 64-bit binary by passing the proper target platform and compiler options to <command>configure</command> script. You can also consult the INSTALL file for generic installation instructions.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter id="usage">
|
||||
<title>Usage</title>
|
||||
<section id="general_syntax">
|
||||
<title>General syntax</title>
|
||||
|
||||
<para>
|
||||
The general syntax for SysBench is as follows:
|
||||
<screen>
|
||||
sysbench <emphasis>[common-options]</emphasis> --test=<emphasis>name</emphasis> <emphasis>[test-options]</emphasis> <emphasis>command</emphasis>
|
||||
</screen>
|
||||
See <xref linkend="common_options"/> for a description of common options and documentation for particular test mode for a list
|
||||
of test-specific options.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Below is a brief description of available commands and their purpose:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><command>prepare</command></term>
|
||||
<listitem>Performs preparative actions for those tests which need them, e.g. creating the necessary
|
||||
files on disk for the <option>fileio</option> test, or filling the test database for the
|
||||
<option>oltp</option> test.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>run</command></term>
|
||||
<listitem>Runs the actual test specified with the <option>--test=<emphasis>name</emphasis></option> option.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>cleanup</command></term>
|
||||
<listitem>Removes temporary data after the test run in those tests which create one.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>help</command></term>
|
||||
<listitem>Displays usage information for a test specified with the
|
||||
<option>--test=<emphasis>name</emphasis></option> option.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
Also you can use <command>sysbench help</command> to display the brief usage summary and the list of available test modes.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="common_options">
|
||||
<title>Common command line options</title>
|
||||
<para>
|
||||
The table below lists the supported common options, their descriptions and default values:
|
||||
</para>
|
||||
<informaltable frame="all">
|
||||
<tgroup cols='3'>
|
||||
<tbody>
|
||||
<row><entry><emphasis>Option</emphasis></entry><entry><emphasis>Description</emphasis></entry><entry><emphasis>Default value</emphasis></entry></row>
|
||||
<row><entry><option>--num-threads</option></entry><entry>The total number of worker threads to create</entry><entry>1</entry></row>
|
||||
<row><entry><option>--max-requests</option></entry><entry>Limit for total number of requests. 0 means unlimited</entry><entry>10000</entry></row>
|
||||
<row><entry><option>--max-time</option></entry><entry>Limit for total execution time in seconds. 0 (default) means unlimited</entry><entry>0</entry></row>
|
||||
<row><entry><option>--thread-stack-size</option></entry><entry>Size of stack for each thread</entry><entry>32K</entry></row>
|
||||
<row><entry><option>--init-rnd</option></entry><entry>Specifies if random numbers generator should be initialized from timer before the test start</entry><entry>off</entry></row>
|
||||
<row><entry><option>--test</option></entry><entry>Name of the test mode to run</entry><entry><emphasis>Required</emphasis></entry></row>
|
||||
<row><entry><option>--debug</option></entry><entry>Print more debug info</entry><entry>off</entry></row>
|
||||
<row><entry><option>--validate</option></entry><entry>Perform
|
||||
validation of test results where possible </entry><entry>off</entry></row>
|
||||
<row><entry><option>--help</option></entry><entry>Print help on general syntax or on a test mode specified with --test, and exit</entry><entry>off</entry></row>
|
||||
<row><entry><option>--verbosity</option></entry><entry>Verbosity level (0 - only critical messages, 5 - debug)</entry><entry>4</entry></row>
|
||||
<row><entry><option>--percentile</option></entry>
|
||||
<entry>
|
||||
<para>
|
||||
SysBench measures execution times for all processed
|
||||
requests to display statistical information like minimal, average and
|
||||
maximum execution time. For most benchmarks it is also useful to know
|
||||
a request execution time value matching some percentile (e.g. 95%
|
||||
percentile means we should drop 5% of the most long requests and
|
||||
choose the maximal value from the remaining ones).
|
||||
</para>
|
||||
<para>
|
||||
This option allows to specify a percentile rank of query
|
||||
execution times to count
|
||||
</para>
|
||||
</entry>
|
||||
<entry>95</entry></row>
|
||||
<row><entry><option>--batch</option></entry><entry>Dump current results periodically (see <xref linkend="batch_mode"/>)</entry><entry>off</entry></row>
|
||||
<row><entry><option>--batch-delay</option></entry><entry>Delay between batch dumps in secods (see <xref linkend="batch_mode"/>)</entry><entry>300</entry></row>
|
||||
<row><entry><option>--validate</option></entry><entry>Perform validation of test results where possible</entry><entry>off</entry></row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
Note that numerical values for all <emphasis>size</emphasis> options
|
||||
(like <option>--thread-stack-size</option> in this table) may be
|
||||
specified by appending the corresponding multiplicative suffix (K for
|
||||
kilobytes, M for megabytes, G for gigabytes and T for terabytes).
|
||||
</para>
|
||||
</section>
|
||||
<section id="batch_mode">
|
||||
<title>Batch mode</title>
|
||||
In some cases it is useful to have not only the final benchmarks
|
||||
statistics, but also periodical dumps of current stats to see how they
|
||||
change over the test run. For this purpose SysBench has a batch
|
||||
execution mode which is turned on by the <option>--batch</option>
|
||||
option. You may specify the delay in seconds between the consequent dumps with
|
||||
the <option>--batch-delay</option> option. Example:
|
||||
<screen>
|
||||
sysbench --batch --batch-delay=5 --test=threads run
|
||||
</screen>
|
||||
This will run SysBench in a threads test mode, with the current values
|
||||
of minimum, average, maximum and percentile for request execution
|
||||
times printed every 5 seconds.
|
||||
</section>
|
||||
|
||||
|
||||
<section id="test_modes">
|
||||
<title>Test modes</title>
|
||||
This section gives a detailed description for each test mode available
|
||||
in SysBench.
|
||||
|
||||
<section id="cpu_mode">
|
||||
<title><option>cpu</option></title>
|
||||
</section>
|
||||
<para>
|
||||
The <option>cpu</option> is one of the most simple benchmarks in
|
||||
SysBench. In this mode each request consists in calculation of prime numbers up to a value
|
||||
specified by the <option>--cpu-max-primes</option> option. All calculations are performed using 64-bit integers.
|
||||
</para>
|
||||
<para>
|
||||
Each thread executes the requests concurrently until either the total number of requests or the total execution
|
||||
time exceed the limits specified with the common command line options.
|
||||
</para>
|
||||
<para>
|
||||
Example:
|
||||
<screen>
|
||||
sysbench --test=cpu --cpu-max-prime=20000 run
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<section id="threads_mode">
|
||||
<title><option>threads</option></title>
|
||||
</section>
|
||||
<para>
|
||||
This test mode was written to benchmark scheduler performance, more specifically the cases
|
||||
when a scheduler has a large number of threads competing for some set of mutexes.
|
||||
</para>
|
||||
<para>
|
||||
SysBench creates a specified number of threads and a specified number of mutexes. Then each thread
|
||||
starts running the requests consisting of locking the mutex, yielding the CPU, so the thread is
|
||||
placed in the run queue by the scheduler, then unlocking the mutex when the thread is rescheduled back
|
||||
to execution. For each request, the above actions are run several times in a loop, so the more iterations
|
||||
is performed, the more concurrency is placed on each mutex.
|
||||
</para>
|
||||
<para>
|
||||
The following options are available in this test mode:
|
||||
<informaltable frame="all">
|
||||
<tgroup cols='3'>
|
||||
<tbody>
|
||||
<row><entry><emphasis>Option</emphasis></entry><entry><emphasis>Description</emphasis></entry><entry><emphasis>Default value</emphasis></entry></row>
|
||||
<row><entry><option>--thread-yields</option></entry><entry>Number of <emphasis>lock/yield/unlock</emphasis> loops to execute per each request</entry><entry>1000</entry></row>
|
||||
<row><entry><option>--thread-locks</option></entry><entry>Number of mutexes to create</entry><entry>8</entry></row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
<para>
|
||||
Example:
|
||||
<screen>
|
||||
sysbench --num-threads=64 --test=threads --thread-yields=100 --thread-locks=2 run
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
|
||||
<section id="mutex_mode">
|
||||
<title><option>mutex</option></title>
|
||||
</section>
|
||||
<para>
|
||||
This test mode was written to emulate a situation when all threads run concurrently most of the time,
|
||||
acquiring the mutex lock only for a short period of time (incrementing a global variable). So the purpose
|
||||
of this benchmarks is to examine the performance of mutex implementation.
|
||||
</para>
|
||||
<para>
|
||||
The following options are available in this test mode:
|
||||
<informaltable frame="all">
|
||||
<tgroup cols='3'>
|
||||
<tbody>
|
||||
<row><entry><emphasis>Option</emphasis></entry><entry><emphasis>Description</emphasis></entry><entry><emphasis>Default value</emphasis></entry></row>
|
||||
<row><entry><option>--mutex-num</option></entry><entry>Number of mutexes. The actual mutex to lock is chosen randomly before each lock</entry><entry>4096</entry></row>
|
||||
<row><entry><option>--mutex-locks</option></entry><entry>Number of mutex locks to acquire per each request</entry><entry>50000</entry></row>
|
||||
<row><entry><option>--mutex-loops</option></entry><entry>Number of iterations for an empty loop to perform before acquiring the lock</entry><entry>10000</entry></row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
|
||||
|
||||
<section id="memory_mode">
|
||||
<title><option>memory</option></title>
|
||||
<para>
|
||||
This test mode can be used to benchmark sequential memory reads or writes. Depending on command line
|
||||
options each thread can access either a global or a local block for all memory operations.
|
||||
</para>
|
||||
<para>
|
||||
The following options are available in this test mode:
|
||||
<informaltable frame="all">
|
||||
<tgroup cols='3'>
|
||||
<tbody>
|
||||
<row><entry><emphasis>Option</emphasis></entry><entry><emphasis>Description</emphasis></entry><entry><emphasis>Default value</emphasis></entry></row>
|
||||
<row><entry><option>--memory-block-size</option></entry><entry>Size of memory block to use</entry><entry>1K</entry></row>
|
||||
<row><entry><option>--memory-scope</option></entry><entry>
|
||||
Possible values: <option>global</option>, <option>local</option>. Specifies whether each thread will
|
||||
use a globally allocated memory block, or a local one.
|
||||
</entry><entry>global</entry></row>
|
||||
<row><entry><option>--memory-total-size</option></entry><entry>Total size of data to transfer</entry><entry>100G</entry></row>
|
||||
<row><entry><option>--memory-oper</option></entry><entry>
|
||||
Type of memory operations. Possible values: <option>read</option>, <option>write</option>.
|
||||
</entry><entry>100G</entry></row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="fileio_mode">
|
||||
<title><option>fileio</option></title>
|
||||
|
||||
<para>
|
||||
This test mode can be used to produce various kinds of file I/O workloads. At the <option>prepare</option>
|
||||
stage SysBench creates a specified number of files with a specified total size, then at the <option>run</option>
|
||||
stage, each thread performs specified I/O operations on this set of files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When the global <option>--validate</option> option is used with the <option>fileio</option> test mode, SysBench
|
||||
performs checksums validation on all data read from the disk. On each write operation the block is filled with random values,
|
||||
then the checksum is calculated
|
||||
and stored in the block along with the offset of this block within a file. On each read operation the block is validated
|
||||
by comparing the stored offset with the real offset, and the stored checksum with the real calculated checksum.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following I/O operations are supported:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><command>seqwr</command></term>
|
||||
<listitem>sequential write
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>seqrewr</command></term>
|
||||
<listitem>sequential rewrite
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>seqrd</command></term>
|
||||
<listitem>sequential read
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>rndrd</command></term>
|
||||
<listitem>random read
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>rndwr</command></term>
|
||||
<listitem>random write
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><command>rndrw</command></term>
|
||||
<listitem>combined random read/write
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Also, the following file access modes can be specified, if the underlying platform supports them:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Asynchronous I/O mode</term>
|
||||
<listitem>
|
||||
At the moment only Linux AIO implementation is supported. When running in asynchronous mode,
|
||||
SysBench queues a specified number of I/O requests using Linux AIO API, then waits for
|
||||
at least one of submitted requests to complete. After that a new series of I/O requests
|
||||
is submitted.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Slow <option>mmap()</option> mode</term>
|
||||
<listitem>In this mode SysBench will use <option>mmap</option>'ed I/O. However, a separate
|
||||
<option>mmap</option> will be used for each I/O request due to the limitation of 32-bit
|
||||
architectures (we cannot <option>mmap()</option> the whole file, as its size migth possibly
|
||||
exceed the maximum of 2 GB of the process address space).
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Fast <option>mmap()</option> mode</term>
|
||||
<listitem>On 64-bit architectures it is possible to <option>mmap()</option> the whole file
|
||||
into the process address space, avoiding the limitation of 2 GB on 32-bit platforms.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Using <option>fdatasync()</option> instead of <option>fsync()</option></term>
|
||||
Flush only data buffers, but not the metadata.
|
||||
<listitem>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Additional flags to <option>open(2)</option></term>
|
||||
<listitem>SysBench can use additional flags to <option>open(2)</option>, such as <option>O_SYNC</option>,
|
||||
<option>O_DSYNC</option> and <option>O_DIRECT</option>.
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
Below is a list of test-specific option for the <command>fileio</command> mode:
|
||||
|
||||
<informaltable frame="all">
|
||||
<tgroup cols='3'>
|
||||
<tbody>
|
||||
<row><entry><emphasis>Option</emphasis></entry><entry><emphasis>Description</emphasis></entry><entry><emphasis>Default value</emphasis></entry></row>
|
||||
<row><entry><option>--file-num</option></entry><entry>Number of files to create</entry><entry>128</entry></row>
|
||||
<row><entry><option>--file-block-size</option></entry><entry>
|
||||
Block size to use in all I/O operations
|
||||
</entry><entry>16K</entry></row>
|
||||
<row><entry><option>--file-total-size</option></entry><entry>Total size of files</entry><entry>2G</entry></row>
|
||||
<row><entry><option>--file-test-mode</option></entry><entry>
|
||||
Type of workload to produce. Possible values: <option>seqwr</option>, <option>seqrewr</option>,
|
||||
<option>seqrd</option>, <option>rndrd</option>, <option>rndwr</option>, <option>rndwr</option> (see above)
|
||||
</entry><entry><emphasis>required</emphasis></entry></row>
|
||||
<row><entry><option>--file-io-mode</option></entry><entry>
|
||||
I/O mode. Possible values: <option>sync</option>, <option>async</option>, <option>fastmmap</option>,
|
||||
<option>slowmmap</option> (only if supported by the platform, see above).
|
||||
</entry><entry>sync</entry></row>
|
||||
<row><entry><option>--file-async-backlog</option></entry><entry>
|
||||
Number of asynchronous operations to queue per thread (only for <option>--file-io-mode=async</option>, see above)
|
||||
</entry><entry>128</entry></row>
|
||||
<row><entry><option> --file-extra-flags</option></entry><entry>
|
||||
Additional flags to use with <option>open(2)</option>
|
||||
</entry><entry></entry></row>
|
||||
<row><entry><option>--file-fsync-freq</option></entry><entry>
|
||||
Do <option>fsync()</option> after this number of requests (0 - don't use <option>fsync()</option>)
|
||||
</entry><entry>100</entry></row>
|
||||
<row><entry><option>--file-fsync-all</option></entry><entry>
|
||||
Do <option>fsync()</option> after each write operation
|
||||
</entry><entry>no</entry></row>
|
||||
<row><entry><option>--file-fsync-end</option></entry><entry>
|
||||
Do <option>fsync()</option> at the end of the test
|
||||
</entry><entry>yes</entry></row>
|
||||
<row><entry><option>--file-fsync-mode</option></entry><entry>
|
||||
Which method to use for synchronization. Possible values: <option>fsync</option>, <option>fdatasync</option> (see above)
|
||||
</entry><entry>fsync</entry></row>
|
||||
<row><entry><option>--file-merged-requests</option></entry><entry>
|
||||
Merge at most this number of I/O requests if possible (0 - don't merge)
|
||||
</entry><entry>0</entry></row>
|
||||
<row><entry><option>--file-rw-ratio</option></entry><entry>
|
||||
reads/writes ration for combined random read/write test
|
||||
</entry><entry>1.5</entry></row>
|
||||
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Usage example:
|
||||
<screen>
|
||||
$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw prepare
|
||||
$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw run
|
||||
$ sysbench --num-threads=16 --test=fileio --file-total-size=3G --file-test-mode=rndrw cleanup
|
||||
</screen>
|
||||
In the above example the first command creates 128 files with the total size of 3 GB in the current directory, the
|
||||
second command runs the actual benchmark and displays the results upon completion, and the third one removes the files
|
||||
used for the test.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id="database_mode">
|
||||
<title><option>oltp</option></title>
|
||||
</section>
|
||||
<para>
|
||||
This test mode was written to benchmark a real database performance. At the <command>prepare</command> stage
|
||||
the following table is created in the specified database (<option>sbtest</option> by default):
|
||||
<screen>
|
||||
CREATE TABLE `sbtest` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`k` int(10) unsigned NOT NULL default '0',
|
||||
`c` char(120) NOT NULL default '',
|
||||
`pad` char(60) NOT NULL default '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `k` (`k`);
|
||||
</screen>
|
||||
Then this table is filled with a specified number of rows.
|
||||
</para>
|
||||
<para>
|
||||
The following execution modes are available at the <command>run</command> stage:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Simple</term>
|
||||
<listitem>
|
||||
<para>
|
||||
In this mode each thread runs simple queries of the following form:
|
||||
<screen> SELECT c FROM sbtest WHERE id=<emphasis>N</emphasis> </screen>
|
||||
where <emphasis>N</emphasis> takes a random value in range 1..<emphasis><table size></emphasis>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Advanced transactional</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Each thread performs transactions on the test table. If the test table and database support transactions
|
||||
(e.g. InnoDB engine in MySQL), then <option>BEGIN</option>/<option>COMMIT</option> statements will be used
|
||||
to start/stop a transaction. Otherwise, SysBench will use <option>LOCK TABLES</option>/<option>UNLOCK TABLES
|
||||
</option> statements (e.g. for MyISAM engine in MySQL). If some rows are deleted in a transaction,
|
||||
the same rows will be inserted within the same transaction, so this test mode does not destruct any data
|
||||
in the test table and can be run multiple times on the same table.
|
||||
</para>
|
||||
|
||||
Depending on the command line options, each transaction may contain the following statements:
|
||||
<itemizedlist>
|
||||
<listitem>Point queries: <screen>SELECT c FROM sbtest WHERE id=<emphasis>N</emphasis></screen></listitem>
|
||||
<listitem>
|
||||
Range queries: <screen>SELECT c FROM sbtest WHERE id BETWEEN <emphasis>N</emphasis> AND <emphasis>M</emphasis> </screen> </listitem>
|
||||
<listitem>
|
||||
Range SUM() queries: <screen>SELECT SUM(K) FROM sbtest WHERE id BETWEEN <emphasis>N</emphasis> and <emphasis>M</emphasis></screen></listitem>
|
||||
<listitem>Range ORDER BY queries:<screen>SELECT c FROM sbtest WHERE id between <emphasis>N</emphasis> and <emphasis>M</emphasis> ORDER BY c</screen></listitem>
|
||||
<listitem>Range DISTINCT queries:<screen>SELECT DISTINCT c FROM sbtest WHERE id BETWEEN <emphasis>N</emphasis> and <emphasis>M</emphasis> ORDER BY c</screen> </listitem>
|
||||
<listitem>UPDATEs on index column:<screen>UPDATE sbtest SET k=k+1 WHERE id=<emphasis>N</emphasis> </screen> </listitem>
|
||||
<listitem>UPDATEs on non-index column:<screen>UPDATE sbtest SET c=<emphasis>N</emphasis> WHERE id=<emphasis>M</emphasis> </screen> </listitem>
|
||||
<listitem>DELETE queries:<screen>DELETE FROM sbtest WHERE id=<emphasis>N</emphasis> </screen> </listitem>
|
||||
<listitem>INSERT queries:<screen>INSERT INTO sbtest VALUES (<emphasis>...</emphasis>) </screen> </listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
||||
<term>Non-transactional</term>
|
||||
<listitem>
|
||||
<para>
|
||||
This mode is similar to <command>Simple</command>, but you can also choose the query to run. Note that unlike the
|
||||
<command>Advanced transactional</command> mode, this one does not preserve the test table between requests, so
|
||||
you should recreate it with the appropriate <command>cleanup</command>/<command>prepare</command> commands between
|
||||
consecutive benchmarks.
|
||||
</para>
|
||||
<para>
|
||||
Below is a list of possible queries:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
Point queries:
|
||||
<screen>SELECT pad FROM sbtest WHERE id=<emphasis>N</emphasis></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
UPDATEs on index column:
|
||||
<screen>UPDATE sbtest SET k=k+1 WHERE id=<emphasis>N</emphasis></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
UPDATEs on non-index column:
|
||||
<screen>UPDATE sbtest SET c=<emphasis>N</emphasis> WHERE id=<emphasis>M</emphasis></screen>
|
||||
</listitem>
|
||||
<listitem>
|
||||
DELETE queries:
|
||||
<screen>DELETE FROM sbtest WHERE id=<emphasis>N</emphasis></screen>
|
||||
The generated row IDs are unique over each test run, so no row is deleted twice.
|
||||
</listitem>
|
||||
<listitem>
|
||||
INSERT queries:
|
||||
<screen>INSERT INTO sbtest (k, c, pad) VALUES(<emphasis>N</emphasis>, <emphasis>M</emphasis>, <emphasis>S</emphasis>)</screen>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Below is a list of options available for the database test mode:
|
||||
|
||||
<informaltable frame="all">
|
||||
<tgroup cols='3'>
|
||||
<tbody>
|
||||
<row><entry><emphasis>Option</emphasis></entry><entry><emphasis>Description</emphasis></entry><entry><emphasis>Default value</emphasis></entry></row>
|
||||
<row><entry><option>--oltp-test-mode</option></entry><entry>Execution mode (see above). Possible values: <option>simpe</option> (simple), <option>complex</option> (advanced transactional) and <option>nontrx</option> (non-transactional)</entry><entry><option>complex</option></entry></row>
|
||||
<row><entry><option>--oltp-read-only</option></entry><entry>
|
||||
Read-only mode. No <option>UPDATE</option>, <option>DELETE</option> or <option>INSERT</option> queries will be performed.
|
||||
</entry><entry>off</entry></row>
|
||||
<row><entry><option>--oltp-range-size</option></entry><entry>Range size for range queries</entry><entry>100</entry></row>
|
||||
<row><entry><option>--oltp-point-selects</option></entry><entry>
|
||||
Number of point select queries in a single transaction
|
||||
</entry><entry>10</entry></row>
|
||||
<row><entry><option>--oltp-simple-ranges</option></entry><entry>
|
||||
Number of simple range queries in a single transaction
|
||||
</entry><entry>1</entry></row>
|
||||
<row><entry><option>--oltp-sum-ranges</option></entry><entry>
|
||||
Number of SUM range queries in a single transaction
|
||||
</entry><entry>1</entry></row>
|
||||
<row><entry><option>--oltp-order-ranges</option></entry><entry>
|
||||
Number of ORDER range queries in a single transaction
|
||||
</entry><entry>1</entry></row>
|
||||
<row><entry><option>--oltp-distinct-ranges</option></entry><entry>
|
||||
Number of DISTINCT range queries in a single transaction
|
||||
</entry><entry>1</entry></row>
|
||||
<row><entry><option>--oltp-index-updates</option></entry><entry>
|
||||
Number of index UPDATE queries in a single transaction
|
||||
</entry><entry>1</entry></row>
|
||||
<row><entry><option>--oltp-non-index-updates</option></entry><entry>
|
||||
Number of non-index UPDATE queries in a single transaction
|
||||
</entry><entry>1</entry></row>
|
||||
<row><entry><option> --oltp-nontrx-mode</option></entry><entry>
|
||||
Type of queries for non-transactional execution mode (see above). Possible values: <option>select</option>,
|
||||
<option>update_key</option>, <option>update_nokey</option>, <option>insert</option>, <option>delete</option>.
|
||||
</entry><entry><option>select</option></entry></row>
|
||||
<row><entry><option>--oltp-connect-delay</option></entry><entry>
|
||||
Time in microseconds to sleep after each connection to database
|
||||
</entry><entry>10000</entry></row>
|
||||
<row><entry><option>--oltp-user-delay-min</option></entry><entry>
|
||||
Minimum time in microseconds to sleep after each request
|
||||
</entry><entry>0</entry></row>
|
||||
<row><entry><option>--oltp-user-delay-max</option></entry><entry>
|
||||
Maximum time in microseconds to sleep after each request
|
||||
</entry><entry>0</entry></row>
|
||||
<row><entry><option>--oltp-table-name</option></entry><entry>
|
||||
Name of the test table
|
||||
</entry><entry>sbtest</entry></row>
|
||||
<row><entry><option>--oltp-table-size</option></entry><entry>
|
||||
Number of rows in the test table
|
||||
</entry><entry>10000</entry></row>
|
||||
<row><entry><option>--oltp-dist-type</option></entry><entry>
|
||||
<para>
|
||||
Distribution of random numbers. Possible values: <option>uniform</option> (uniform distribution),
|
||||
<option>gauss</option> (gaussian distribution) and <option>special</option>.
|
||||
</para>
|
||||
<para>
|
||||
With special distribution a specified percent of numbers is generated in a specified percent of cases (see options below).
|
||||
</para>
|
||||
</entry><entry><option>special</option></entry></row>
|
||||
<row><entry><option>--oltp-dist-pct</option></entry><entry>
|
||||
Percentage of values to be treated as 'special' (for special distribution)
|
||||
</entry><entry>1</entry></row>
|
||||
<row><entry><option>--oltp-dist-res</option></entry><entry>
|
||||
Percentage of cases when 'special' values are generated (for special distribution)
|
||||
</entry><entry>75</entry></row>
|
||||
<row><entry><option>--db-ps-mode</option></entry><entry>
|
||||
If the database driver supports Prepared Statements API, SysBench will use server-side prepared statements for all queries
|
||||
where possible. Otherwise, client-side (or emulated) prepared statements will be used. This option allows to force using
|
||||
emulation even when PS API is available. Possible values: <option>disable</option>, <option>auto</option>.
|
||||
</entry><entry><option>auto</option></entry></row>
|
||||
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Also, each database driver may provide its own options. Currently only MySQL driver is available. Below is a list of MySQL-specific options:
|
||||
|
||||
<informaltable frame="all">
|
||||
<tgroup cols='3'>
|
||||
<tbody>
|
||||
<row><entry><emphasis>Option</emphasis></entry><entry><emphasis>Description</emphasis></entry><entry><emphasis>Default value</emphasis></entry></row>
|
||||
<row><entry><option>--mysql-host</option></entry><entry>MySQL server host</entry><entry><option>localhost</option></entry></row>
|
||||
<row><entry><option>--mysql-port</option></entry><entry>
|
||||
MySQL server port (in case TCP/IP connection should be used)
|
||||
</entry><entry>3306</entry></row>
|
||||
<row><entry><option>--mysql-socket</option></entry><entry>Unix socket file to communicate with the MySQL server</entry><entry></entry></row>
|
||||
<row><entry><option>--mysql-user</option></entry><entry>
|
||||
MySQL user
|
||||
</entry><entry>user</entry></row>
|
||||
<row><entry><option>--mysql-password</option></entry><entry>
|
||||
MySQL password
|
||||
</entry><entry></entry></row>
|
||||
<row><entry><option>--mysql-db</option></entry><entry>
|
||||
MySQL database name. Note SysBench will not automatically create this database. You should create it manually and grant
|
||||
the appropriate privileges to a user which will be used to access the test table.
|
||||
</entry><entry>sbtest</entry></row>
|
||||
<row><entry><option>--mysql-table-type</option></entry><entry>
|
||||
Type of the test table. Possible values: <option>myisam</option>, <option>innodb</option>, <option>heap</option>,
|
||||
<option>ndbcluster</option>, <option>bdb</option>.
|
||||
</entry><entry>innodb</entry></row>
|
||||
<row><entry><option>--myisam-max-rows</option></entry><entry>
|
||||
MAX_ROWS option for MyISAM tables (required for big tables)
|
||||
</entry><entry>1000000</entry></row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Example usage:
|
||||
<screen>
|
||||
$ sysbench --test=oltp --mysql-table-type=myisam --oltp-table-size=1000000 --mysql-socket=/tmp/mysql.sock prepare
|
||||
$ sysbench --num-threads=16 --max-requests=100000 --test=oltp --oltp-table-size=1000000 --mysql-socket=/tmp/mysql.sock --oltp-read-only run
|
||||
</screen>
|
||||
The first command will create a MyISAM table 'sbtest' in a database 'sbtest' on a MySQL server using <option>/tmp/mysql.sock</option> socket, then fill this table with 1M records. The second command will run the actual benchmark with 16 client threads, limiting the total number of request by 100,000.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
</book>
|
||||
16
doc/xsl/catalog.xml.in
Normal file
16
doc/xsl/catalog.xml.in
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE catalog PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
|
||||
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
|
||||
|
||||
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
|
||||
<nextCatalog catalog="@XML_CATALOG@" />
|
||||
|
||||
@CAT_ENTRY_START@
|
||||
<uri name="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
|
||||
uri="@DOCBOOK_ROOT@/xhtml/docbook.xsl"/>
|
||||
<uri name="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"
|
||||
uri="@DOCBOOK_ROOT@/xhtml/chunk.xsl"/>
|
||||
@CAT_ENTRY_END@
|
||||
|
||||
<uri name="xsl/xhtml-common.xsl" uri="@top_srcdir@/doc/xsl/xhtml-common.xsl"/>
|
||||
</catalog>
|
||||
52
doc/xsl/xhtml-chunk.xsl
Normal file
52
doc/xsl/xhtml-chunk.xsl
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
|
||||
<xsl:import href="xhtml-common.xsl"/>
|
||||
|
||||
<xsl:template name="process-chunk">
|
||||
<xsl:param name="prev" select="."/>
|
||||
<xsl:param name="next" select="."/>
|
||||
|
||||
<xsl:variable name="ischunk">
|
||||
<xsl:call-template name="chunk"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="chunkfn">
|
||||
<xsl:if test="$ischunk='1'">
|
||||
<xsl:apply-templates mode="chunk-filename" select="."/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$ischunk='0'">
|
||||
<xsl:message>
|
||||
<xsl:text>Error </xsl:text>
|
||||
<xsl:value-of select="name(.)"/>
|
||||
<xsl:text> is not a chunk!</xsl:text>
|
||||
</xsl:message>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:variable name="filename">
|
||||
<xsl:call-template name="make-relative-filename">
|
||||
<xsl:with-param name="base.dir" select="$base.dir"/>
|
||||
<xsl:with-param name="base.name" select="$chunkfn"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- FIXME: use Strict when the problems with width on td/th are
|
||||
sorted out. Not yet. -->
|
||||
<xsl:call-template name="write.chunk.with.doctype">
|
||||
<xsl:with-param name="filename" select="$filename"/>
|
||||
<xsl:with-param name="indent" select="'yes'"/>
|
||||
<xsl:with-param name="doctype-public">-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:with-param>
|
||||
<xsl:with-param name="doctype-system">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:with-param>
|
||||
<xsl:with-param name="content">
|
||||
<xsl:call-template name="chunk-element-content">
|
||||
<xsl:with-param name="prev" select="$prev"/>
|
||||
<xsl:with-param name="next" select="$next"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
50
doc/xsl/xhtml-common.xsl
Normal file
50
doc/xsl/xhtml-common.xsl
Normal file
@ -0,0 +1,50 @@
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:param name="use.id.as.filename" select="1"/>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="chapter.autolabel" select="1"/>
|
||||
<xsl:param name="ulink.target" select="''"/>
|
||||
|
||||
<!-- Custom template for programlisting, screen and synopsis to generate a gray
|
||||
background to the item. -->
|
||||
<xsl:template match="programlisting|screen|synopsis">
|
||||
<xsl:param name="suppress-numbers" select="'0'"/>
|
||||
<xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
|
||||
<xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
|
||||
|
||||
<xsl:if test="@id">
|
||||
<a href="{$id}"/>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$suppress-numbers = '0'
|
||||
and @linenumbering = 'numbered'
|
||||
and $use.extensions != '0'
|
||||
and $linenumbering.extension != '0'">
|
||||
<xsl:variable name="rtf">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:variable>
|
||||
<!-- Change the color background color in the line below. -->
|
||||
<table border="0" style="background: #E0E0E0;" width="90%">
|
||||
<tr><td>
|
||||
<pre class="{name(.)}">
|
||||
<xsl:call-template name="number.rtf.lines">
|
||||
<xsl:with-param name="rtf" select="$rtf"/>
|
||||
</xsl:call-template>
|
||||
</pre>
|
||||
</td></tr></table>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- Change the color background color in the line below. -->
|
||||
<table border="0" style="background: #E0E0E0;" width="90%">
|
||||
<tr><td>
|
||||
<pre class="{name(.)}">
|
||||
<xsl:apply-templates/>
|
||||
</pre>
|
||||
</td></tr></table>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
13
doc/xsl/xhtml.xsl
Normal file
13
doc/xsl/xhtml.xsl
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" version="1.0">
|
||||
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/>
|
||||
<xsl:import href="xhtml-common.xsl"/>
|
||||
|
||||
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
||||
/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
294
install-sh
Executable file
294
install-sh
Executable file
@ -0,0 +1,294 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
#
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd=$cpprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "$0: no input file specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d "$dst" ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f "$src" ] || [ -d "$src" ]
|
||||
then
|
||||
:
|
||||
else
|
||||
echo "$0: $src does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "$0: no destination specified" >&2
|
||||
exit 1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d "$dst" ]
|
||||
then
|
||||
dst=$dst/`basename "$src"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
|
||||
if [ ! -d "$pathcomp" ] ;
|
||||
then
|
||||
$mkdirprog "$pathcomp"
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd "$dst" &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
dstfile=`basename "$dst" $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename "$dst"`
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up temp files at exit.
|
||||
|
||||
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
|
||||
|
||||
# Now remove or move aside any old file at destination location. We try this
|
||||
# two ways since rm can't unlink itself on some systems and the destination
|
||||
# file might be busy for other reasons. In this case, the final cleanup
|
||||
# might fail but the new file should still install successfully.
|
||||
|
||||
{
|
||||
if [ -f "$dstdir/$dstfile" ]
|
||||
then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
|
||||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
|
||||
{
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
|
||||
fi &&
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
|
||||
{
|
||||
(exit 0); exit
|
||||
}
|
||||
336
missing
Executable file
336
missing
Executable file
@ -0,0 +1,336 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing 0.4 - GNU automake"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
111
mkinstalldirs
Executable file
111
mkinstalldirs
Executable file
@ -0,0 +1,111 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
errstatus=0
|
||||
dirmode=""
|
||||
|
||||
usage="\
|
||||
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
|
||||
|
||||
# process command line arguments
|
||||
while test $# -gt 0 ; do
|
||||
case $1 in
|
||||
-h | --help | --h*) # -h for help
|
||||
echo "$usage" 1>&2
|
||||
exit 0
|
||||
;;
|
||||
-m) # -m PERM arg
|
||||
shift
|
||||
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
|
||||
dirmode=$1
|
||||
shift
|
||||
;;
|
||||
--) # stop option processing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*) # unknown option
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*) # first non-opt arg
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for file
|
||||
do
|
||||
if test -d "$file"; then
|
||||
shift
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) exit 0 ;;
|
||||
esac
|
||||
|
||||
case $dirmode in
|
||||
'')
|
||||
if mkdir -p -- . 2>/dev/null; then
|
||||
echo "mkdir -p -- $*"
|
||||
exec mkdir -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
|
||||
echo "mkdir -m $dirmode -p -- $*"
|
||||
exec mkdir -m "$dirmode" -p -- "$@"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case $pathcomp in
|
||||
-*) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp"
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
else
|
||||
if test ! -z "$dirmode"; then
|
||||
echo "chmod $dirmode $pathcomp"
|
||||
lasterr=""
|
||||
chmod "$dirmode" "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -z "$lasterr"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# End:
|
||||
# mkinstalldirs ends here
|
||||
18
scripts/Makefile.am
Normal file
18
scripts/Makefile.am
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
bin_SCRIPTS = sb_run.sh sb_test_ps.sh
|
||||
EXTRA_DIST = sb_run.sh sb_test_ps.sh
|
||||
371
scripts/Makefile.in
Normal file
371
scripts/Makefile.in
Normal file
@ -0,0 +1,371 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = scripts
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
bin_SCRIPTS = sb_run.sh sb_test_ps.sh
|
||||
EXTRA_DIST = sb_run.sh sb_test_ps.sh
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign scripts/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign scripts/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(SCRIPTS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-binSCRIPTS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-info-am
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-binSCRIPTS install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am uninstall-binSCRIPTS uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
104
scripts/sb_run.sh
Executable file
104
scripts/sb_run.sh
Executable file
@ -0,0 +1,104 @@
|
||||
#!/bin/bash
|
||||
# File: sb_run.sh
|
||||
#
|
||||
# Copyright (C) 2004 Alexey Kopytov & MySQL AB
|
||||
|
||||
sbname=sysbench
|
||||
|
||||
#Install signals handlers
|
||||
trap 'echo "Got SIGINT, exiting..."; \
|
||||
killall vmstat; killall iostat; killall mpstat' INT
|
||||
|
||||
trap 'echo "Got SIGTERM, exiting..."; \
|
||||
killall vmstat; killall iostat; killall mpstat' TERM
|
||||
|
||||
|
||||
# First try to find SysBench in the current dir
|
||||
found=""
|
||||
progname="$0"
|
||||
curdir=`dirname "$progname"`
|
||||
sbpath="$curdir/$sbname"
|
||||
|
||||
# Try to find SysBench in the current source tree
|
||||
if test -x "$sbpath"; then
|
||||
found=1
|
||||
else
|
||||
topsrcdir="$curdir/../"
|
||||
sbpath="$topsrcdir/sysbench/$sbname"
|
||||
fi
|
||||
|
||||
# Try to find SysBench in $PATH
|
||||
if test -z "$found" -a -x "$sbpath"; then
|
||||
found=1
|
||||
else
|
||||
sbpath=`which "$sbname" 2>/dev/null`
|
||||
fi
|
||||
|
||||
if test -z "$found" -a -n "$sbpath" -a -x "$sbpath"; then
|
||||
found=1
|
||||
fi
|
||||
|
||||
if test -z "$found"; then
|
||||
echo "$sbname binary not found, exiting..."
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
UPDATES_INTERVAL=5
|
||||
sbargs=""
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-u)
|
||||
UPDATES_INTERVAL=$2
|
||||
shift 2
|
||||
;;
|
||||
-c)
|
||||
COMMENT="$2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
sbargs="$sbargs $1"
|
||||
shift 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Determine run number for the output directory
|
||||
RUN_NUMBER=1
|
||||
if [ -f ".run_number" ]; then
|
||||
read RUN_NUMBER < .run_number
|
||||
fi
|
||||
|
||||
if [ $RUN_NUMBER -eq -1 ]; then
|
||||
RUN_NUMBER=0
|
||||
fi
|
||||
|
||||
# Create the output directory
|
||||
OUTPUT_DIR=output/$RUN_NUMBER
|
||||
mkdir -p $OUTPUT_DIR
|
||||
|
||||
# Update the run number
|
||||
RUN_NUMBER=`expr $RUN_NUMBER + 1`
|
||||
echo $RUN_NUMBER > .run_number
|
||||
|
||||
# Start vmstat
|
||||
nohup vmstat -n $UPDATES_INTERVAL >$OUTPUT_DIR/vmstat.out 2>&1 &
|
||||
|
||||
# Start iostat
|
||||
nohup iostat $UPDATES_INTERVAL >$OUTPUT_DIR/iostat.out 2>&1 &
|
||||
|
||||
# Start mpstat
|
||||
nohup mpstat $UPDATES_INTERVAL >$OUTPUT_DIR/mpstat.out 2>&1 &
|
||||
|
||||
cat >$OUTPUT_DIR/desc.txt <<EOF
|
||||
$sbname command line args: $sbpath $sbargs
|
||||
comment: $COMMENT
|
||||
EOF
|
||||
|
||||
|
||||
echo "Running $sbpath $sbargs"
|
||||
|
||||
$sbpath $sbargs >$OUTPUT_DIR/sysbench.out 2>&1
|
||||
|
||||
killall vmstat; killall iostat; killall mpstat
|
||||
105
scripts/sb_test_ps.sh
Executable file
105
scripts/sb_test_ps.sh
Executable file
@ -0,0 +1,105 @@
|
||||
#!/bin/bash
|
||||
# File: sb_test_ps.sh
|
||||
#
|
||||
# Copyright (C) 2004 Alexey Kopytov & MySQL AB
|
||||
|
||||
NUM_THREADS=4
|
||||
|
||||
|
||||
progname="$0"
|
||||
curdir=`dirname "$progname"`
|
||||
sbrun="$curdir/sb_run.sh"
|
||||
|
||||
clean_vars()
|
||||
{
|
||||
point_selects=0
|
||||
simple_ranges=0
|
||||
sum_ranges=0
|
||||
order_ranges=0
|
||||
distinct_ranges=0
|
||||
index_updates=0
|
||||
non_index_updates=0
|
||||
}
|
||||
|
||||
run_test()
|
||||
{
|
||||
tname="$1"
|
||||
sbargs="--num-threads=$NUM_THREADS --max-requests=0 --max-time=60 \
|
||||
--test=oltp --oltp-table-size=100000 --mysql-table-type=myisam \
|
||||
--oltp-point-selects=$point_selects \
|
||||
--oltp-simple-ranges=$simple_ranges
|
||||
--oltp-sum-ranges=$sum_ranges
|
||||
--oltp-order-ranges=$order_ranges
|
||||
--oltp-distinct-ranges=$distinct_ranges
|
||||
--oltp-index-updates=$index_updates
|
||||
--oltp-non-index-updates=$non_index_updates"
|
||||
|
||||
echo -e "\n*** Running test for $tname (client-side PS) ***\n"
|
||||
sysbench $sbargs prepare >/dev/null
|
||||
sb_run.sh -c "$tname (client-side PS)" $sbargs --db-ps-mode=disable run
|
||||
sysbench $sbargs cleanup >/dev/null
|
||||
|
||||
echo -e "\n*** Running test for $tname (server-side PS)... ***\n"
|
||||
sysbench $sbargs prepare >/dev/null
|
||||
sb_run.sh -c "$tname (server-side PS)" $sbargs run
|
||||
sysbench $sbargs cleanup >/dev/null
|
||||
}
|
||||
|
||||
collect_results()
|
||||
{
|
||||
for dir in output/*; do
|
||||
trans=`grep "transactions:" $dir/sysbench.out | sed -e 's/.*(\([0-9.]\+\).*)/\1/g'`
|
||||
comment=`grep "comment:" $dir/desc.txt | sed -e 's/comment: //'`
|
||||
echo "$comment: $trans"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Run point selects test
|
||||
clean_vars
|
||||
point_selects=1
|
||||
run_test "point_selects"
|
||||
|
||||
# Run simple ranges test
|
||||
clean_vars
|
||||
simple_ranges=1
|
||||
run_test "simple_ranges"
|
||||
|
||||
# Run sum ranges test
|
||||
clean_vars
|
||||
sum_ranges=1
|
||||
run_test "sum_ranges"
|
||||
|
||||
# Run order order ranges test
|
||||
clean_vars
|
||||
order_ranges=1
|
||||
run_test "order_ranges"
|
||||
|
||||
# Run distinct ranges test
|
||||
clean_vars
|
||||
distinct_ranges=1
|
||||
run_test "distinct_ranges"
|
||||
|
||||
# Run index updates test
|
||||
clean_vars
|
||||
index_updates=1
|
||||
run_test "index_updates"
|
||||
|
||||
# Run non-index updates test
|
||||
clean_vars
|
||||
non_index_updates=1
|
||||
run_test "non_index_updates"
|
||||
|
||||
# Run complex test
|
||||
clean_vars
|
||||
point_selects=10
|
||||
simple_ranges=1
|
||||
sum_ranges=1
|
||||
order_ranges=1
|
||||
distinct_ranges=1
|
||||
index_updates=1
|
||||
non_index_updates=1
|
||||
run_test "complex"
|
||||
|
||||
# Collect the results
|
||||
collect_results | sort
|
||||
42
sysbench/Makefile.am
Normal file
42
sysbench/Makefile.am
Normal file
@ -0,0 +1,42 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SUBDIRS = drivers tests .
|
||||
|
||||
bin_PROGRAMS = sysbench
|
||||
|
||||
# The following check will be extended as new database drivers will be added
|
||||
if USE_MYSQL
|
||||
mysql_ldadd = drivers/mysql/libsbmysql.a $(MYSQL_LIBS)
|
||||
mysql_ldflags = -static
|
||||
endif
|
||||
|
||||
if USE_ORACLE
|
||||
ora_ldadd = drivers/oracle/libsboracle.a $(ORA_LIBS)
|
||||
endif
|
||||
|
||||
if USE_PGSQL
|
||||
pgsql_ldadd = drivers/pgsql/libsbpgsql.a $(PGSQL_LIBS)
|
||||
endif
|
||||
|
||||
sysbench_SOURCES = sysbench.c sysbench.h sb_timer.c sb_timer.h \
|
||||
sb_options.c sb_options.h sb_logger.c sb_logger.h sb_list.h db_driver.h \
|
||||
db_driver.c
|
||||
|
||||
sysbench_LDADD = tests/fileio/libsbfileio.a tests/threads/libsbthreads.a \
|
||||
tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a \
|
||||
tests/mutex/libsbmutex.a $(mysql_ldadd) $(pgsql_ldadd) $(ora_ldadd)
|
||||
sysbench_LDFLAGS = $(mysql_ldflags) $(pgsql_ldflags) $(ora_ldflags)
|
||||
625
sysbench/Makefile.in
Normal file
625
sysbench/Makefile.in
Normal file
@ -0,0 +1,625 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SOURCES = $(sysbench_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = sysbench$(EXEEXT)
|
||||
subdir = sysbench
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am__sysbench_SOURCES_DIST = sysbench.c sysbench.h sb_timer.c \
|
||||
sb_timer.h sb_options.c sb_options.h sb_logger.c sb_logger.h \
|
||||
sb_list.h db_driver.h db_driver.c
|
||||
@USE_MYSQL_FALSE@am_sysbench_OBJECTS = sysbench.$(OBJEXT) \
|
||||
@USE_MYSQL_FALSE@ sb_timer.$(OBJEXT) sb_options.$(OBJEXT) \
|
||||
@USE_MYSQL_FALSE@ sb_logger.$(OBJEXT)
|
||||
@USE_MYSQL_TRUE@am_sysbench_OBJECTS = sysbench.$(OBJEXT) \
|
||||
@USE_MYSQL_TRUE@ sb_timer.$(OBJEXT) sb_options.$(OBJEXT) \
|
||||
@USE_MYSQL_TRUE@ sb_logger.$(OBJEXT) db_driver.$(OBJEXT)
|
||||
sysbench_OBJECTS = $(am_sysbench_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
@USE_MYSQL_FALSE@sysbench_DEPENDENCIES = tests/fileio/libsbfileio.a \
|
||||
@USE_MYSQL_FALSE@ tests/threads/libsbthreads.a \
|
||||
@USE_MYSQL_FALSE@ tests/memory/libsbmemory.a \
|
||||
@USE_MYSQL_FALSE@ tests/cpu/libsbcpu.a tests/oltp/libsboltp.a \
|
||||
@USE_MYSQL_FALSE@ tests/mutex/libsbmutex.a
|
||||
@USE_MYSQL_TRUE@sysbench_DEPENDENCIES = tests/fileio/libsbfileio.a \
|
||||
@USE_MYSQL_TRUE@ tests/threads/libsbthreads.a \
|
||||
@USE_MYSQL_TRUE@ tests/memory/libsbmemory.a \
|
||||
@USE_MYSQL_TRUE@ tests/cpu/libsbcpu.a tests/oltp/libsboltp.a \
|
||||
@USE_MYSQL_TRUE@ tests/mutex/libsbmutex.a \
|
||||
@USE_MYSQL_TRUE@ drivers/mysql/libsbmysql.a \
|
||||
@USE_MYSQL_TRUE@ $(am__DEPENDENCIES_1)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/db_driver.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sb_logger.Po ./$(DEPDIR)/sb_options.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/sb_timer.Po ./$(DEPDIR)/sysbench.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(sysbench_SOURCES)
|
||||
DIST_SOURCES = $(am__sysbench_SOURCES_DIST)
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
SUBDIRS = drivers tests .
|
||||
@USE_MYSQL_FALSE@sysbench_SOURCES = sysbench.c sysbench.h sb_timer.c sb_timer.h \
|
||||
@USE_MYSQL_FALSE@sb_options.c sb_options.h sb_logger.c sb_logger.h sb_list.h
|
||||
|
||||
|
||||
# The following check will be extended as new database drivers will be added
|
||||
@USE_MYSQL_TRUE@sysbench_SOURCES = sysbench.c sysbench.h sb_timer.c sb_timer.h \
|
||||
@USE_MYSQL_TRUE@sb_options.c sb_options.h sb_logger.c sb_logger.h sb_list.h db_driver.h \
|
||||
@USE_MYSQL_TRUE@db_driver.c
|
||||
|
||||
@USE_MYSQL_FALSE@sysbench_LDADD = tests/fileio/libsbfileio.a tests/threads/libsbthreads.a \
|
||||
@USE_MYSQL_FALSE@ tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a \
|
||||
@USE_MYSQL_FALSE@ tests/mutex/libsbmutex.a
|
||||
|
||||
@USE_MYSQL_TRUE@sysbench_LDADD = tests/fileio/libsbfileio.a tests/threads/libsbthreads.a \
|
||||
@USE_MYSQL_TRUE@ tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a \
|
||||
@USE_MYSQL_TRUE@ tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a $(MYSQL_LIBS)
|
||||
|
||||
@USE_MYSQL_TRUE@sysbench_LDFLAGS = -static
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sysbench/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign sysbench/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
sysbench$(EXEEXT): $(sysbench_OBJECTS) $(sysbench_DEPENDENCIES)
|
||||
@rm -f sysbench$(EXEEXT)
|
||||
$(LINK) $(sysbench_LDFLAGS) $(sysbench_OBJECTS) $(sysbench_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db_driver.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sb_logger.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sb_options.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sb_timer.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysbench.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| mkdir "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="../$(top_distdir)" \
|
||||
distdir="../$(distdir)/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-binPROGRAMS clean-generic clean-libtool \
|
||||
clean-recursive ctags ctags-recursive distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-exec install-exec-am \
|
||||
install-info install-info-am install-man install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
|
||||
pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
586
sysbench/db_driver.c
Normal file
586
sysbench/db_driver.c
Normal file
@ -0,0 +1,586 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "db_driver.h"
|
||||
#include "sb_list.h"
|
||||
|
||||
|
||||
/* Global variables */
|
||||
|
||||
db_globals_t db_globals;
|
||||
|
||||
|
||||
/* Static variables */
|
||||
|
||||
static sb_list_t drivers; /* list of available DB drivers */
|
||||
|
||||
/* DB drivers registrars */
|
||||
|
||||
#ifdef USE_MYSQL
|
||||
int register_driver_mysql(sb_list_t *);
|
||||
#endif
|
||||
|
||||
#ifdef USE_ORACLE
|
||||
int register_driver_oracle(sb_list_t *);
|
||||
#endif
|
||||
|
||||
#ifdef USE_PGSQL
|
||||
int register_driver_pgsql(sb_list_t *);
|
||||
#endif
|
||||
|
||||
/* Static functions */
|
||||
|
||||
static int db_parse_arguments(void);
|
||||
db_error_t db_do_query(db_conn_t *, const char *, db_result_set_t *);
|
||||
static void db_free_row(db_row_t *);
|
||||
|
||||
/* DB layer arguments */
|
||||
|
||||
static sb_arg_t db_args[] =
|
||||
{
|
||||
{
|
||||
"db-driver",
|
||||
"specifies database driver to use ('help' to get list of available drivers)",
|
||||
SB_ARG_TYPE_STRING, NULL
|
||||
},
|
||||
{
|
||||
"db-ps-mode", "prepared statements usage mode {auto, disable}",
|
||||
SB_ARG_TYPE_STRING, "auto"
|
||||
},
|
||||
|
||||
{NULL, NULL, SB_ARG_TYPE_NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
/* Register available database drivers and command line arguments */
|
||||
|
||||
|
||||
int db_register(void)
|
||||
{
|
||||
sb_list_item_t *pos;
|
||||
db_driver_t *drv;
|
||||
|
||||
/* Register database drivers */
|
||||
SB_LIST_INIT(&drivers);
|
||||
#ifdef USE_MYSQL
|
||||
register_driver_mysql(&drivers);
|
||||
#endif
|
||||
#ifdef USE_ORACLE
|
||||
register_driver_oracle(&drivers);
|
||||
#endif
|
||||
#ifdef USE_PGSQL
|
||||
register_driver_pgsql(&drivers);
|
||||
#endif
|
||||
|
||||
/* Register command line options for each driver */
|
||||
SB_LIST_FOR_EACH(pos, &drivers)
|
||||
{
|
||||
drv = SB_LIST_ENTRY(pos, db_driver_t, listitem);
|
||||
if (drv->args != NULL)
|
||||
sb_register_arg_set(drv->args);
|
||||
}
|
||||
/* Register general command line arguments for DB API */
|
||||
sb_register_arg_set(db_args);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Print list of available drivers and their options */
|
||||
|
||||
|
||||
void db_print_help(void)
|
||||
{
|
||||
sb_list_item_t *pos;
|
||||
db_driver_t *drv;
|
||||
|
||||
log_text(LOG_NOTICE, "General database options:\n");
|
||||
sb_print_options(db_args);
|
||||
log_text(LOG_NOTICE, "");
|
||||
|
||||
log_text(LOG_NOTICE, "Compiled-in database drivers:");
|
||||
SB_LIST_FOR_EACH(pos, &drivers)
|
||||
{
|
||||
drv = SB_LIST_ENTRY(pos, db_driver_t, listitem);
|
||||
log_text(LOG_NOTICE, " %s - %s", drv->sname, drv->lname);
|
||||
}
|
||||
log_text(LOG_NOTICE, "");
|
||||
SB_LIST_FOR_EACH(pos, &drivers)
|
||||
{
|
||||
drv = SB_LIST_ENTRY(pos, db_driver_t, listitem);
|
||||
log_text(LOG_NOTICE, "%s options:", drv->sname);
|
||||
sb_print_options(drv->args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Initialize a driver specified by 'name' and return a handle to it
|
||||
If NULL is passed as a name, then use the driver passed in --db-driver
|
||||
command line option
|
||||
*/
|
||||
|
||||
|
||||
db_driver_t *db_init(const char *name)
|
||||
{
|
||||
db_driver_t *drv = NULL;
|
||||
sb_list_item_t *pos;
|
||||
|
||||
if (SB_LIST_IS_EMPTY(&drivers))
|
||||
{
|
||||
log_text(LOG_FATAL, "No DB drivers available");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (db_parse_arguments())
|
||||
return NULL;
|
||||
|
||||
if (name == NULL && db_globals.driver == NULL)
|
||||
{
|
||||
drv = SB_LIST_ENTRY(SB_LIST_ITEM_NEXT(&drivers), db_driver_t, listitem);
|
||||
/* Is it the only driver available? */
|
||||
if (SB_LIST_ITEM_NEXT(&(drv->listitem)) ==
|
||||
SB_LIST_ITEM_PREV(&(drv->listitem)))
|
||||
log_text(LOG_INFO, "No DB drivers specified, using %s", drv->sname);
|
||||
else
|
||||
{
|
||||
log_text(LOG_FATAL, "no database driver specified");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (name == NULL)
|
||||
name = db_globals.driver;
|
||||
|
||||
SB_LIST_FOR_EACH(pos, &drivers)
|
||||
{
|
||||
drv = SB_LIST_ENTRY(pos, db_driver_t, listitem);
|
||||
if (!strcmp(drv->sname, name))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (drv == NULL)
|
||||
{
|
||||
log_text(LOG_FATAL, "invalid database driver name: '%s'", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
db_globals.debug = sb_globals.debug;
|
||||
|
||||
/* Initialize database driver */
|
||||
if (drv->ops.init())
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return drv;
|
||||
}
|
||||
|
||||
|
||||
/* Describe database capabilities */
|
||||
|
||||
|
||||
int db_describe(db_driver_t *drv, drv_caps_t *caps, const char *table)
|
||||
{
|
||||
if (drv->ops.describe == NULL)
|
||||
return 1;
|
||||
|
||||
return drv->ops.describe(caps, table);
|
||||
}
|
||||
|
||||
|
||||
/* Connect to database */
|
||||
|
||||
|
||||
db_conn_t *db_connect(db_driver_t *drv)
|
||||
{
|
||||
db_conn_t *con;
|
||||
|
||||
con = (db_conn_t *)calloc(1, sizeof(db_conn_t));
|
||||
if (con == NULL)
|
||||
return NULL;
|
||||
|
||||
con->driver = drv;
|
||||
if (drv->ops.connect(con))
|
||||
{
|
||||
free(con);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return con;
|
||||
}
|
||||
|
||||
|
||||
/* Disconnect from database */
|
||||
|
||||
|
||||
int db_disconnect(db_conn_t *con)
|
||||
{
|
||||
int rc;
|
||||
db_driver_t *drv;
|
||||
|
||||
drv = con->driver;
|
||||
if (drv == NULL)
|
||||
return 1;
|
||||
|
||||
rc = drv->ops.disconnect(con);
|
||||
free(con);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Prepare statement */
|
||||
|
||||
|
||||
db_stmt_t *db_prepare(db_conn_t *con, const char *query)
|
||||
{
|
||||
db_stmt_t *stmt;
|
||||
|
||||
stmt = (db_stmt_t *)calloc(1, sizeof(db_stmt_t));
|
||||
if (stmt == NULL)
|
||||
return NULL;
|
||||
|
||||
stmt->connection = con;
|
||||
|
||||
if (con->driver->ops.prepare(stmt, query))
|
||||
{
|
||||
free(stmt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return stmt;
|
||||
}
|
||||
|
||||
|
||||
/* Bind parameters for prepared statement */
|
||||
|
||||
|
||||
int db_bind_param(db_stmt_t *stmt, db_bind_t *params, unsigned int len)
|
||||
{
|
||||
db_conn_t *con = stmt->connection;
|
||||
|
||||
if (con == NULL || con->driver == NULL)
|
||||
return 1;
|
||||
|
||||
return con->driver->ops.bind_param(stmt, params, len);
|
||||
}
|
||||
|
||||
|
||||
/* Execute prepared statement */
|
||||
|
||||
|
||||
db_result_set_t *db_execute(db_stmt_t *stmt)
|
||||
{
|
||||
db_conn_t *con = stmt->connection;
|
||||
db_result_set_t *rs;
|
||||
|
||||
if (con == NULL || con->driver == NULL)
|
||||
{
|
||||
log_text(LOG_DEBUG, "ERROR: exiting db_execute(), uninitialized connection");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rs = (db_result_set_t *)calloc(1, sizeof(db_result_set_t));
|
||||
if (rs == NULL)
|
||||
{
|
||||
log_text(LOG_DEBUG, "ERROR: exiting db_execute(), memory allocation failure");
|
||||
return NULL;
|
||||
}
|
||||
rs->statement = stmt;
|
||||
rs->connection = con;
|
||||
|
||||
con->db_errno = con->driver->ops.execute(stmt, rs);
|
||||
if (con->db_errno != SB_DB_ERROR_NONE)
|
||||
{
|
||||
free(rs);
|
||||
log_text(LOG_DEBUG, "ERROR: exiting db_execute(), driver's execute method failed");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return rs;
|
||||
}
|
||||
|
||||
|
||||
/* Fetch row into buffers bound by db_bind() */
|
||||
|
||||
|
||||
int db_fetch(db_result_set_t *rs)
|
||||
{
|
||||
db_conn_t *con;
|
||||
|
||||
/* Is this a result set from a prepared statement? */
|
||||
if (rs->statement == NULL)
|
||||
return 1;
|
||||
|
||||
con = rs->connection;
|
||||
if (con == NULL || con->driver == NULL)
|
||||
return 1;
|
||||
|
||||
if (!rs->statement->emulated)
|
||||
return con->driver->ops.fetch(rs);
|
||||
|
||||
/* NYI: Use emulation */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Return the number of rows in a result set */
|
||||
|
||||
|
||||
unsigned long long db_num_rows(db_result_set_t *rs)
|
||||
{
|
||||
db_conn_t *con = rs->connection;
|
||||
|
||||
if (con == NULL || con->driver == NULL)
|
||||
return 0;
|
||||
|
||||
return con->driver->ops.num_rows(rs);
|
||||
}
|
||||
|
||||
|
||||
/* Fetch row from result set of a query */
|
||||
|
||||
|
||||
db_row_t *db_fetch_row(db_result_set_t *rs)
|
||||
{
|
||||
db_conn_t *con = rs->connection;
|
||||
|
||||
/* Is this a result set of a non-prepared statement? */
|
||||
if (rs->statement != NULL)
|
||||
return NULL;
|
||||
|
||||
if (con == NULL || con->driver == NULL)
|
||||
return NULL;
|
||||
|
||||
if (rs->row != NULL)
|
||||
db_free_row(rs->row);
|
||||
rs->row = (db_row_t *)calloc(1, sizeof(db_row_t));
|
||||
if (rs->row == NULL)
|
||||
return NULL;
|
||||
|
||||
if (con->driver->ops.fetch_row(rs, rs->row))
|
||||
{
|
||||
db_free_row(rs->row);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return rs->row;
|
||||
}
|
||||
|
||||
|
||||
/* Execute non-prepared statement */
|
||||
|
||||
|
||||
db_result_set_t *db_query(db_conn_t *con, const char *query)
|
||||
{
|
||||
db_result_set_t *rs;
|
||||
|
||||
if (con->driver == NULL)
|
||||
return NULL;
|
||||
|
||||
rs = (db_result_set_t *)calloc(1, sizeof(db_result_set_t));
|
||||
if (rs == NULL)
|
||||
return NULL;
|
||||
rs->connection = con;
|
||||
|
||||
con->db_errno = con->driver->ops.query(con, query, rs);
|
||||
if (con->db_errno != SB_DB_ERROR_NONE)
|
||||
{
|
||||
free(rs);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return rs;
|
||||
}
|
||||
|
||||
|
||||
/* Free result set */
|
||||
|
||||
|
||||
int db_free_results(db_result_set_t *rs)
|
||||
{
|
||||
int rc;
|
||||
db_conn_t *con = rs->connection;
|
||||
|
||||
if (con == NULL || con->driver == NULL)
|
||||
return 1;
|
||||
|
||||
rc = con->driver->ops.free_results(rs);
|
||||
|
||||
if (rs->row != NULL)
|
||||
db_free_row(rs->row);
|
||||
free(rs);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/* Close prepared statement */
|
||||
|
||||
|
||||
int db_close(db_stmt_t *stmt)
|
||||
{
|
||||
int rc;
|
||||
db_conn_t *con = stmt->connection;
|
||||
|
||||
if (con == NULL || con->driver == NULL)
|
||||
return 1;
|
||||
|
||||
rc = con->driver->ops.close(stmt);
|
||||
|
||||
if (stmt->query != NULL)
|
||||
{
|
||||
free(stmt->query);
|
||||
stmt->query = NULL;
|
||||
}
|
||||
if (stmt->bound_param != NULL)
|
||||
{
|
||||
free(stmt->bound_param);
|
||||
stmt->bound_param = NULL;
|
||||
}
|
||||
free(stmt);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/* Store result set from last query */
|
||||
|
||||
|
||||
int db_store_results(db_result_set_t *rs)
|
||||
{
|
||||
db_conn_t *con = rs->connection;
|
||||
|
||||
if (con == NULL || con->driver == NULL)
|
||||
return SB_DB_ERROR_FAILED;
|
||||
|
||||
return con->driver->ops.store_results(rs);
|
||||
}
|
||||
|
||||
|
||||
/* Uninitialize driver */
|
||||
|
||||
|
||||
int db_done(db_driver_t *drv)
|
||||
{
|
||||
return drv->ops.done();
|
||||
}
|
||||
|
||||
|
||||
/* Return the error code for the last function */
|
||||
|
||||
|
||||
db_error_t db_errno(db_conn_t *con)
|
||||
{
|
||||
return con->db_errno;
|
||||
}
|
||||
|
||||
|
||||
/* Parse command line arguments */
|
||||
|
||||
|
||||
int db_parse_arguments(void)
|
||||
{
|
||||
char *s;
|
||||
|
||||
s = sb_get_value_string("db-ps-mode");
|
||||
|
||||
if (!strcmp(s, "auto"))
|
||||
db_globals.ps_mode = DB_PS_MODE_AUTO;
|
||||
else if (!strcmp(s, "disable"))
|
||||
db_globals.ps_mode = DB_PS_MODE_DISABLE;
|
||||
else
|
||||
{
|
||||
log_text(LOG_FATAL, "Invalid value for db-ps-mode: %s", s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
db_globals.driver = sb_get_value_string("db-driver");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Produce character representation of a 'bind' variable */
|
||||
|
||||
|
||||
int db_print_value(db_bind_t *var, char *buf, int buflen)
|
||||
{
|
||||
int n;
|
||||
db_time_t *tm;
|
||||
|
||||
switch (var->type) {
|
||||
case DB_TYPE_TINYINT:
|
||||
n = snprintf(buf, buflen, "%hhd", *(char *)var->buffer);
|
||||
break;
|
||||
case DB_TYPE_SMALLINT:
|
||||
n = snprintf(buf, buflen, "%hd", *(short *)var->buffer);
|
||||
break;
|
||||
case DB_TYPE_INT:
|
||||
n = snprintf(buf, buflen, "%d", *(int *)var->buffer);
|
||||
break;
|
||||
case DB_TYPE_BIGINT:
|
||||
n = snprintf(buf, buflen, "%lld", *(long long *)var->buffer);
|
||||
break;
|
||||
case DB_TYPE_FLOAT:
|
||||
n = snprintf(buf, buflen, "%f", *(float *)var->buffer);
|
||||
break;
|
||||
case DB_TYPE_DOUBLE:
|
||||
n = snprintf(buf, buflen, "%f", *(double *)var->buffer);
|
||||
break;
|
||||
case DB_TYPE_CHAR:
|
||||
case DB_TYPE_VARCHAR:
|
||||
n = snprintf(buf, buflen, "'%s'", (char *)var->buffer);
|
||||
break;
|
||||
case DB_TYPE_DATE:
|
||||
tm = (db_time_t *)var->buffer;
|
||||
n = snprintf(buf, buflen, "'%d-%d-%d'", tm->year, tm->month, tm->day);
|
||||
break;
|
||||
case DB_TYPE_TIME:
|
||||
tm = (db_time_t *)var->buffer;
|
||||
n = snprintf(buf, buflen, "'%d:%d:%d'", tm->hour, tm->minute,
|
||||
tm->second);
|
||||
break;
|
||||
case DB_TYPE_DATETIME:
|
||||
case DB_TYPE_TIMESTAMP:
|
||||
tm = (db_time_t *)var->buffer;
|
||||
n = snprintf(buf, buflen, "'%d-%d-%d %d:%d:%d'", tm->year, tm->month,
|
||||
tm->day, tm->hour, tm->minute, tm->second);
|
||||
break;
|
||||
default:
|
||||
n = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return (n < buflen) ? n : -1;
|
||||
}
|
||||
|
||||
|
||||
/* Free row fetched by db_fetch_row() */
|
||||
|
||||
|
||||
void db_free_row(db_row_t *row)
|
||||
{
|
||||
free(row);
|
||||
}
|
||||
265
sysbench/db_driver.h
Normal file
265
sysbench/db_driver.h
Normal file
@ -0,0 +1,265 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef DB_DRIVER_H
|
||||
#define DB_DRIVER_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "sysbench.h"
|
||||
#include "sb_list.h"
|
||||
|
||||
|
||||
/* Prepared statements usage modes */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DB_PS_MODE_AUTO,
|
||||
DB_PS_MODE_DISABLE,
|
||||
} db_ps_mode_t;
|
||||
|
||||
/* Global DB API options */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
db_ps_mode_t ps_mode; /* Requested prepared statements usage mode */
|
||||
char *driver; /* Requested database driver */
|
||||
unsigned char debug; /* debug flag */
|
||||
} db_globals_t;
|
||||
|
||||
extern db_globals_t db_globals;
|
||||
|
||||
/* Driver capabilities definition */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char multi_rows_insert; /* 1 if database supports multi-row inserts */
|
||||
char transactions; /* 1 if database supports transactions */
|
||||
char prepared_statements; /* 1 if database supports prepared statements */
|
||||
char auto_increment; /* 1 if database supports AUTO_INCREMENT clause */
|
||||
char needs_commit; /* 1 if database needs explicit commit after INSERTs */
|
||||
char serial; /* 1 if database supports SERIAL clause */
|
||||
char unsigned_int; /* 1 if database supports UNSIGNED INTEGER types */
|
||||
|
||||
char *table_options_str; /* additional table options provided by database driver */
|
||||
} drv_caps_t;
|
||||
|
||||
/* Database errors definition */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SB_DB_ERROR_NONE,
|
||||
SB_DB_ERROR_DEADLOCK,
|
||||
SB_DB_ERROR_FAILED
|
||||
} db_error_t;
|
||||
|
||||
|
||||
/* Available buffer types (for parameters binding) */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DB_TYPE_NONE,
|
||||
DB_TYPE_TINYINT,
|
||||
DB_TYPE_SMALLINT,
|
||||
DB_TYPE_INT,
|
||||
DB_TYPE_BIGINT,
|
||||
DB_TYPE_FLOAT,
|
||||
DB_TYPE_DOUBLE,
|
||||
DB_TYPE_TIME,
|
||||
DB_TYPE_DATE,
|
||||
DB_TYPE_DATETIME,
|
||||
DB_TYPE_TIMESTAMP,
|
||||
DB_TYPE_CHAR,
|
||||
DB_TYPE_VARCHAR
|
||||
} db_bind_type_t;
|
||||
|
||||
|
||||
/* Structure used to represent DATE, TIME, DATETIME and TIMESTAMP values */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int year;
|
||||
unsigned int month;
|
||||
unsigned int day;
|
||||
unsigned int hour;
|
||||
unsigned int minute;
|
||||
unsigned int second;
|
||||
} db_time_t;
|
||||
|
||||
|
||||
/* Structure used to bind data for prepared statements */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
db_bind_type_t type;
|
||||
void *buffer;
|
||||
unsigned long *data_len;
|
||||
unsigned long max_len;
|
||||
char *is_null;
|
||||
} db_bind_t;
|
||||
|
||||
/* Forward declarations */
|
||||
|
||||
struct db_conn;
|
||||
struct db_stmt;
|
||||
struct db_result_set;
|
||||
struct db_row;
|
||||
|
||||
/* Driver operations definition */
|
||||
|
||||
typedef int drv_op_init(void);
|
||||
typedef int drv_op_describe(drv_caps_t *, const char *);
|
||||
typedef int drv_op_connect(struct db_conn *);
|
||||
typedef int drv_op_disconnect(struct db_conn *);
|
||||
typedef int drv_op_prepare(struct db_stmt *, const char *);
|
||||
typedef int drv_op_bind_param(struct db_stmt *, db_bind_t *, unsigned int);
|
||||
typedef int drv_op_bind_result(struct db_stmt *, db_bind_t *, unsigned int );
|
||||
typedef int drv_op_execute(struct db_stmt *, struct db_result_set *);
|
||||
typedef int drv_op_fetch(struct db_result_set *);
|
||||
typedef int drv_op_fetch_row(struct db_result_set *, struct db_row *);
|
||||
typedef unsigned long long drv_op_num_rows(struct db_result_set *);
|
||||
typedef int drv_op_query(struct db_conn *, const char *,
|
||||
struct db_result_set *);
|
||||
typedef int drv_op_free_results(struct db_result_set *);
|
||||
typedef int drv_op_close(struct db_stmt *);
|
||||
typedef int drv_op_store_results(struct db_result_set *);
|
||||
typedef int drv_op_done(void);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
drv_op_init *init; /* initializate driver */
|
||||
drv_op_describe *describe; /* describe database capabilities */
|
||||
drv_op_connect *connect; /* connect to database */
|
||||
drv_op_disconnect *disconnect; /* disconnect from database */
|
||||
drv_op_prepare *prepare; /* prepare statement */
|
||||
drv_op_bind_param *bind_param; /* bind params for prepared statement */
|
||||
drv_op_bind_result *bind_result; /* bind results for prepared statement */
|
||||
drv_op_execute *execute; /* execute prepared statement */
|
||||
drv_op_fetch *fetch; /* fetch row for prepared statement */
|
||||
drv_op_fetch_row *fetch_row; /* fetch row for queries */
|
||||
drv_op_num_rows *num_rows; /* return number of rows in result set */
|
||||
drv_op_free_results *free_results; /* free result set */
|
||||
drv_op_close *close; /* close prepared statement */
|
||||
drv_op_query *query; /* execute non-prepared statement */
|
||||
drv_op_store_results *store_results; /* store results from last query */
|
||||
drv_op_done *done; /* uninitialize driver */
|
||||
} drv_ops_t;
|
||||
|
||||
/* Database driver definition */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *sname; /* short name */
|
||||
char *lname; /* long name */
|
||||
sb_arg_t *args; /* driver command line arguments */
|
||||
drv_ops_t ops; /* driver operations */
|
||||
|
||||
sb_list_item_t listitem; /* can be linked in a list */
|
||||
} db_driver_t;
|
||||
|
||||
/* Connection types definition */
|
||||
|
||||
typedef enum {
|
||||
DB_CONN_TYPE_UNUSED,
|
||||
DB_CONN_TYPE_MYSQL
|
||||
} db_conn_type_t;
|
||||
|
||||
/* Database connection structure */
|
||||
|
||||
typedef struct db_conn
|
||||
{
|
||||
db_driver_t *driver; /* DB driver for this connection */
|
||||
db_conn_type_t type;
|
||||
void *ptr;
|
||||
db_error_t db_errno;
|
||||
} db_conn_t;
|
||||
|
||||
/* Prepared statement definition */
|
||||
|
||||
typedef struct db_stmt
|
||||
{
|
||||
db_conn_t *connection; /* Connection which this statement belongs to */
|
||||
char *query; /* Query string for emulated PS */
|
||||
db_bind_t *bound_param; /* Array of bound parameters for emulated PS */
|
||||
unsigned int bound_param_len; /* Length of the bound_param array */
|
||||
db_bind_t *bound_res; /* Array of bound results for emulated PS */
|
||||
db_bind_t *bound_res_len; /* Length of the bound_res array */
|
||||
void *ptr; /* Pointer to driver-specific data structure */
|
||||
char emulated; /* Should this statement be emulated? */
|
||||
} db_stmt_t;
|
||||
|
||||
/* Result set definition */
|
||||
|
||||
typedef struct db_result_set
|
||||
{
|
||||
db_conn_t *connection; /* Connection which this result set belongs to */
|
||||
db_stmt_t *statement; /* Statement for this result set (if any) */
|
||||
struct db_row *row; /* Last row fetched by db_fetch_row */
|
||||
void *ptr; /* Pointer to driver-specific data */
|
||||
unsigned long long nrows; /* Number of rows in a result set */
|
||||
} db_result_set_t;
|
||||
|
||||
/* Result set row definition */
|
||||
|
||||
typedef struct db_row
|
||||
{
|
||||
db_result_set_t *result_set; /* Result set which this row belongs to */
|
||||
} db_row_t;
|
||||
|
||||
/* Database abstraction layer calls */
|
||||
|
||||
int db_register(void);
|
||||
|
||||
void db_print_help(void);
|
||||
|
||||
db_driver_t *db_init(const char *);
|
||||
|
||||
int db_describe(db_driver_t *, drv_caps_t *, const char *);
|
||||
|
||||
db_conn_t *db_connect(db_driver_t *);
|
||||
|
||||
int db_disconnect(db_conn_t *);
|
||||
|
||||
db_stmt_t *db_prepare(db_conn_t *, const char *);
|
||||
|
||||
int db_bind_param(db_stmt_t *, db_bind_t *, unsigned int);
|
||||
|
||||
int db_bind_result(db_stmt_t *, db_bind_t *, unsigned int);
|
||||
|
||||
db_result_set_t *db_execute(db_stmt_t *);
|
||||
|
||||
db_row_t *db_fetch_row(db_result_set_t *);
|
||||
|
||||
unsigned long long db_num_rows(db_result_set_t *);
|
||||
|
||||
db_result_set_t *db_query(db_conn_t *, const char *);
|
||||
|
||||
int db_free_results(db_result_set_t *);
|
||||
|
||||
int db_store_results(db_result_set_t *);
|
||||
|
||||
int db_close(db_stmt_t *);
|
||||
|
||||
int db_done(db_driver_t *);
|
||||
|
||||
db_error_t db_errno(db_conn_t *);
|
||||
|
||||
int db_print_value(db_bind_t *, char *, int);
|
||||
|
||||
#endif /* DB_DRIVER_H */
|
||||
29
sysbench/drivers/Makefile.am
Normal file
29
sysbench/drivers/Makefile.am
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
if USE_MYSQL
|
||||
MYSQL_DIR = mysql
|
||||
endif
|
||||
|
||||
if USE_ORACLE
|
||||
ORACLE_DIR = oracle
|
||||
endif
|
||||
|
||||
if USE_PGSQL
|
||||
PGSQL_DIR = pgsql
|
||||
endif
|
||||
|
||||
SUBDIRS = $(MYSQL_DIR) $(ORACLE_DIR) $(PGSQL_DIR)
|
||||
487
sysbench/drivers/Makefile.in
Normal file
487
sysbench/drivers/Makefile.in
Normal file
@ -0,0 +1,487 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = sysbench/drivers
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = mysql
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
@USE_MYSQL_TRUE@SUBDIRS = mysql
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sysbench/drivers/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign sysbench/drivers/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| mkdir "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="../$(top_distdir)" \
|
||||
distdir="../$(distdir)/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libtool clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
20
sysbench/drivers/mysql/Makefile.am
Normal file
20
sysbench/drivers/mysql/Makefile.am
Normal file
@ -0,0 +1,20 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
noinst_LIBRARIES = libsbmysql.a
|
||||
|
||||
libsbmysql_a_SOURCES = drv_mysql.c
|
||||
libsbmysql_a_CPPFLAGS = $(MYSQL_CFLAGS) -I../.. $(AM_CPPFLAGS)
|
||||
482
sysbench/drivers/mysql/Makefile.in
Normal file
482
sysbench/drivers/mysql/Makefile.in
Normal file
@ -0,0 +1,482 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SOURCES = $(libsbmysql_a_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = sysbench/drivers/mysql
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libsbmysql_a_AR = $(AR) $(ARFLAGS)
|
||||
libsbmysql_a_LIBADD =
|
||||
am_libsbmysql_a_OBJECTS = libsbmysql_a-drv_mysql.$(OBJEXT)
|
||||
libsbmysql_a_OBJECTS = $(am_libsbmysql_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libsbmysql_a-drv_mysql.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libsbmysql_a_SOURCES)
|
||||
DIST_SOURCES = $(libsbmysql_a_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
noinst_LIBRARIES = libsbmysql.a
|
||||
libsbmysql_a_SOURCES = drv_mysql.c
|
||||
libsbmysql_a_CPPFLAGS = $(MYSQL_CFLAGS) -I../.. $(AM_CPPFLAGS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sysbench/drivers/mysql/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign sysbench/drivers/mysql/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libsbmysql.a: $(libsbmysql_a_OBJECTS) $(libsbmysql_a_DEPENDENCIES)
|
||||
-rm -f libsbmysql.a
|
||||
$(libsbmysql_a_AR) libsbmysql.a $(libsbmysql_a_OBJECTS) $(libsbmysql_a_LIBADD)
|
||||
$(RANLIB) libsbmysql.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsbmysql_a-drv_mysql.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libsbmysql_a-drv_mysql.o: drv_mysql.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmysql_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbmysql_a-drv_mysql.o -MD -MP -MF "$(DEPDIR)/libsbmysql_a-drv_mysql.Tpo" -c -o libsbmysql_a-drv_mysql.o `test -f 'drv_mysql.c' || echo '$(srcdir)/'`drv_mysql.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbmysql_a-drv_mysql.Tpo" "$(DEPDIR)/libsbmysql_a-drv_mysql.Po"; else rm -f "$(DEPDIR)/libsbmysql_a-drv_mysql.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drv_mysql.c' object='libsbmysql_a-drv_mysql.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbmysql_a-drv_mysql.Po' tmpdepfile='$(DEPDIR)/libsbmysql_a-drv_mysql.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmysql_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbmysql_a-drv_mysql.o `test -f 'drv_mysql.c' || echo '$(srcdir)/'`drv_mysql.c
|
||||
|
||||
libsbmysql_a-drv_mysql.obj: drv_mysql.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmysql_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbmysql_a-drv_mysql.obj -MD -MP -MF "$(DEPDIR)/libsbmysql_a-drv_mysql.Tpo" -c -o libsbmysql_a-drv_mysql.obj `if test -f 'drv_mysql.c'; then $(CYGPATH_W) 'drv_mysql.c'; else $(CYGPATH_W) '$(srcdir)/drv_mysql.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbmysql_a-drv_mysql.Tpo" "$(DEPDIR)/libsbmysql_a-drv_mysql.Po"; else rm -f "$(DEPDIR)/libsbmysql_a-drv_mysql.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drv_mysql.c' object='libsbmysql_a-drv_mysql.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbmysql_a-drv_mysql.Po' tmpdepfile='$(DEPDIR)/libsbmysql_a-drv_mysql.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmysql_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbmysql_a-drv_mysql.obj `if test -f 'drv_mysql.c'; then $(CYGPATH_W) 'drv_mysql.c'; else $(CYGPATH_W) '$(srcdir)/drv_mysql.c'; fi`
|
||||
|
||||
libsbmysql_a-drv_mysql.lo: drv_mysql.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmysql_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbmysql_a-drv_mysql.lo -MD -MP -MF "$(DEPDIR)/libsbmysql_a-drv_mysql.Tpo" -c -o libsbmysql_a-drv_mysql.lo `test -f 'drv_mysql.c' || echo '$(srcdir)/'`drv_mysql.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbmysql_a-drv_mysql.Tpo" "$(DEPDIR)/libsbmysql_a-drv_mysql.Plo"; else rm -f "$(DEPDIR)/libsbmysql_a-drv_mysql.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drv_mysql.c' object='libsbmysql_a-drv_mysql.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbmysql_a-drv_mysql.Plo' tmpdepfile='$(DEPDIR)/libsbmysql_a-drv_mysql.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmysql_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbmysql_a-drv_mysql.lo `test -f 'drv_mysql.c' || echo '$(srcdir)/'`drv_mysql.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
916
sysbench/drivers/mysql/drv_mysql.c
Normal file
916
sysbench/drivers/mysql/drv_mysql.c
Normal file
@ -0,0 +1,916 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <mysql.h>
|
||||
#include <mysqld_error.h>
|
||||
|
||||
#include "sb_options.h"
|
||||
#include "db_driver.h"
|
||||
|
||||
/* Check MySQL version for prepared statements availability */
|
||||
#if MYSQL_VERSION_ID >= 40103
|
||||
# define HAVE_PS
|
||||
#endif
|
||||
|
||||
#define DEBUG(format, ...) do { if (db_globals.debug) log_text(LOG_DEBUG, format, __VA_ARGS__); } while (0)
|
||||
|
||||
/* MySQL driver arguments */
|
||||
|
||||
static sb_arg_t mysql_drv_args[] =
|
||||
{
|
||||
{"mysql-host", "MySQL server host", SB_ARG_TYPE_STRING, "localhost"},
|
||||
{"mysql-port", "MySQL server port", SB_ARG_TYPE_INT, "3306"},
|
||||
{"mysql-socket", "MySQL socket", SB_ARG_TYPE_STRING, NULL},
|
||||
{"mysql-user", "MySQL user", SB_ARG_TYPE_STRING, "sbtest"},
|
||||
{"mysql-password", "MySQL password", SB_ARG_TYPE_STRING, ""},
|
||||
{"mysql-db", "MySQL database name", SB_ARG_TYPE_STRING, "sbtest"},
|
||||
{"mysql-table-engine", "storage engine to use for the test table {myisam,innodb,bdb,heap,ndbcluster,federated}",
|
||||
SB_ARG_TYPE_STRING, "innodb"},
|
||||
{"mysql-engine-trx", "whether storage engine used is transactional or not {yes,no,auto}",
|
||||
SB_ARG_TYPE_STRING, "auto"},
|
||||
{"myisam-max-rows", "max-rows parameter for MyISAM tables", SB_ARG_TYPE_INT, "1000000"},
|
||||
|
||||
{NULL, NULL, SB_ARG_TYPE_NULL, NULL}
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ENGINE_TRX_YES,
|
||||
ENGINE_TRX_NO,
|
||||
ENGINE_TRX_AUTO
|
||||
} mysql_drv_trx_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *host;
|
||||
unsigned int port;
|
||||
char *socket;
|
||||
char *user;
|
||||
char *password;
|
||||
char *db;
|
||||
unsigned int myisam_max_rows;
|
||||
mysql_drv_trx_t engine_trx;
|
||||
} mysql_drv_args_t;
|
||||
|
||||
#ifdef HAVE_PS
|
||||
/* Structure used for DB-to-MySQL bind types map */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
db_bind_type_t db_type;
|
||||
int my_type;
|
||||
} db_mysql_bind_map_t;
|
||||
|
||||
/* DB-to-MySQL bind types map */
|
||||
db_mysql_bind_map_t db_mysql_bind_map[] =
|
||||
{
|
||||
{DB_TYPE_TINYINT, MYSQL_TYPE_TINY},
|
||||
{DB_TYPE_SMALLINT, MYSQL_TYPE_SHORT},
|
||||
{DB_TYPE_INT, MYSQL_TYPE_LONG},
|
||||
{DB_TYPE_BIGINT, MYSQL_TYPE_LONGLONG},
|
||||
{DB_TYPE_FLOAT, MYSQL_TYPE_FLOAT},
|
||||
{DB_TYPE_DOUBLE, MYSQL_TYPE_DOUBLE},
|
||||
{DB_TYPE_DATETIME, MYSQL_TYPE_DATETIME},
|
||||
{DB_TYPE_TIMESTAMP, MYSQL_TYPE_TIMESTAMP},
|
||||
{DB_TYPE_CHAR, MYSQL_TYPE_STRING},
|
||||
{DB_TYPE_VARCHAR, MYSQL_TYPE_VAR_STRING},
|
||||
{DB_TYPE_NONE, 0}
|
||||
};
|
||||
|
||||
#endif /* HAVE_PS */
|
||||
|
||||
/* MySQL driver capabilities */
|
||||
|
||||
static drv_caps_t mysql_drv_caps =
|
||||
{
|
||||
.multi_rows_insert = 1,
|
||||
.transactions = 0,
|
||||
.prepared_statements = 0,
|
||||
.auto_increment = 1,
|
||||
.serial = 0,
|
||||
.unsigned_int = 1,
|
||||
|
||||
.table_options_str = NULL
|
||||
};
|
||||
|
||||
|
||||
|
||||
static mysql_drv_args_t args; /* driver args */
|
||||
|
||||
static char table_options_str[1024]; /* table options string */
|
||||
|
||||
static char use_ps; /* whether server-side prepared statemens should be used */
|
||||
|
||||
/* MySQL driver operations */
|
||||
|
||||
static int mysql_drv_init(void);
|
||||
static int mysql_drv_describe(drv_caps_t *, const char *);
|
||||
static int mysql_drv_connect(db_conn_t *);
|
||||
static int mysql_drv_disconnect(db_conn_t *);
|
||||
static int mysql_drv_prepare(db_stmt_t *, const char *);
|
||||
static int mysql_drv_bind_param(db_stmt_t *, db_bind_t *, unsigned int);
|
||||
static int mysql_drv_bind_result(db_stmt_t *, db_bind_t *, unsigned int);
|
||||
static int mysql_drv_execute(db_stmt_t *, db_result_set_t *);
|
||||
static int mysql_drv_fetch(db_result_set_t *);
|
||||
static int mysql_drv_fetch_row(db_result_set_t *, db_row_t *);
|
||||
static unsigned long long mysql_drv_num_rows(db_result_set_t *);
|
||||
static int mysql_drv_query(db_conn_t *, const char *, db_result_set_t *);
|
||||
static int mysql_drv_free_results(db_result_set_t *);
|
||||
static int mysql_drv_close(db_stmt_t *);
|
||||
static int mysql_drv_store_results(db_result_set_t *);
|
||||
static int mysql_drv_done(void);
|
||||
|
||||
/* MySQL driver definition */
|
||||
|
||||
static db_driver_t mysql_driver =
|
||||
{
|
||||
.sname = "mysql",
|
||||
.lname = "MySQL driver",
|
||||
.args = mysql_drv_args,
|
||||
.ops =
|
||||
{
|
||||
mysql_drv_init,
|
||||
mysql_drv_describe,
|
||||
mysql_drv_connect,
|
||||
mysql_drv_disconnect,
|
||||
mysql_drv_prepare,
|
||||
mysql_drv_bind_param,
|
||||
mysql_drv_bind_result,
|
||||
mysql_drv_execute,
|
||||
mysql_drv_fetch,
|
||||
mysql_drv_fetch_row,
|
||||
mysql_drv_num_rows,
|
||||
mysql_drv_free_results,
|
||||
mysql_drv_close,
|
||||
mysql_drv_query,
|
||||
mysql_drv_store_results,
|
||||
mysql_drv_done
|
||||
},
|
||||
.listitem = {NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
/* Local functions */
|
||||
|
||||
static int parse_table_engine(const char *);
|
||||
#ifdef HAVE_PS
|
||||
static int get_mysql_bind_type(db_bind_type_t);
|
||||
#endif
|
||||
|
||||
/* Register MySQL driver */
|
||||
|
||||
|
||||
int register_driver_mysql(sb_list_t *drivers)
|
||||
{
|
||||
SB_LIST_ADD_TAIL(&mysql_driver.listitem, drivers);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* MySQL driver initialization */
|
||||
|
||||
|
||||
int mysql_drv_init(void)
|
||||
{
|
||||
char *s;
|
||||
|
||||
args.host = sb_get_value_string("mysql-host");
|
||||
args.port = sb_get_value_int("mysql-port");
|
||||
args.socket = sb_get_value_string("mysql-socket");
|
||||
args.user = sb_get_value_string("mysql-user");
|
||||
args.password = sb_get_value_string("mysql-password");
|
||||
args.db = sb_get_value_string("mysql-db");
|
||||
args.myisam_max_rows = sb_get_value_int("myisam-max-rows");
|
||||
|
||||
use_ps = 0;
|
||||
#ifdef HAVE_PS
|
||||
mysql_drv_caps.prepared_statements = 1;
|
||||
if (db_globals.ps_mode != DB_PS_MODE_DISABLE)
|
||||
use_ps = 1;
|
||||
#endif
|
||||
|
||||
s = sb_get_value_string("mysql-engine-trx");
|
||||
if (!strcasecmp(s, "yes"))
|
||||
args.engine_trx = ENGINE_TRX_YES;
|
||||
else if (!strcasecmp(s, "no"))
|
||||
args.engine_trx = ENGINE_TRX_NO;
|
||||
else if (!strcasecmp(s, "auto"))
|
||||
args.engine_trx = ENGINE_TRX_AUTO;
|
||||
else
|
||||
{
|
||||
log_text(LOG_FATAL, "Invalid value of mysql-engine-trx: %s", s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
s = sb_get_value_string("mysql-table-engine");
|
||||
|
||||
return parse_table_engine(s);
|
||||
}
|
||||
|
||||
|
||||
/* Describe database capabilities (possibly depending on table type) */
|
||||
|
||||
|
||||
int mysql_drv_describe(drv_caps_t *caps, const char * table_name)
|
||||
{
|
||||
db_conn_t con;
|
||||
char query[1024];
|
||||
MYSQL_RES *res = NULL;
|
||||
MYSQL_ROW row;
|
||||
MYSQL_FIELD *fields;
|
||||
unsigned int num_fields;
|
||||
unsigned int i;
|
||||
int connected = 0;
|
||||
int rc = 0;
|
||||
|
||||
*caps = mysql_drv_caps;
|
||||
|
||||
if (table_name == NULL)
|
||||
goto exit;
|
||||
|
||||
/* Try to determine table type */
|
||||
if (mysql_drv_connect(&con))
|
||||
goto error;
|
||||
connected = 1;
|
||||
snprintf(query, sizeof(query), "SHOW TABLE STATUS LIKE '%s'", table_name);
|
||||
|
||||
rc = mysql_real_query(con.ptr, query, strlen(query));
|
||||
DEBUG("mysql_real_query(%p, \"%s\", %d) = %d", con.ptr, query, strlen(query), rc);
|
||||
if (rc)
|
||||
goto error;
|
||||
|
||||
res = mysql_store_result(con.ptr);
|
||||
DEBUG("mysql_store_result(%p) = %p", con.ptr, res);
|
||||
if (res == NULL)
|
||||
goto error;
|
||||
|
||||
num_fields = mysql_num_fields(res);
|
||||
DEBUG("mysql_num_fields(%p) = %d", res, num_fields);
|
||||
fields = mysql_fetch_fields(res);
|
||||
DEBUG("mysql_fetch_fields(%p) = %p", res, fields);
|
||||
for (i = 0; i < num_fields; i++)
|
||||
if (!strcasecmp(fields[i].name, "type") ||
|
||||
!strcasecmp(fields[i].name, "engine"))
|
||||
break;
|
||||
if (i >= num_fields)
|
||||
goto error;
|
||||
|
||||
row = mysql_fetch_row(res);
|
||||
DEBUG("mysql_fetch_row(%p) = %p", res, row);
|
||||
if (row == NULL || row[i] == NULL)
|
||||
goto error;
|
||||
|
||||
rc = parse_table_engine(row[i]);
|
||||
*caps = mysql_drv_caps;
|
||||
goto exit;
|
||||
|
||||
error:
|
||||
log_text(LOG_ALERT, "Error: failed to determine table '%s' type!", table_name);
|
||||
log_text(LOG_ALERT, "MySQL error: %s", mysql_error(con.ptr));
|
||||
rc = 1;
|
||||
|
||||
exit:
|
||||
if (res != NULL)
|
||||
{
|
||||
mysql_free_result(res);
|
||||
DEBUG("mysql_free_result(%p)", res);
|
||||
}
|
||||
if (connected)
|
||||
mysql_drv_disconnect(&con);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/* Connect to MySQL database */
|
||||
|
||||
|
||||
int mysql_drv_connect(db_conn_t *sb_conn)
|
||||
{
|
||||
MYSQL *con;
|
||||
|
||||
con = (MYSQL *)malloc(sizeof(MYSQL));
|
||||
if (con == NULL)
|
||||
return 1;
|
||||
sb_conn->ptr = con;
|
||||
|
||||
mysql_init(con);
|
||||
DEBUG("mysql_init(%p)", con);
|
||||
mysql_options(con, MYSQL_READ_DEFAULT_GROUP, "sysbench");
|
||||
DEBUG("mysql_options(%p, MYSQL_READ_DEFAULT_GROUP, \"sysbench\")", con);
|
||||
DEBUG("mysql_real_connect(%p, \"%s\", \"%s\", \"%s\", \"%s\", %u, \"%s\", %s)",
|
||||
con,
|
||||
args.host,
|
||||
args.user,
|
||||
args.password,
|
||||
args.db,
|
||||
args.port,
|
||||
args.socket,
|
||||
(MYSQL_VERSION_ID >= 50000) ? "CLIENT_MULTI_STATEMENTS" : "0"
|
||||
);
|
||||
if (!mysql_real_connect(con,
|
||||
args.host,
|
||||
args.user,
|
||||
args.password,
|
||||
args.db,
|
||||
args.port,
|
||||
args.socket,
|
||||
#if MYSQL_VERSION_ID >= 50000
|
||||
CLIENT_MULTI_STATEMENTS)
|
||||
#else
|
||||
0)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
log_text(LOG_FATAL, "unable to connect to MySQL server, aborting...");
|
||||
log_text(LOG_FATAL, "error %d: %s", mysql_errno(con),
|
||||
mysql_error(con));
|
||||
free(con);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Disconnect from MySQL database */
|
||||
|
||||
|
||||
int mysql_drv_disconnect(db_conn_t *sb_conn)
|
||||
{
|
||||
MYSQL *con = sb_conn->ptr;
|
||||
|
||||
if (con != NULL)
|
||||
{
|
||||
DEBUG("mysql_close(%p)", con);
|
||||
mysql_close(con);
|
||||
}
|
||||
free(con);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Prepare statement */
|
||||
|
||||
|
||||
int mysql_drv_prepare(db_stmt_t *stmt, const char *query)
|
||||
{
|
||||
#ifdef HAVE_PS
|
||||
MYSQL *con = (MYSQL *)stmt->connection->ptr;
|
||||
MYSQL_STMT *mystmt;
|
||||
unsigned int rc;
|
||||
|
||||
if (con == NULL)
|
||||
return 1;
|
||||
|
||||
if (use_ps)
|
||||
{
|
||||
mystmt = mysql_stmt_init(con);
|
||||
DEBUG("mysql_stmt_init(%p) = %p", con, mystmt);
|
||||
if (mystmt == NULL)
|
||||
{
|
||||
log_text(LOG_FATAL, "mysql_stmt_init() failed");
|
||||
return 1;
|
||||
}
|
||||
stmt->ptr = (void *)mystmt;
|
||||
DEBUG("mysql_stmt_prepare(%p, \"%s\", %d) = %p", mystmt, query, strlen(query), stmt->ptr);
|
||||
if (mysql_stmt_prepare(mystmt, query, strlen(query)))
|
||||
{
|
||||
/* Check if this statement in not supported */
|
||||
rc = mysql_errno(con);
|
||||
DEBUG("mysql_errno(%p) = %u", con, rc);
|
||||
if (rc == ER_UNSUPPORTED_PS)
|
||||
{
|
||||
log_text(LOG_WARNING,
|
||||
"Preparing of \"%s\" is unsupported, using emulation",
|
||||
query);
|
||||
goto emulate;
|
||||
}
|
||||
else
|
||||
{
|
||||
log_text(LOG_FATAL, "mysql_stmt_prepare() failed");
|
||||
log_text(LOG_FATAL, "MySQL error: %d \"%s\"", rc,
|
||||
mysql_error(con));
|
||||
DEBUG("mysql_stmt_close(%p)", mystmt);
|
||||
mysql_stmt_close(mystmt);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
emulate:
|
||||
#endif /* HAVE_PS */
|
||||
|
||||
/* Use client-side PS */
|
||||
stmt->emulated = 1;
|
||||
stmt->query = strdup(query);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Bind parameters for prepared statement */
|
||||
|
||||
|
||||
int mysql_drv_bind_param(db_stmt_t *stmt, db_bind_t *params, unsigned int len)
|
||||
{
|
||||
MYSQL *con = (MYSQL *)stmt->connection->ptr;
|
||||
#ifdef HAVE_PS
|
||||
MYSQL_BIND *bind;
|
||||
unsigned int i;
|
||||
unsigned int rc;
|
||||
#endif
|
||||
|
||||
if (con == NULL)
|
||||
return 1;
|
||||
|
||||
#ifdef HAVE_PS
|
||||
if (!stmt->emulated)
|
||||
{
|
||||
if (stmt->ptr == NULL)
|
||||
return 1;
|
||||
/* Validate parameters count */
|
||||
rc = mysql_stmt_param_count(stmt->ptr);
|
||||
DEBUG("mysql_stmt_param_count(%p) = %u", stmt->ptr, rc);
|
||||
if (rc != len)
|
||||
return 1;
|
||||
|
||||
/* Convert SysBench bind structures to MySQL ones */
|
||||
bind = (MYSQL_BIND *)calloc(len, sizeof(MYSQL_BIND));
|
||||
if (bind == NULL)
|
||||
return 1;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
bind[i].buffer_type = get_mysql_bind_type(params[i].type);
|
||||
bind[i].buffer = params[i].buffer;
|
||||
bind[i].buffer_length = params[i].max_len;
|
||||
bind[i].length = params[i].data_len;
|
||||
bind[i].is_null = params[i].is_null;
|
||||
}
|
||||
|
||||
rc = mysql_stmt_bind_param(stmt->ptr, bind);
|
||||
DEBUG("mysql_stmt_bind_param(%p, %p) = %u", stmt->ptr, bind, rc);
|
||||
if (rc)
|
||||
{
|
||||
log_text(LOG_FATAL, "mysql_stmt_bind_param() failed");
|
||||
log_text(LOG_FATAL, "MySQL error: %d \"%s\"", mysql_errno(con),
|
||||
mysql_error(con));
|
||||
free(bind);
|
||||
return 1;
|
||||
}
|
||||
free(bind);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* HAVE_PS */
|
||||
|
||||
/* Use emulation */
|
||||
if (stmt->bound_param != NULL)
|
||||
free(stmt->bound_param);
|
||||
stmt->bound_param = (db_bind_t *)malloc(len * sizeof(db_bind_t));
|
||||
if (stmt->bound_param == NULL)
|
||||
return 1;
|
||||
memcpy(stmt->bound_param, params, len * sizeof(db_bind_t));
|
||||
stmt->bound_param_len = len;
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Bind results for prepared statement */
|
||||
|
||||
|
||||
int mysql_drv_bind_result(db_stmt_t *stmt, db_bind_t *params, unsigned int len)
|
||||
{
|
||||
#ifndef HAVE_PS
|
||||
/* No support for prepared statements */
|
||||
(void)stmt; /* unused */
|
||||
(void)params; /* unused */
|
||||
(void)len; /* unused */
|
||||
|
||||
return 1;
|
||||
#else
|
||||
MYSQL *con = (MYSQL *)stmt->connection->ptr;
|
||||
MYSQL_BIND *bind;
|
||||
unsigned int i;
|
||||
unsigned int rc;
|
||||
|
||||
if (con == NULL || stmt->ptr == NULL)
|
||||
return 1;
|
||||
|
||||
/* Convert SysBench bind structures to MySQL ones */
|
||||
bind = (MYSQL_BIND *)calloc(len, sizeof(MYSQL_BIND));
|
||||
if (bind == NULL)
|
||||
return 1;
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
bind[i].buffer_type = get_mysql_bind_type(params[i].type);
|
||||
bind[i].buffer = params[i].buffer;
|
||||
bind[i].buffer_length = params[i].max_len;
|
||||
bind[i].length = params[i].data_len;
|
||||
bind[i].is_null = params[i].is_null;
|
||||
}
|
||||
|
||||
rc = mysql_stmt_bind_result(stmt->ptr, bind);
|
||||
DEBUG("mysql_stmt_bind_result(%p, %p) = %u", stmt->ptr, bind, rc);
|
||||
if (rc)
|
||||
{
|
||||
free(bind);
|
||||
return 1;
|
||||
}
|
||||
free(bind);
|
||||
|
||||
return 0;
|
||||
#endif /* HAVE_PS */
|
||||
}
|
||||
|
||||
|
||||
/* Execute prepared statement */
|
||||
|
||||
|
||||
int mysql_drv_execute(db_stmt_t *stmt, db_result_set_t *rs)
|
||||
{
|
||||
db_conn_t *con = stmt->connection;
|
||||
char *buf = NULL;
|
||||
unsigned int buflen = 0;
|
||||
unsigned int i, j, vcnt;
|
||||
char need_realloc;
|
||||
int n;
|
||||
unsigned int rc;
|
||||
|
||||
#ifdef HAVE_PS
|
||||
(void)rs; /* unused */
|
||||
|
||||
if (!stmt->emulated)
|
||||
{
|
||||
if (stmt->ptr == NULL)
|
||||
{
|
||||
log_text(LOG_DEBUG, "ERROR: exiting mysql_drv_execute(), uninitialized statement");
|
||||
return SB_DB_ERROR_FAILED;
|
||||
}
|
||||
rc = mysql_stmt_execute(stmt->ptr);
|
||||
DEBUG("mysql_stmt_execute(%p) = %u", stmt->ptr, rc);
|
||||
if (rc)
|
||||
{
|
||||
rc = mysql_errno(con->ptr);
|
||||
DEBUG("mysql_errno(%p) = %u", con->ptr, rc);
|
||||
if (rc == ER_LOCK_DEADLOCK || rc == ER_LOCK_WAIT_TIMEOUT)
|
||||
return SB_DB_ERROR_DEADLOCK;
|
||||
log_text(LOG_ALERT, "failed to execute mysql_stmt_execute(): Err%d %s",
|
||||
mysql_errno(con->ptr),
|
||||
mysql_error(con->ptr));
|
||||
return SB_DB_ERROR_FAILED;
|
||||
}
|
||||
return SB_DB_ERROR_NONE;
|
||||
}
|
||||
#else
|
||||
(void)rc; /* unused */
|
||||
#endif /* HAVE_PS */
|
||||
|
||||
/* Use emulation */
|
||||
/* Build the actual query string from parameters list */
|
||||
need_realloc = 1;
|
||||
vcnt = 0;
|
||||
for (i = 0, j = 0; stmt->query[i] != '\0'; i++)
|
||||
{
|
||||
again:
|
||||
if (j+1 >= buflen || need_realloc)
|
||||
{
|
||||
buflen = (buflen > 0) ? buflen * 2 : 256;
|
||||
buf = realloc(buf, buflen);
|
||||
if (buf == NULL)
|
||||
{
|
||||
log_text(LOG_DEBUG, "ERROR: exiting mysql_drv_execute(), memory allocation failure");
|
||||
return SB_DB_ERROR_FAILED;
|
||||
}
|
||||
need_realloc = 0;
|
||||
}
|
||||
|
||||
if (stmt->query[i] != '?')
|
||||
{
|
||||
buf[j++] = stmt->query[i];
|
||||
continue;
|
||||
}
|
||||
|
||||
n = db_print_value(stmt->bound_param + vcnt, buf + j, buflen - j);
|
||||
if (n < 0)
|
||||
{
|
||||
need_realloc = 1;
|
||||
goto again;
|
||||
}
|
||||
j += n;
|
||||
vcnt++;
|
||||
}
|
||||
buf[j] = '\0';
|
||||
|
||||
con->db_errno = mysql_drv_query(con, buf, rs);
|
||||
free(buf);
|
||||
if (con->db_errno != SB_DB_ERROR_NONE)
|
||||
{
|
||||
log_text(LOG_DEBUG, "ERROR: exiting mysql_drv_execute(), database error");
|
||||
return con->db_errno;
|
||||
}
|
||||
|
||||
return SB_DB_ERROR_NONE;
|
||||
}
|
||||
|
||||
|
||||
/* Execute SQL query */
|
||||
|
||||
|
||||
int mysql_drv_query(db_conn_t *sb_conn, const char *query,
|
||||
db_result_set_t *rs)
|
||||
{
|
||||
MYSQL *con = sb_conn->ptr;
|
||||
unsigned int rc;
|
||||
|
||||
(void)rs; /* unused */
|
||||
rc = mysql_real_query(con, query, strlen(query));
|
||||
DEBUG("mysql_real_query(%p, \"%s\", %u) = %u", con, query, strlen(query), rc);
|
||||
if (rc)
|
||||
{
|
||||
rc = mysql_errno(con);
|
||||
DEBUG("mysql_errno(%p) = %u", con, rc);
|
||||
if (rc == ER_LOCK_DEADLOCK || rc == ER_LOCK_WAIT_TIMEOUT)
|
||||
return SB_DB_ERROR_DEADLOCK;
|
||||
log_text(LOG_ALERT, "failed to execute MySQL query: `%s`:", query);
|
||||
log_text(LOG_ALERT, "Error %d %s", mysql_errno(con), mysql_error(con));
|
||||
return SB_DB_ERROR_FAILED;
|
||||
}
|
||||
|
||||
return SB_DB_ERROR_NONE;
|
||||
}
|
||||
|
||||
|
||||
/* Fetch row from result set of a prepared statement */
|
||||
|
||||
|
||||
int mysql_drv_fetch(db_result_set_t *rs)
|
||||
{
|
||||
/* NYI */
|
||||
(void)rs;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Fetch row from result set of a query */
|
||||
|
||||
|
||||
int mysql_drv_fetch_row(db_result_set_t *rs, db_row_t *row)
|
||||
{
|
||||
/* NYI */
|
||||
(void)rs; /* unused */
|
||||
(void)row; /* unused */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Return the number of rows in a result set */
|
||||
|
||||
|
||||
unsigned long long mysql_drv_num_rows(db_result_set_t *rs)
|
||||
{
|
||||
return rs->nrows;
|
||||
}
|
||||
|
||||
|
||||
/* Store results from the last query */
|
||||
|
||||
|
||||
int mysql_drv_store_results(db_result_set_t *rs)
|
||||
{
|
||||
MYSQL *con = rs->connection->ptr;
|
||||
MYSQL_RES *res;
|
||||
MYSQL_ROW row;
|
||||
int rc;
|
||||
|
||||
#ifdef HAVE_PS
|
||||
/* Is this result set from prepared statement? */
|
||||
if (rs->statement != NULL && rs->statement->emulated == 0)
|
||||
{
|
||||
if (rs->statement->ptr == NULL)
|
||||
return 1;
|
||||
|
||||
rc = mysql_stmt_store_result(rs->statement->ptr);
|
||||
DEBUG("mysql_stmt_store_result(%p) = %d", rs->statement->ptr, rc);
|
||||
if (rc)
|
||||
{
|
||||
rc = mysql_errno(con);
|
||||
DEBUG("mysql_errno(%p) = %d", con, rc);
|
||||
if (rc == ER_LOCK_DEADLOCK || rc == ER_LOCK_WAIT_TIMEOUT)
|
||||
{
|
||||
log_text(LOG_WARNING,
|
||||
"mysql_stmt_store_result() failed with error: (%d) %s", rc,
|
||||
mysql_error(con));
|
||||
return SB_DB_ERROR_DEADLOCK;
|
||||
}
|
||||
|
||||
log_text(LOG_ALERT, "MySQL error: %s\n", mysql_error(con));
|
||||
return SB_DB_ERROR_FAILED;
|
||||
}
|
||||
rs->nrows = mysql_stmt_num_rows(rs->statement->ptr);
|
||||
DEBUG("mysql_stmt_num_rows(%p) = %d", rs->statement->ptr, rs->nrows);
|
||||
do {
|
||||
rc = mysql_stmt_fetch(rs->statement->ptr);
|
||||
DEBUG("mysql_stmt_fetch(%p) = %d", rs->statement->ptr, rc);
|
||||
} while(rc == 0);
|
||||
|
||||
return SB_DB_ERROR_NONE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (con == NULL)
|
||||
return SB_DB_ERROR_FAILED;
|
||||
|
||||
/* using store results for speed will not work for large sets */
|
||||
res = mysql_store_result(con);
|
||||
DEBUG("mysql_store_result(%p) = %p", con, res);
|
||||
if (res == NULL)
|
||||
{
|
||||
rc = mysql_errno(con);
|
||||
DEBUG("mysql_errno(%p) = %u", con, rc);
|
||||
if (rc == ER_LOCK_DEADLOCK || rc == ER_LOCK_WAIT_TIMEOUT)
|
||||
{
|
||||
log_text(LOG_WARNING,
|
||||
"mysql_store_result() failed with error: (%u) %s", rc,
|
||||
mysql_error(con));
|
||||
return SB_DB_ERROR_DEADLOCK;
|
||||
}
|
||||
log_text(LOG_ALERT, "MySQL error: %s", mysql_error(con));
|
||||
return SB_DB_ERROR_FAILED;
|
||||
}
|
||||
rs->ptr = (void *)res;
|
||||
|
||||
rs->nrows = mysql_num_rows(res);
|
||||
DEBUG("mysql_num_rows(%p) = %u", res, rs->nrows);
|
||||
|
||||
/* just fetch result */
|
||||
while((row = mysql_fetch_row(res)))
|
||||
DEBUG("mysql_fetch_row(%p) = %p", res, row);
|
||||
|
||||
return SB_DB_ERROR_NONE;
|
||||
}
|
||||
|
||||
|
||||
/* Free result set */
|
||||
|
||||
|
||||
int mysql_drv_free_results(db_result_set_t *rs)
|
||||
{
|
||||
#ifdef HAVE_PS
|
||||
/* Is this a result set of a prepared statement */
|
||||
if (rs->statement != NULL && rs->statement->emulated == 0)
|
||||
{
|
||||
DEBUG("mysql_stmt_free_result(%p)", rs->statement->ptr);
|
||||
return mysql_stmt_free_result(rs->statement->ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (rs->ptr != NULL)
|
||||
{
|
||||
DEBUG("mysql_free_result(%p)", rs->ptr);
|
||||
mysql_free_result((MYSQL_RES *)rs->ptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Close prepared statement */
|
||||
|
||||
|
||||
int mysql_drv_close(db_stmt_t *stmt)
|
||||
{
|
||||
#ifdef HAVE_PS
|
||||
if (stmt->ptr == NULL)
|
||||
return 1;
|
||||
|
||||
DEBUG("mysql_stmt_close(%p)", stmt->ptr);
|
||||
return mysql_stmt_close(stmt->ptr);
|
||||
#else
|
||||
(void)stmt; /* unused */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* Uninitialize driver */
|
||||
int mysql_drv_done(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Parse table type and set driver capabilities */
|
||||
|
||||
|
||||
int parse_table_engine(const char *type)
|
||||
{
|
||||
/* Determine if the engine supports transactions */
|
||||
if (args.engine_trx == ENGINE_TRX_AUTO)
|
||||
{
|
||||
if (!strcasecmp(type, "myisam") || !strcasecmp(type, "heap"))
|
||||
mysql_drv_caps.transactions = 0;
|
||||
else if (!strcasecmp(type, "innodb") ||
|
||||
!strcasecmp(type, "bdb") || !strcasecmp(type, "berkeleydb") ||
|
||||
!strcasecmp(type, "ndbcluster") ||
|
||||
!strcasecmp(type, "federated"))
|
||||
mysql_drv_caps.transactions = 1;
|
||||
else
|
||||
{
|
||||
log_text(LOG_FATAL, "Failed to determine transactions support for "
|
||||
"unknown storage engine '%s'", type);
|
||||
log_text(LOG_FATAL, "Specify explicitly with --mysql-engine-trx option");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
mysql_drv_caps.transactions = (args.engine_trx == ENGINE_TRX_YES);
|
||||
|
||||
/* Get engine-specific options string */
|
||||
if (!strcasecmp(type, "myisam"))
|
||||
{
|
||||
if (args.myisam_max_rows > 0)
|
||||
snprintf(table_options_str, sizeof(table_options_str),
|
||||
"/*! TYPE=MyISAM MAX_ROWS=%u */", args.myisam_max_rows);
|
||||
else
|
||||
snprintf(table_options_str, sizeof(table_options_str),
|
||||
"/*! TYPE=MyISAM */");
|
||||
}
|
||||
else if (!strcasecmp(type, "innodb"))
|
||||
snprintf(table_options_str, sizeof(table_options_str),
|
||||
"/*! TYPE=InnoDB */");
|
||||
else if (!strcasecmp(type, "bdb") || !strcasecmp(type, "berkeleydb"))
|
||||
snprintf(table_options_str, sizeof(table_options_str),
|
||||
"/*! TYPE=BerkeleyDB */");
|
||||
else if (!strcasecmp(type, "heap"))
|
||||
snprintf(table_options_str, sizeof(table_options_str),
|
||||
"/*! TYPE=HEAP */");
|
||||
else if (!strcasecmp(type, "ndbcluster"))
|
||||
snprintf(table_options_str, sizeof(table_options_str),
|
||||
"/*! TYPE=NDB */");
|
||||
else if (!strcasecmp(type, "federated"))
|
||||
snprintf(table_options_str, sizeof(table_options_str),
|
||||
"/*! TYPE=FEDERATED */");
|
||||
else
|
||||
snprintf(table_options_str, sizeof(table_options_str),
|
||||
"/*! TYPE=%s */", type);
|
||||
|
||||
mysql_drv_caps.table_options_str = table_options_str;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_PS
|
||||
/* Map SQL data type to bind_type value in MYSQL_BIND */
|
||||
|
||||
|
||||
int get_mysql_bind_type(db_bind_type_t type)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; db_mysql_bind_map[i].db_type != DB_TYPE_NONE; i++)
|
||||
if (db_mysql_bind_map[i].db_type == type)
|
||||
return db_mysql_bind_map[i].my_type;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* HAVE_PS */
|
||||
109
sysbench/sb_list.h
Normal file
109
sysbench/sb_list.h
Normal file
@ -0,0 +1,109 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SB_LIST_H
|
||||
|
||||
#define SB_LIST_H
|
||||
|
||||
typedef struct sb_list_item sb_list_t;
|
||||
typedef struct sb_list_item sb_list_item_t;
|
||||
|
||||
struct sb_list_item
|
||||
{
|
||||
sb_list_item_t *next_p;
|
||||
sb_list_item_t *prev_p;
|
||||
};
|
||||
|
||||
#ifndef offsetof
|
||||
# define offsetof(type, member) ((size_t) &((type *)0)->member)
|
||||
#endif
|
||||
|
||||
#define SB_LIST_DECLARE(name) \
|
||||
SB_LIST_T name = { &(name), &(name) }
|
||||
|
||||
#define SB_LIST_INIT(head_p) \
|
||||
do { \
|
||||
(head_p)->next_p = (head_p); \
|
||||
(head_p)->prev_p = (head_p); \
|
||||
} while (0)
|
||||
|
||||
#define SB_LIST_ITEM_INIT(item_p) \
|
||||
SB_LIST_INIT(item_p)
|
||||
|
||||
#define SB_LIST_ADD(item_p, head_p) \
|
||||
do { \
|
||||
(item_p)->next_p = (head_p)->next_p; \
|
||||
(item_p)->prev_p = (head_p); \
|
||||
(head_p)->next_p = (item_p); \
|
||||
(item_p)->next_p->prev_p = (item_p); \
|
||||
} while (0)
|
||||
|
||||
#define SB_LIST_ADD_TAIL(item_p, head_p) \
|
||||
do { \
|
||||
(item_p)->prev_p = (head_p)->prev_p; \
|
||||
(item_p)->next_p = (head_p); \
|
||||
(head_p)->prev_p = (item_p); \
|
||||
(item_p)->prev_p->next_p = (item_p); \
|
||||
} while (0);
|
||||
|
||||
#define SB_LIST_DELETE(old_item_p) \
|
||||
do { \
|
||||
(old_item_p)->next_p->prev_p = (old_item_p)->prev_p; \
|
||||
(old_item_p)->prev_p->next_p = (old_item_p)->next_p; \
|
||||
} while (0)
|
||||
|
||||
#define SB_LIST_REPLACE(item_p, old_item_p) \
|
||||
do { \
|
||||
(item_p)->next_p = (old_item_p)->next_p; \
|
||||
(item_p)->prev_p = (old_item_p)->prev_p; \
|
||||
(item_p)->next_p->prev_p = (item_p); \
|
||||
(item_p)->prev_p->next_p = (item_p); \
|
||||
} while (0)
|
||||
|
||||
#define SB_LIST_IS_EMPTY(head_p) \
|
||||
((head_p)->next_p == (head_p))
|
||||
|
||||
#define SB_LIST_ITEM_IN_LIST(item_p) \
|
||||
((item_p)->next_p != (item_p))
|
||||
|
||||
#define SB_LIST_ITEM_FIRST(item_p, head_p) \
|
||||
((item_p)->prev_p != (head_p))
|
||||
|
||||
#define SB_LIST_ITEM_LAST(item_p, head_p) \
|
||||
((item_p)->next_p != (head_p))
|
||||
|
||||
#define SB_LIST_ITEM_NEXT(item_p) \
|
||||
((item_p)->next_p)
|
||||
|
||||
#define SB_LIST_ITEM_PREV(item_p) \
|
||||
((item_p)->prev_p)
|
||||
|
||||
#define SB_LIST_ENTRY(ptr, type, member) \
|
||||
((type *)((char *)(ptr) - offsetof(type, member)))
|
||||
|
||||
#define SB_LIST_FOR_EACH(pos_p, head_p) \
|
||||
for (pos_p = (head_p)->next_p; pos_p != (head_p); pos_p = pos_p->next_p)
|
||||
|
||||
#define SB_LIST_FOR_EACH_SAFE(pos_p, temp_p, head_p) \
|
||||
for (pos_p = (head_p)->next_p, temp_p = (pos_p)->next_p; pos_p != (head_p); \
|
||||
pos_p = temp_p, temp_p = (pos_p)->next_p)
|
||||
|
||||
#define SB_LIST_FOR_EACH_REV_SAFE(pos_p, temp_p, head_p) \
|
||||
for (pos_p = (head_p)->prev_p, temp_p = (pos_p)->prev_p; pos_p != (head_p); \
|
||||
pos_p = temp_p, temp_p = (pos_p)->prev_p)
|
||||
|
||||
#endif /* SB_LIST_H */
|
||||
726
sysbench/sb_logger.c
Normal file
726
sysbench/sb_logger.c
Normal file
@ -0,0 +1,726 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdio.h>
|
||||
# include <stdarg.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_ERRNO_H
|
||||
# include <errno.h>
|
||||
#endif
|
||||
#ifdef HAVE_MATH_H
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
#include "sysbench.h"
|
||||
#include "sb_list.h"
|
||||
#include "sb_logger.h"
|
||||
|
||||
/* Format of the timestamp string */
|
||||
#define TIMESTAMP_FMT "[%s] "
|
||||
|
||||
#define TEXT_BUFFER_SIZE 4096
|
||||
#define ERROR_BUFFER_SIZE 256
|
||||
|
||||
#define OPER_LOG_GRANULARITY 100000
|
||||
#define OPER_LOG_MIN_VALUE 1
|
||||
#define OPER_LOG_MAX_VALUE 1E13
|
||||
|
||||
typedef enum {
|
||||
BATCH_STATUS_START,
|
||||
BATCH_STATUS_STOP
|
||||
} batch_status_t;
|
||||
|
||||
/* Array of message handlers (one chain per message type) */
|
||||
|
||||
static sb_list_t handlers[LOG_MSG_TYPE_MAX];
|
||||
|
||||
/* set after logger initialization */
|
||||
static unsigned char initialized;
|
||||
|
||||
/* verbosity of messages */
|
||||
static unsigned char verbosity;
|
||||
|
||||
/* whether each message must be timestamped */
|
||||
static unsigned char log_timestamp;
|
||||
|
||||
/* whether batch mode must be used */
|
||||
static unsigned char batch_mode;
|
||||
|
||||
/* delay in seconds between statistics dumps in batch mode */
|
||||
static unsigned int batch_delay;
|
||||
|
||||
/* array of operation response times for operations handler */
|
||||
static unsigned int operations[OPER_LOG_GRANULARITY];
|
||||
static double oper_log_deduct;
|
||||
static double oper_log_mult;
|
||||
static unsigned int oper_percentile;
|
||||
static pthread_mutex_t oper_mutex; /* used to sync access to operations array */
|
||||
static pthread_mutex_t batch_mutex; /* used to sync batch operations */
|
||||
static pthread_cond_t batch_cond;
|
||||
static pthread_t batch_thread;
|
||||
static batch_status_t batch_status;
|
||||
|
||||
static pthread_mutex_t text_mutex;
|
||||
static unsigned int text_cnt;
|
||||
static char text_buf[TEXT_BUFFER_SIZE];
|
||||
|
||||
static int text_handler_init(void);
|
||||
static int text_handler_process(log_msg_t *msg);
|
||||
|
||||
static int oper_handler_init(void);
|
||||
static int oper_handler_process(log_msg_t *msg);
|
||||
static int oper_handler_done(void);
|
||||
|
||||
/* Built-in log handlers */
|
||||
|
||||
/* Text messages handler */
|
||||
|
||||
static sb_arg_t text_handler_args[] =
|
||||
{
|
||||
{"verbosity", "verbosity level {5 - debug, 0 - only critical messages}",
|
||||
SB_ARG_TYPE_INT, "4"},
|
||||
{NULL, NULL, SB_ARG_TYPE_NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
static log_handler_t text_handler = {
|
||||
.ops = {
|
||||
.init = &text_handler_init,
|
||||
.process = &text_handler_process,
|
||||
.done = NULL,
|
||||
},
|
||||
.args = text_handler_args,
|
||||
.listitem = {NULL, NULL}
|
||||
};
|
||||
|
||||
/* Operation start/stop messages handler */
|
||||
|
||||
static sb_arg_t oper_handler_args[] =
|
||||
{
|
||||
{"percentile", "percentile rank of query response times to count",
|
||||
SB_ARG_TYPE_INT, "95"},
|
||||
{"batch", "dump current stats periodically instead of final ones",
|
||||
SB_ARG_TYPE_FLAG, "off"},
|
||||
{"batch-delay", "delay between batch dumps in seconds",
|
||||
SB_ARG_TYPE_INT, "300"},
|
||||
|
||||
{NULL, NULL, SB_ARG_TYPE_NULL, NULL}
|
||||
};
|
||||
|
||||
static log_handler_t oper_handler = {
|
||||
.ops = {
|
||||
.init = oper_handler_init,
|
||||
.process = &oper_handler_process,
|
||||
.done = oper_handler_done,
|
||||
},
|
||||
.args = oper_handler_args,
|
||||
.listitem = {NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
/* Start routine for the batch thread */
|
||||
void *batch_runner_proc(void *);
|
||||
|
||||
|
||||
/* Register logger and all handlers */
|
||||
|
||||
|
||||
int log_register(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < LOG_MSG_TYPE_MAX; i++)
|
||||
SB_LIST_INIT(handlers + i);
|
||||
|
||||
log_add_handler(LOG_MSG_TYPE_TEXT, &text_handler);
|
||||
log_add_handler(LOG_MSG_TYPE_OPER, &oper_handler);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Initialize logger and all handlers */
|
||||
|
||||
|
||||
int log_init(void)
|
||||
{
|
||||
unsigned int i;
|
||||
sb_list_item_t *pos;
|
||||
log_handler_t *handler;
|
||||
|
||||
for (i = 0; i < LOG_MSG_TYPE_MAX; i++)
|
||||
{
|
||||
SB_LIST_FOR_EACH(pos, handlers + i)
|
||||
{
|
||||
handler = SB_LIST_ENTRY(pos, log_handler_t, listitem);
|
||||
if (handler->ops.init != NULL && handler->ops.init())
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* required to let log_text() pass messages to handlers */
|
||||
initialized = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Uninitialize logger and all handlers */
|
||||
|
||||
|
||||
void log_done(void)
|
||||
{
|
||||
unsigned int i;
|
||||
sb_list_item_t *pos;
|
||||
log_handler_t *handler;
|
||||
|
||||
for (i = 0; i < LOG_MSG_TYPE_MAX; i++)
|
||||
{
|
||||
SB_LIST_FOR_EACH(pos, handlers + i)
|
||||
{
|
||||
handler = SB_LIST_ENTRY(pos, log_handler_t, listitem);
|
||||
if (handler->ops.done != NULL)
|
||||
handler->ops.done();
|
||||
}
|
||||
}
|
||||
|
||||
initialized = 0;
|
||||
}
|
||||
|
||||
|
||||
/* Add handler for a specified type of messages */
|
||||
|
||||
|
||||
int log_add_handler(log_msg_type_t type, log_handler_t *handler)
|
||||
{
|
||||
if (type <= LOG_MSG_TYPE_MIN || type >= LOG_MSG_TYPE_MAX)
|
||||
return 1;
|
||||
|
||||
if (handler->args != NULL)
|
||||
sb_register_arg_set(handler->args);
|
||||
|
||||
SB_LIST_ADD_TAIL(&handler->listitem, handlers + type);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Main function to dispatch log messages */
|
||||
|
||||
|
||||
void log_msg(log_msg_t *msg)
|
||||
{
|
||||
sb_list_item_t *pos;
|
||||
log_handler_t *handler;
|
||||
|
||||
SB_LIST_FOR_EACH(pos, handlers + msg->type)
|
||||
{
|
||||
handler = SB_LIST_ENTRY(pos, log_handler_t, listitem);
|
||||
if (handler->ops.process != NULL)
|
||||
handler->ops.process(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* printf-like wrapper to log text messages */
|
||||
|
||||
|
||||
void log_text(log_msg_priority_t priority, const char *fmt, ...)
|
||||
{
|
||||
log_msg_t msg;
|
||||
log_msg_text_t text_msg;
|
||||
char buf[TEXT_BUFFER_SIZE];
|
||||
va_list ap;
|
||||
int n, clen, maxlen;
|
||||
struct tm tm_now;
|
||||
time_t t_now;
|
||||
|
||||
maxlen = TEXT_BUFFER_SIZE;
|
||||
clen = 0;
|
||||
|
||||
if (log_timestamp)
|
||||
{
|
||||
time(&t_now);
|
||||
gmtime_r((const time_t *)&t_now, &tm_now);
|
||||
n = strftime(buf, maxlen, TIMESTAMP_FMT, &tm_now);
|
||||
clen += n;
|
||||
maxlen -= n;
|
||||
}
|
||||
|
||||
va_start(ap, fmt);
|
||||
n = vsnprintf(buf + clen, maxlen, fmt, ap);
|
||||
va_end(ap);
|
||||
if (n < 0 || n >= maxlen)
|
||||
n = maxlen;
|
||||
clen += n;
|
||||
maxlen -= n;
|
||||
snprintf(buf + clen, maxlen, "\n");
|
||||
|
||||
/*
|
||||
No race condition here because log_init() is supposed to be called
|
||||
in a single-threaded stage
|
||||
*/
|
||||
if (!initialized)
|
||||
{
|
||||
printf("%s", buf);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
msg.type = LOG_MSG_TYPE_TEXT;
|
||||
msg.data = (void *)&text_msg;
|
||||
text_msg.priority = priority;
|
||||
text_msg.text = buf;
|
||||
|
||||
log_msg(&msg);
|
||||
}
|
||||
|
||||
|
||||
/* printf-like wrapper to log system error messages */
|
||||
|
||||
|
||||
void log_errno(log_msg_priority_t priority, const char *fmt, ...)
|
||||
{
|
||||
char buf[TEXT_BUFFER_SIZE];
|
||||
char errbuf[ERROR_BUFFER_SIZE];
|
||||
va_list ap;
|
||||
int n;
|
||||
int old_errno;
|
||||
char *tmp;
|
||||
|
||||
old_errno = errno;
|
||||
#ifdef HAVE_STRERROR_R
|
||||
#ifdef STRERROR_R_CHAR_P
|
||||
tmp = strerror_r(old_errno, errbuf, ERROR_BUFFER_SIZE);
|
||||
#else
|
||||
strerror_r(old_errno, errbuf, ERROR_BUFFER_SIZE);
|
||||
tmp = errbuf;
|
||||
#endif /* STRERROR_R_CHAR_P */
|
||||
#else /* !HAVE_STRERROR_P */
|
||||
strncpy(errbuf, strerror(old_errno), sizeof(errbuf));
|
||||
tmp = errbuf;
|
||||
#endif
|
||||
|
||||
va_start(ap, fmt);
|
||||
n = vsnprintf(buf, TEXT_BUFFER_SIZE, fmt, ap);
|
||||
va_end(ap);
|
||||
if (n < 0 || n == TEXT_BUFFER_SIZE)
|
||||
return;
|
||||
snprintf(buf + n, TEXT_BUFFER_SIZE - n, " errno = %d (%s)", old_errno,
|
||||
tmp);
|
||||
|
||||
log_text(priority, "%s", buf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Initialize text handler */
|
||||
|
||||
|
||||
int text_handler_init(void)
|
||||
{
|
||||
verbosity = sb_get_value_int("verbosity");
|
||||
|
||||
if (verbosity > LOG_DEBUG)
|
||||
{
|
||||
printf("Invalid value for verbosity: %d\n", verbosity);
|
||||
return 1;
|
||||
}
|
||||
|
||||
pthread_mutex_init(&text_mutex, NULL);
|
||||
text_cnt = 0;
|
||||
text_buf[0] = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Print text message to the log */
|
||||
|
||||
|
||||
int text_handler_process(log_msg_t *msg)
|
||||
{
|
||||
char *prefix;
|
||||
log_msg_text_t *text_msg = (log_msg_text_t *)msg->data;
|
||||
|
||||
if (text_msg->priority > verbosity)
|
||||
return 0;
|
||||
|
||||
pthread_mutex_lock(&text_mutex);
|
||||
if (!strcmp(text_buf, text_msg->text))
|
||||
{
|
||||
text_cnt++;
|
||||
pthread_mutex_unlock(&text_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (text_cnt > 0)
|
||||
printf("(last message repeated %u times)\n", text_cnt);
|
||||
|
||||
text_cnt = 0;
|
||||
strncpy(text_buf, text_msg->text, TEXT_BUFFER_SIZE);
|
||||
}
|
||||
pthread_mutex_unlock(&text_mutex);
|
||||
|
||||
switch (text_msg->priority) {
|
||||
case LOG_FATAL:
|
||||
prefix = "FATAL: ";
|
||||
break;
|
||||
case LOG_ALERT:
|
||||
prefix = "ALERT: ";
|
||||
break;
|
||||
case LOG_WARNING:
|
||||
prefix = "WARNING: ";
|
||||
break;
|
||||
case LOG_DEBUG:
|
||||
prefix = "DEBUG: ";
|
||||
break;
|
||||
default:
|
||||
prefix = "";
|
||||
break;
|
||||
}
|
||||
|
||||
printf("%s%s", prefix, text_msg->text);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Initialize operation messages handler */
|
||||
|
||||
|
||||
int oper_handler_init(void)
|
||||
{
|
||||
pthread_attr_t batch_attr;
|
||||
|
||||
oper_percentile = sb_get_value_int("percentile");
|
||||
if (oper_percentile < 1 || oper_percentile > 100)
|
||||
{
|
||||
log_text(LOG_FATAL, "Invalid value for percentile option: %d",
|
||||
oper_percentile);
|
||||
return 1;
|
||||
}
|
||||
|
||||
oper_log_deduct = log(OPER_LOG_MIN_VALUE);
|
||||
oper_log_mult = (OPER_LOG_GRANULARITY - 1) / (log(OPER_LOG_MAX_VALUE) - oper_log_deduct);
|
||||
|
||||
batch_mode = sb_get_value_flag("batch");
|
||||
if (batch_mode)
|
||||
log_timestamp = 1;
|
||||
batch_delay = sb_get_value_int("batch-delay");
|
||||
|
||||
pthread_mutex_init(&oper_mutex, NULL);
|
||||
|
||||
if (batch_mode)
|
||||
{
|
||||
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)
|
||||
{
|
||||
log_errno(LOG_FATAL, "Batch thread creation failed");
|
||||
return 1;
|
||||
}
|
||||
batch_status = BATCH_STATUS_STOP;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Process operation start/stop messages */
|
||||
|
||||
|
||||
int oper_handler_process(log_msg_t *msg)
|
||||
{
|
||||
double optime;
|
||||
unsigned int ncell;
|
||||
log_msg_oper_t *oper_msg = (log_msg_oper_t *)msg->data;
|
||||
|
||||
if (batch_mode)
|
||||
{
|
||||
pthread_mutex_lock(&batch_mutex);
|
||||
if (batch_status != BATCH_STATUS_START)
|
||||
{
|
||||
/* Wake up the batch thread */
|
||||
batch_status = BATCH_STATUS_START;
|
||||
pthread_cond_signal(&batch_cond);
|
||||
}
|
||||
pthread_mutex_unlock(&batch_mutex);
|
||||
}
|
||||
|
||||
if (oper_msg->action == LOG_MSG_OPER_START)
|
||||
{
|
||||
sb_timer_init(&oper_msg->timer);
|
||||
sb_timer_start(&oper_msg->timer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
optime = sb_timer_current(&oper_msg->timer);
|
||||
if (optime < OPER_LOG_MIN_VALUE)
|
||||
{
|
||||
log_text(LOG_WARNING, "Operation time (%f) is less than minimal counted value, "
|
||||
"counting as %f", optime, (double)OPER_LOG_MIN_VALUE);
|
||||
optime = OPER_LOG_MIN_VALUE;
|
||||
}
|
||||
else if (optime > OPER_LOG_MAX_VALUE)
|
||||
{
|
||||
log_text(LOG_WARNING, "Operation time (%f) is greater than maximal counted value, "
|
||||
"counting as %f", optime, (double)OPER_LOG_MAX_VALUE);
|
||||
optime = OPER_LOG_MAX_VALUE;
|
||||
}
|
||||
|
||||
ncell = floor((log(optime) - oper_log_deduct) * oper_log_mult + 0.5);
|
||||
pthread_mutex_lock(&oper_mutex);
|
||||
operations[ncell]++;
|
||||
pthread_mutex_unlock(&oper_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Uninitialize operations messages handler */
|
||||
|
||||
|
||||
int oper_handler_done(void)
|
||||
{
|
||||
double p;
|
||||
double diff;
|
||||
double pdiff;
|
||||
double optime;
|
||||
unsigned int i;
|
||||
unsigned int noper = 0;
|
||||
unsigned int nthreads;
|
||||
sb_timer_t t;
|
||||
/* variables to count thread fairness */
|
||||
double events_avg;
|
||||
double events_stddev;
|
||||
double time_avg;
|
||||
double time_stddev;
|
||||
|
||||
if (batch_mode)
|
||||
{
|
||||
/* 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))
|
||||
{
|
||||
log_errno(LOG_FATAL, "Batch thread join failed");
|
||||
return 1;
|
||||
}
|
||||
|
||||
pthread_mutex_destroy(&batch_mutex);
|
||||
pthread_cond_destroy(&batch_cond);
|
||||
}
|
||||
|
||||
sb_timer_init(&t);
|
||||
nthreads = sb_globals.num_threads;
|
||||
for(i = 0; i < nthreads; i++)
|
||||
t = merge_timers(&t,&(sb_globals.op_timers[i]));
|
||||
|
||||
/* Print total statistics */
|
||||
log_text(LOG_NOTICE, "");
|
||||
log_text(LOG_NOTICE, "Test execution summary:");
|
||||
log_text(LOG_NOTICE, " total time: %.4fs",
|
||||
NS2SEC(sb_timer_value(&sb_globals.exec_timer)));
|
||||
log_text(LOG_NOTICE, " total number of events: %lld",
|
||||
t.events);
|
||||
log_text(LOG_NOTICE, " total time taken by event execution: %.4f",
|
||||
NS2SEC(get_sum_time(&t)));
|
||||
|
||||
log_text(LOG_NOTICE, " per-request statistics:");
|
||||
log_text(LOG_NOTICE, " min: %.4fs",
|
||||
NS2SEC(get_min_time(&t)));
|
||||
log_text(LOG_NOTICE, " avg: %.4fs",
|
||||
NS2SEC(get_avg_time(&t)));
|
||||
log_text(LOG_NOTICE, " max: %.4fs",
|
||||
NS2SEC(get_max_time(&t)));
|
||||
|
||||
/* Print approx. percentile value for event execution times */
|
||||
if (t.events > 0)
|
||||
{
|
||||
/* Calculate element with a given percentile rank */
|
||||
pdiff = oper_percentile;
|
||||
for (i = 0; i < OPER_LOG_GRANULARITY; i++)
|
||||
{
|
||||
noper += operations[i];
|
||||
p = (double)noper / t.events * 100;
|
||||
diff = fabs(p - oper_percentile);
|
||||
if (diff > pdiff || fabs(diff) < 1e-6)
|
||||
break;
|
||||
pdiff = diff;
|
||||
}
|
||||
if (i > 0)
|
||||
i--;
|
||||
|
||||
/* Calculate response time corresponding to this element */
|
||||
optime = exp((double)i / oper_log_mult + oper_log_deduct);
|
||||
log_text(LOG_NOTICE, " approx. %3d percentile: %.4fs",
|
||||
oper_percentile, NS2SEC(optime));
|
||||
}
|
||||
log_text(LOG_NOTICE, "");
|
||||
|
||||
/*
|
||||
Check how fair thread distribution over task is.
|
||||
We check amount of events/thread as well as avg event execution time.
|
||||
Fairness is calculated in %, looking at maximum and average difference
|
||||
from the average time/request and req/thread
|
||||
*/
|
||||
events_avg = (double)t.events / nthreads;
|
||||
time_avg = NS2SEC(get_sum_time(&t)) / nthreads;
|
||||
events_stddev = 0;
|
||||
time_stddev = 0;
|
||||
for(i = 0; i < nthreads; i++)
|
||||
{
|
||||
diff = fabs(events_avg - sb_globals.op_timers[i].events);
|
||||
events_stddev += diff*diff;
|
||||
|
||||
diff = fabs(time_avg - NS2SEC(get_sum_time(&sb_globals.op_timers[i])));
|
||||
time_stddev += diff*diff;
|
||||
}
|
||||
events_stddev = sqrt(events_stddev / nthreads);
|
||||
time_stddev = sqrt(time_stddev / nthreads);
|
||||
|
||||
log_text(LOG_NOTICE, "Threads fairness:");
|
||||
log_text(LOG_NOTICE, " events (avg/stddev): %.4f/%3.2f",
|
||||
events_avg, events_stddev);
|
||||
log_text(LOG_NOTICE, " execution time (avg/stddev): %.4f/%3.2f",
|
||||
time_avg, time_stddev);
|
||||
log_text(LOG_NOTICE, "");
|
||||
|
||||
if (sb_globals.debug)
|
||||
{
|
||||
log_text(LOG_DEBUG, "Verbose per-thread statistics:\n");
|
||||
for(i = 0; i < nthreads; i++)
|
||||
{
|
||||
log_text(LOG_DEBUG, " thread #%3d: min: %.4fs avg: %.4fs max: %.4fs "
|
||||
"events: %lld",i,
|
||||
NS2SEC(get_min_time(&sb_globals.op_timers[i])),
|
||||
NS2SEC(get_avg_time(&sb_globals.op_timers[i])),
|
||||
NS2SEC(get_max_time(&sb_globals.op_timers[i])),
|
||||
sb_globals.op_timers[i].events);
|
||||
log_text(LOG_DEBUG, " "
|
||||
"total time taken by even execution: %.4fs",
|
||||
NS2SEC(get_sum_time(&sb_globals.op_timers[i]))
|
||||
);
|
||||
}
|
||||
log_text(LOG_NOTICE, "");
|
||||
}
|
||||
|
||||
pthread_mutex_destroy(&oper_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Worker thread to periodically dump stats in batch mode */
|
||||
|
||||
|
||||
void *batch_runner_proc(void *arg)
|
||||
{
|
||||
sb_timer_t t;
|
||||
struct timespec delay;
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
struct timeval tv;
|
||||
#endif
|
||||
int rc;
|
||||
unsigned int i, noper;
|
||||
double diff, pdiff, p, percent, optime;
|
||||
|
||||
(void)arg; /* unused */
|
||||
|
||||
/* Wait for the test to start */
|
||||
pthread_mutex_lock(&batch_mutex);
|
||||
pthread_cond_wait(&batch_cond, &batch_mutex);
|
||||
pthread_mutex_unlock(&batch_mutex);
|
||||
|
||||
/* Main batch loop */
|
||||
while(batch_status != BATCH_STATUS_STOP)
|
||||
{
|
||||
/* Wait for batch_delay seconds */
|
||||
pthread_mutex_lock(&batch_mutex);
|
||||
|
||||
#ifdef HAVE_CLOCK_GETTIME
|
||||
clock_gettime(CLOCK_REALTIME, &delay);
|
||||
delay.tv_sec += batch_delay;
|
||||
#else
|
||||
gettimeofday(&tv, NULL);
|
||||
delay.tv_sec = tv.tv_sec + batch_delay;
|
||||
delay.tv_nsec = tv.tv_usec * 1000;
|
||||
#endif
|
||||
rc = pthread_cond_timedwait(&batch_cond, &batch_mutex, &delay);
|
||||
pthread_mutex_unlock(&batch_mutex);
|
||||
|
||||
/* Status changed? */
|
||||
if (rc != ETIMEDOUT)
|
||||
continue;
|
||||
|
||||
/* Dump current statistics */
|
||||
|
||||
/* Calculate min/avg/max values for the last period */
|
||||
sb_timer_init(&t);
|
||||
for(i = 0; i < sb_globals.num_threads; i++)
|
||||
t = merge_timers(&t,&(sb_globals.op_timers[i]));
|
||||
|
||||
/* Do we have any events to measure? */
|
||||
if (t.events == 0)
|
||||
continue;
|
||||
|
||||
/* Calculate percentile value for the last period */
|
||||
percent = 0;
|
||||
pthread_mutex_lock(&oper_mutex);
|
||||
|
||||
/* Calculate element with a given percentile rank */
|
||||
pdiff = oper_percentile;
|
||||
noper = 0;
|
||||
for (i = 0; i < OPER_LOG_GRANULARITY; i++)
|
||||
{
|
||||
noper += operations[i];
|
||||
p = (double)noper / t.events * 100;
|
||||
diff = fabs(p - oper_percentile);
|
||||
if (diff > pdiff || fabs(diff) < 1e-6)
|
||||
break;
|
||||
pdiff = diff;
|
||||
}
|
||||
if (i > 0)
|
||||
i--;
|
||||
|
||||
/* Calculate response time corresponding to this element */
|
||||
optime = exp((double)i / oper_log_mult + oper_log_deduct);
|
||||
pthread_mutex_unlock(&oper_mutex);
|
||||
|
||||
log_text(LOG_NOTICE, "min: %.4f avg: %.4f max: %.4f percentile: %.4f",
|
||||
NS2SEC(get_min_time(&t)), NS2SEC(get_avg_time(&t)),
|
||||
NS2SEC(get_max_time(&t)), NS2SEC(optime));
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
145
sysbench/sb_logger.h
Normal file
145
sysbench/sb_logger.h
Normal file
@ -0,0 +1,145 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SB_LOGGER_H
|
||||
#define SB_LOGGER_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "sb_options.h"
|
||||
#include "sb_timer.h"
|
||||
|
||||
/* Macros to log per-request execution statistics */
|
||||
|
||||
#define LOG_EVENT_START(msg, thread_id) \
|
||||
do \
|
||||
{ \
|
||||
sb_timer_start(&sb_globals.op_timers[thread_id]); \
|
||||
((log_msg_oper_t *)(msg).data)->action = LOG_MSG_OPER_START; \
|
||||
log_msg(&(msg)); \
|
||||
} while (0);
|
||||
|
||||
#define LOG_EVENT_STOP(msg, thread_id) \
|
||||
do \
|
||||
{ \
|
||||
((log_msg_oper_t *)(msg).data)->action = LOG_MSG_OPER_STOP; \
|
||||
log_msg(&(msg)); \
|
||||
sb_timer_stop(&sb_globals.op_timers[thread_id]); \
|
||||
} while (0);
|
||||
|
||||
/* Message types definition */
|
||||
|
||||
typedef enum {
|
||||
LOG_MSG_TYPE_MIN, /* used for internal purposes */
|
||||
LOG_MSG_TYPE_TEXT, /* arbitrary text messages */
|
||||
LOG_MSG_TYPE_OPER, /* operation start/stop messages */
|
||||
LOG_MSG_TYPE_MAX /* used for internal purposes */
|
||||
} log_msg_type_t;
|
||||
|
||||
/* Message priorities definition */
|
||||
|
||||
typedef enum {
|
||||
LOG_FATAL, /* system is unusable */
|
||||
LOG_ALERT, /* user actions must be taken */
|
||||
LOG_WARNING, /* warnings */
|
||||
LOG_NOTICE, /* normal but significant messages */
|
||||
LOG_INFO, /* informational messages */
|
||||
LOG_DEBUG, /* debug-level messages */
|
||||
LOG_MAX /* used for internal purposes */
|
||||
} log_msg_priority_t;
|
||||
|
||||
/* Text message definition */
|
||||
|
||||
typedef struct {
|
||||
log_msg_priority_t priority;
|
||||
char *text;
|
||||
} log_msg_text_t;
|
||||
|
||||
/* Operation start/stop message definition */
|
||||
|
||||
typedef enum {
|
||||
LOG_MSG_OPER_START,
|
||||
LOG_MSG_OPER_STOP
|
||||
} log_msg_oper_action_t;
|
||||
|
||||
typedef struct {
|
||||
log_msg_oper_action_t action;
|
||||
sb_timer_t timer;
|
||||
} log_msg_oper_t;
|
||||
|
||||
/* General log message definition */
|
||||
|
||||
typedef struct {
|
||||
log_msg_type_t type;
|
||||
void *data;
|
||||
} log_msg_t;
|
||||
|
||||
/* Log handler operations definition */
|
||||
|
||||
typedef int log_op_register(void); /* register handler options */
|
||||
typedef int log_op_init(void); /* initialize log handler */
|
||||
typedef int log_op_process(log_msg_t *msg); /* process message */
|
||||
typedef int log_op_done(void); /* uninitialize log handler */
|
||||
|
||||
/* Log handler operations structure */
|
||||
|
||||
typedef struct {
|
||||
log_op_init *init;
|
||||
log_op_process *process;
|
||||
log_op_done *done;
|
||||
} log_handler_ops_t;
|
||||
|
||||
/* Log handler definition */
|
||||
|
||||
typedef struct {
|
||||
log_handler_ops_t ops; /* handler operations */
|
||||
sb_arg_t *args; /* handler arguments */
|
||||
|
||||
sb_list_item_t listitem; /* can be linked in a list */
|
||||
} log_handler_t;
|
||||
|
||||
/* Register logger */
|
||||
|
||||
int log_register(void);
|
||||
|
||||
/* Initialize logger */
|
||||
|
||||
int log_init(void);
|
||||
|
||||
/* Add handler for a specified type of messages */
|
||||
|
||||
int log_add_handler(log_msg_type_t type, log_handler_t *handler);
|
||||
|
||||
/* Main function to dispatch log messages */
|
||||
|
||||
void log_msg(log_msg_t *);
|
||||
|
||||
/* printf-like wrapper to log text messages */
|
||||
|
||||
void log_text(log_msg_priority_t priority, const char *fmt, ...);
|
||||
|
||||
/* printf-like wrapper to log system error messages */
|
||||
|
||||
void log_errno(log_msg_priority_t priority, const char *fmt, ...);
|
||||
|
||||
/* Uninitialize logger */
|
||||
|
||||
void log_done(void);
|
||||
|
||||
#endif /* SB_LOGGER_H */
|
||||
591
sysbench/sb_options.c
Normal file
591
sysbench/sb_options.c
Normal file
@ -0,0 +1,591 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include <ctype.h>
|
||||
#endif
|
||||
|
||||
#include "sb_options.h"
|
||||
|
||||
#define VALUE_DELIMITER '='
|
||||
#define VALUE_SEPARATOR ','
|
||||
#define COMMENT_CHAR '#'
|
||||
|
||||
#define MAXSTRLEN 256
|
||||
|
||||
/* Global options list */
|
||||
static sb_list_t options;
|
||||
|
||||
/* List of size modifiers (kilo, mega, giga, tera) */
|
||||
static const char sizemods[] = "KMGT";
|
||||
|
||||
/* Initialize options library */
|
||||
|
||||
|
||||
int sb_options_init(void)
|
||||
{
|
||||
SB_LIST_INIT(&options);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Register set of command line arguments */
|
||||
|
||||
|
||||
int sb_register_arg_set(sb_arg_t *set)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i=0; set[i].name != NULL; i++)
|
||||
if (set_option(set[i].name, set[i].value, set[i].type))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
option_t *sb_find_option(char *name)
|
||||
{
|
||||
return find_option(&options, name);
|
||||
}
|
||||
|
||||
int set_option(char *name, char *value, sb_arg_type_t type)
|
||||
{
|
||||
option_t *opt;
|
||||
|
||||
opt = add_option(&options, name);
|
||||
if (opt == NULL)
|
||||
return 1;
|
||||
free_values(&opt->values);
|
||||
opt->type = type;
|
||||
if (type != SB_ARG_TYPE_FLAG && (value == NULL || value[0] == '\0'))
|
||||
return 0;
|
||||
|
||||
switch (type) {
|
||||
case SB_ARG_TYPE_FLAG:
|
||||
if (value == NULL || !strcmp(value, "on"))
|
||||
add_value(&opt->values, "on");
|
||||
break;
|
||||
case SB_ARG_TYPE_INT:
|
||||
case SB_ARG_TYPE_SIZE:
|
||||
case SB_ARG_TYPE_FLOAT:
|
||||
case SB_ARG_TYPE_STRING:
|
||||
add_value(&opt->values, value);
|
||||
break;
|
||||
case SB_ARG_TYPE_LIST:
|
||||
for (value = strtok(value, ","); value != NULL; value = strtok(NULL, ","))
|
||||
add_value(&opt->values, value);
|
||||
break;
|
||||
default:
|
||||
printf("Unknown argument type: %d", type);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void sb_print_options(sb_arg_t *opts)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned int len;
|
||||
unsigned int maxlen;
|
||||
char *fmt;
|
||||
|
||||
/* Count the maximum name length */
|
||||
for (i = 0, maxlen = 0; opts[i].name != NULL; i++)
|
||||
{
|
||||
len = strlen(opts[i].name);
|
||||
if (len > maxlen)
|
||||
maxlen = len;
|
||||
}
|
||||
|
||||
for (i = 0; opts[i].name != NULL; i++)
|
||||
{
|
||||
switch (opts[i].type) {
|
||||
case SB_ARG_TYPE_FLAG:
|
||||
fmt = "=[on|off]";
|
||||
break;
|
||||
case SB_ARG_TYPE_LIST:
|
||||
fmt = "=[LIST,...]";
|
||||
break;
|
||||
case SB_ARG_TYPE_SIZE:
|
||||
fmt = "=SIZE";
|
||||
break;
|
||||
case SB_ARG_TYPE_INT:
|
||||
case SB_ARG_TYPE_FLOAT:
|
||||
fmt = "=N";
|
||||
break;
|
||||
case SB_ARG_TYPE_STRING:
|
||||
fmt = "=STRING";
|
||||
break;
|
||||
default:
|
||||
fmt = "<UNKNOWN>";
|
||||
}
|
||||
printf(" --%s%-*s%s", opts[i].name,
|
||||
(int)(maxlen - strlen(opts[i].name) + 8), fmt,
|
||||
opts[i].desc);
|
||||
if (opts[i].value != NULL)
|
||||
printf(" [%s]", opts[i].value);
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
int sb_get_value_flag(char *name)
|
||||
{
|
||||
option_t *opt;
|
||||
|
||||
opt = find_option(&options, name);
|
||||
if (opt == NULL)
|
||||
return 0;
|
||||
|
||||
return !SB_LIST_IS_EMPTY(&opt->values);
|
||||
}
|
||||
|
||||
|
||||
int sb_get_value_int(char *name)
|
||||
{
|
||||
option_t *opt;
|
||||
value_t *val;
|
||||
sb_list_item_t *pos;
|
||||
|
||||
opt = find_option(&options, name);
|
||||
if (opt == NULL)
|
||||
return 0;
|
||||
|
||||
SB_LIST_FOR_EACH(pos, &opt->values)
|
||||
{
|
||||
val = SB_LIST_ENTRY(pos, value_t, listitem);
|
||||
return atoi(val->data);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
unsigned long long sb_get_value_size(char *name)
|
||||
{
|
||||
option_t *opt;
|
||||
value_t *val;
|
||||
sb_list_item_t *pos;
|
||||
unsigned long long res = 0;
|
||||
char mult = 0;
|
||||
int rc;
|
||||
unsigned int i, n;
|
||||
char *c;
|
||||
|
||||
opt = find_option(&options, name);
|
||||
if (opt == NULL)
|
||||
return 0;
|
||||
|
||||
SB_LIST_FOR_EACH(pos, &opt->values)
|
||||
{
|
||||
val = SB_LIST_ENTRY(pos, value_t, listitem);
|
||||
/*
|
||||
* Reimplentation of sscanf(val->data, "%llu%c", &res, &mult), since
|
||||
* there is little standartization about how to specify long long values
|
||||
*/
|
||||
res = 0;
|
||||
for (rc = 0, c = val->data; *c != '\0'; c++)
|
||||
{
|
||||
if (*c < '0' || *c > '9')
|
||||
{
|
||||
if (rc == 1)
|
||||
{
|
||||
rc = 2;
|
||||
mult = *c;
|
||||
}
|
||||
break;
|
||||
}
|
||||
rc = 1;
|
||||
res = res * 10 + *c - '0';
|
||||
}
|
||||
|
||||
if (rc == 2) {
|
||||
for (n = 0; sizemods[n] != '\0'; n++)
|
||||
if (mult == sizemods[n])
|
||||
break;
|
||||
if (sizemods[n] != '\0')
|
||||
{
|
||||
for (i = 0; i <= n; i++)
|
||||
res *= 1024;
|
||||
}
|
||||
else
|
||||
res = 0; /* Unknown size modifier */
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
float sb_get_value_float(char *name)
|
||||
{
|
||||
option_t *opt;
|
||||
value_t *val;
|
||||
sb_list_item_t *pos;
|
||||
float res;
|
||||
|
||||
opt = find_option(&options, name);
|
||||
if (opt == NULL)
|
||||
return 0;
|
||||
|
||||
SB_LIST_FOR_EACH(pos, &opt->values)
|
||||
{
|
||||
val = SB_LIST_ENTRY(pos, value_t, listitem);
|
||||
if (sscanf(val->data, "%f", &res) < 1)
|
||||
res = 0;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
char *sb_get_value_string(char *name)
|
||||
{
|
||||
option_t *opt;
|
||||
value_t *val;
|
||||
sb_list_item_t *pos;
|
||||
|
||||
opt = find_option(&options, name);
|
||||
if (opt == NULL)
|
||||
return NULL;
|
||||
|
||||
SB_LIST_FOR_EACH(pos, &opt->values)
|
||||
{
|
||||
val = SB_LIST_ENTRY(pos, value_t, listitem);
|
||||
return val->data;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
char *sb_print_value_size(char *buf, unsigned int buflen, double value)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < sizeof(sizemods) && value >= 1024; i++, value /= 1024)
|
||||
/* empty */ ;
|
||||
|
||||
if (i > 0)
|
||||
snprintf(buf, buflen, "%.5g%c", value, sizemods[i-1]);
|
||||
else
|
||||
snprintf(buf, buflen, "%.5g", value);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
value_t *new_value()
|
||||
{
|
||||
value_t *newval;
|
||||
|
||||
newval = (value_t *)malloc(sizeof(value_t));
|
||||
if (newval != NULL)
|
||||
memset(newval, 0, sizeof(value_t));
|
||||
|
||||
return newval;
|
||||
}
|
||||
|
||||
|
||||
option_t *new_option()
|
||||
{
|
||||
option_t *newopt;
|
||||
|
||||
newopt = (option_t *)malloc(sizeof(option_t));
|
||||
if (newopt != NULL)
|
||||
{
|
||||
memset(newopt, 0, sizeof(option_t));
|
||||
SB_LIST_INIT(&newopt->values);
|
||||
}
|
||||
|
||||
return newopt;
|
||||
}
|
||||
|
||||
|
||||
void free_values(sb_list_t *values)
|
||||
{
|
||||
sb_list_item_t *next;
|
||||
sb_list_item_t *cur;
|
||||
value_t *val;
|
||||
|
||||
if (values == NULL)
|
||||
return;
|
||||
|
||||
SB_LIST_FOR_EACH_SAFE(cur, next, values)
|
||||
{
|
||||
val = SB_LIST_ENTRY(cur, value_t, listitem);
|
||||
if (val->data != NULL)
|
||||
free(val->data);
|
||||
SB_LIST_DELETE(cur);
|
||||
free(val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void free_options(sb_list_t *options)
|
||||
{
|
||||
sb_list_item_t *next;
|
||||
sb_list_item_t *cur;
|
||||
option_t *opt;
|
||||
|
||||
if (options == NULL)
|
||||
return;
|
||||
|
||||
SB_LIST_FOR_EACH_SAFE(cur, next, options)
|
||||
{
|
||||
opt = SB_LIST_ENTRY(cur, option_t, listitem);
|
||||
if (opt->name != NULL)
|
||||
free(opt->name);
|
||||
free_values(&opt->values);
|
||||
free(opt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int remove_value(sb_list_t *values, char *valname)
|
||||
{
|
||||
value_t * value;
|
||||
|
||||
if (values == NULL || valname == NULL)
|
||||
return 1;
|
||||
|
||||
if ((value = find_value(values, valname)) == NULL)
|
||||
return 1;
|
||||
if (value->data != NULL)
|
||||
{
|
||||
free(value->data);
|
||||
}
|
||||
SB_LIST_DELETE(&value->listitem);
|
||||
free(value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int remove_option(sb_list_t * options, char * optname)
|
||||
{
|
||||
option_t * option;
|
||||
|
||||
if (options == NULL || optname == NULL)
|
||||
return 1;
|
||||
|
||||
if ((option = find_option(options, optname)) == NULL)
|
||||
return 1;
|
||||
free_values(&option->values);
|
||||
if (option->name != NULL)
|
||||
free(option->name);
|
||||
SB_LIST_DELETE(&option->listitem);
|
||||
free(option);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
value_t *add_value(sb_list_t *values, char *data)
|
||||
{
|
||||
value_t *newval;
|
||||
|
||||
if (values == NULL || data == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((newval = new_value()) == NULL)
|
||||
return NULL;
|
||||
if ((newval->data = strdup(data)) == NULL)
|
||||
{
|
||||
free(newval);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SB_LIST_ADD_TAIL(&newval->listitem, values);
|
||||
|
||||
return newval;
|
||||
}
|
||||
|
||||
|
||||
value_t *find_value(sb_list_t *values, char *data)
|
||||
{
|
||||
sb_list_item_t *pos;
|
||||
value_t *value;
|
||||
|
||||
if (values == NULL || data == NULL)
|
||||
return NULL;
|
||||
|
||||
SB_LIST_FOR_EACH(pos, values)
|
||||
{
|
||||
value = SB_LIST_ENTRY(pos, value_t, listitem);
|
||||
if (!strcmp(value->data, data))
|
||||
return value;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
option_t *add_option(sb_list_t *options, char *name)
|
||||
{
|
||||
option_t *option;
|
||||
|
||||
if (options == NULL || name == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((option = find_option(options, name)) != NULL)
|
||||
return option;
|
||||
|
||||
if ((option = new_option()) == NULL)
|
||||
return NULL;
|
||||
|
||||
option->name = strdup(name);
|
||||
|
||||
SB_LIST_ADD_TAIL(&option->listitem, options);
|
||||
|
||||
return option;
|
||||
}
|
||||
|
||||
|
||||
option_t *find_option(sb_list_t *options, char *name)
|
||||
{
|
||||
sb_list_item_t *pos;
|
||||
option_t *opt;
|
||||
|
||||
if (options == NULL || name == NULL)
|
||||
return NULL;
|
||||
|
||||
SB_LIST_FOR_EACH(pos, options)
|
||||
{
|
||||
opt = SB_LIST_ENTRY(pos, option_t, listitem);
|
||||
if (!strcmp(opt->name, name))
|
||||
return opt;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
sb_list_t *read_config(FILE *fp, sb_list_t *options)
|
||||
{
|
||||
char buf[MAXSTRLEN];
|
||||
char *tmp;
|
||||
char qc;
|
||||
option_t *newopt;
|
||||
int optlen;
|
||||
int nline;
|
||||
|
||||
if (fp == NULL || options == NULL)
|
||||
return NULL;
|
||||
|
||||
nline = 0;
|
||||
while (fgets(buf, MAXSTRLEN, fp) != NULL)
|
||||
{
|
||||
nline++;
|
||||
|
||||
tmp = strchr(buf, VALUE_DELIMITER);
|
||||
if (tmp == NULL)
|
||||
continue;
|
||||
if (*tmp != '\0')
|
||||
*tmp++ = '\0';
|
||||
|
||||
if ((newopt = add_option(options, buf)) == NULL)
|
||||
return NULL;
|
||||
while (*tmp != '\0')
|
||||
{
|
||||
if (isspace((int)*tmp))
|
||||
{
|
||||
tmp++;
|
||||
continue;
|
||||
}
|
||||
if (*tmp == COMMENT_CHAR)
|
||||
break;
|
||||
else if (*tmp == '\'' || *tmp == '\"')
|
||||
{
|
||||
qc = *tmp;
|
||||
for (tmp++, optlen = 0; tmp[optlen] != '\0' && tmp[optlen] != qc;
|
||||
optlen++)
|
||||
{
|
||||
/* Empty */
|
||||
}
|
||||
if (tmp[optlen] == '\0') {
|
||||
fprintf(stderr, "unexpected EOL on line %d\n", nline);
|
||||
return NULL;
|
||||
}
|
||||
tmp[optlen++] = '\0';
|
||||
add_value(&newopt->values, tmp);
|
||||
for (tmp = tmp + optlen; *tmp != '\0' && *tmp != VALUE_SEPARATOR; tmp++)
|
||||
{
|
||||
/* Empty */
|
||||
}
|
||||
if (*tmp == VALUE_SEPARATOR)
|
||||
tmp++;
|
||||
} else {
|
||||
for (optlen = 0; tmp[optlen] != '\0' && tmp[optlen] != VALUE_SEPARATOR;
|
||||
optlen++)
|
||||
{
|
||||
/* Empty */
|
||||
}
|
||||
if (tmp[optlen] != '\0')
|
||||
tmp[optlen++] = '\0';
|
||||
add_value(&newopt->values, tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
int write_config(FILE *fp, sb_list_t *options)
|
||||
{
|
||||
option_t *opt;
|
||||
value_t *val;
|
||||
sb_list_item_t *pos_opt;
|
||||
sb_list_item_t *pos_val;
|
||||
|
||||
if (fp == NULL || options == NULL)
|
||||
return 1;
|
||||
|
||||
SB_LIST_FOR_EACH(pos_opt, options)
|
||||
{
|
||||
opt = SB_LIST_ENTRY(pos_opt, option_t, listitem);
|
||||
if (opt->ignore || opt->name == NULL)
|
||||
continue;
|
||||
opt->ignore = 1;
|
||||
fprintf(fp, "%s %c ", opt->name, VALUE_DELIMITER);
|
||||
SB_LIST_FOR_EACH(pos_val, &opt->values)
|
||||
{
|
||||
val = SB_LIST_ENTRY(pos_val, value_t, listitem);
|
||||
if (!val->ignore && val->data != NULL)
|
||||
fprintf(fp, "%s", val->data);
|
||||
if (!SB_LIST_ITEM_LAST(pos_val, &opt->values))
|
||||
fprintf(fp, "%c ", VALUE_SEPARATOR);
|
||||
}
|
||||
fputc('\n', fp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
124
sysbench/sb_options.h
Normal file
124
sysbench/sb_options.h
Normal file
@ -0,0 +1,124 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef OPTIONS_H
|
||||
|
||||
#define OPTIONS_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include "sb_list.h"
|
||||
|
||||
/* Option types definition */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SB_ARG_TYPE_NULL,
|
||||
SB_ARG_TYPE_FLAG,
|
||||
SB_ARG_TYPE_INT,
|
||||
SB_ARG_TYPE_SIZE,
|
||||
SB_ARG_TYPE_FLOAT,
|
||||
SB_ARG_TYPE_STRING,
|
||||
SB_ARG_TYPE_LIST
|
||||
} sb_arg_type_t;
|
||||
|
||||
/* Test option definition */
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
char *desc;
|
||||
sb_arg_type_t type;
|
||||
char * value;
|
||||
} sb_arg_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *data;
|
||||
char ignore;
|
||||
|
||||
sb_list_item_t listitem;
|
||||
} value_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *name;
|
||||
sb_arg_type_t type;
|
||||
sb_list_t values;
|
||||
char ignore;
|
||||
|
||||
sb_list_item_t listitem;
|
||||
} option_t;
|
||||
|
||||
/* Initilize options library */
|
||||
int sb_options_init(void);
|
||||
|
||||
/* Register set of command line arguments */
|
||||
int sb_register_arg_set(sb_arg_t *set);
|
||||
|
||||
/* Set value 'value' of type 'type' for option 'name' */
|
||||
int set_option(char *name, char *value, sb_arg_type_t type);
|
||||
|
||||
/* Find option specified by 'name' */
|
||||
option_t *sb_find_option(char *name);
|
||||
|
||||
/* Print list of options specified by 'opts' */
|
||||
void sb_print_options(sb_arg_t *opts);
|
||||
|
||||
int sb_get_value_flag(char *name);
|
||||
|
||||
int sb_get_value_int(char *name);
|
||||
|
||||
unsigned long long sb_get_value_size(char *name);
|
||||
|
||||
float sb_get_value_float(char *name);
|
||||
|
||||
char *sb_get_value_string(char *name);
|
||||
|
||||
char *sb_print_value_size(char *buf, unsigned int buflen, double value);
|
||||
|
||||
value_t *new_value(void);
|
||||
|
||||
option_t *new_option(void);
|
||||
|
||||
void free_values(sb_list_t *);
|
||||
|
||||
void free_options(sb_list_t *);
|
||||
|
||||
value_t *add_value(sb_list_t *, char *);
|
||||
|
||||
value_t *find_value(sb_list_t *, char *);
|
||||
|
||||
option_t *add_option(sb_list_t *, char *);
|
||||
|
||||
option_t *find_option(sb_list_t *, char *);
|
||||
|
||||
int remove_value(sb_list_t *, char *);
|
||||
|
||||
int remove_option(sb_list_t *, char *);
|
||||
|
||||
sb_list_t *read_config(FILE *, sb_list_t *);
|
||||
|
||||
int write_config(FILE *, sb_list_t *);
|
||||
|
||||
#endif /* OPTIONS_H */
|
||||
|
||||
194
sysbench/sb_timer.c
Normal file
194
sysbench/sb_timer.c
Normal file
@ -0,0 +1,194 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include "sb_logger.h"
|
||||
#include "sb_timer.h"
|
||||
|
||||
/* Some functions for simple time operations */
|
||||
|
||||
/* initialize timer */
|
||||
|
||||
|
||||
void sb_timer_init(sb_timer_t *t)
|
||||
{
|
||||
t->min_time = 0xffffffffffffffffULL;
|
||||
t->max_time = 0;
|
||||
t->sum_time = 0;
|
||||
t->events = 0;
|
||||
t->state = TIMER_INITIALIZED;
|
||||
}
|
||||
|
||||
|
||||
/* start timer */
|
||||
|
||||
|
||||
void sb_timer_start(sb_timer_t *t)
|
||||
{
|
||||
switch (t->state) {
|
||||
case TIMER_INITIALIZED:
|
||||
case TIMER_STOPPED:
|
||||
break;
|
||||
case TIMER_RUNNING:
|
||||
log_text(LOG_WARNING, "timer was already started");
|
||||
break;
|
||||
default:
|
||||
log_text(LOG_FATAL, "uninitialized timer started");
|
||||
abort();
|
||||
}
|
||||
|
||||
SB_GETTIME(&t->time_start);
|
||||
t->state = TIMER_RUNNING;
|
||||
}
|
||||
|
||||
|
||||
/* stop timer */
|
||||
|
||||
|
||||
void sb_timer_stop(sb_timer_t *t)
|
||||
{
|
||||
switch (t->state) {
|
||||
case TIMER_INITIALIZED:
|
||||
log_text(LOG_WARNING, "timer was never started");
|
||||
break;
|
||||
case TIMER_STOPPED:
|
||||
log_text(LOG_WARNING, "timer was already stopped");
|
||||
break;
|
||||
case TIMER_RUNNING:
|
||||
break;
|
||||
default:
|
||||
log_text(LOG_FATAL, "uninitialized timer stopped");
|
||||
abort();
|
||||
}
|
||||
|
||||
SB_GETTIME(&t->time_end);
|
||||
t->my_time = SEC2NS(t->time_end.tv_sec - t->time_start.tv_sec) +
|
||||
(t->time_end.tv_nsec - t->time_start.tv_nsec);
|
||||
t->events++;
|
||||
t->sum_time += t->my_time;
|
||||
if (t->my_time < t->min_time)
|
||||
t->min_time = t->my_time;
|
||||
if (t->my_time > t->max_time)
|
||||
t->max_time = t->my_time;
|
||||
|
||||
t->state = TIMER_STOPPED;
|
||||
}
|
||||
|
||||
|
||||
/* get timer's value in nanoseconds */
|
||||
|
||||
|
||||
unsigned long long sb_timer_value(sb_timer_t *t)
|
||||
{
|
||||
return t->my_time;
|
||||
}
|
||||
|
||||
|
||||
/* get current time without stopping timer */
|
||||
|
||||
|
||||
unsigned long long sb_timer_current(sb_timer_t *t)
|
||||
{
|
||||
struct timespec time_end;
|
||||
|
||||
switch (t->state) {
|
||||
case TIMER_INITIALIZED:
|
||||
return 0;
|
||||
case TIMER_STOPPED:
|
||||
return t->my_time;
|
||||
case TIMER_RUNNING:
|
||||
break;
|
||||
default:
|
||||
log_text(LOG_FATAL, "uninitialized timer examined");
|
||||
abort();
|
||||
}
|
||||
|
||||
SB_GETTIME(&time_end);
|
||||
|
||||
return SEC2NS(time_end.tv_sec - t->time_start.tv_sec) +
|
||||
(time_end.tv_nsec - t->time_start.tv_nsec);
|
||||
}
|
||||
|
||||
|
||||
/* get average time per event */
|
||||
|
||||
|
||||
unsigned long long get_avg_time(sb_timer_t *t)
|
||||
{
|
||||
if(t->events == 0)
|
||||
return 0; /* return zero if there were no events */
|
||||
return (t->sum_time / t->events);
|
||||
}
|
||||
|
||||
|
||||
/* get total time for all events */
|
||||
|
||||
|
||||
unsigned long long get_sum_time(sb_timer_t *t)
|
||||
{
|
||||
return t->sum_time;
|
||||
}
|
||||
|
||||
|
||||
/* get minimum time */
|
||||
|
||||
|
||||
unsigned long long get_min_time(sb_timer_t *t)
|
||||
{
|
||||
return t->min_time;
|
||||
}
|
||||
|
||||
|
||||
/* get maximum time */
|
||||
|
||||
|
||||
unsigned long long get_max_time(sb_timer_t *t)
|
||||
{
|
||||
return t->max_time;
|
||||
}
|
||||
|
||||
|
||||
/* sum data from several timers. used in summing data from multiple threads */
|
||||
|
||||
|
||||
sb_timer_t merge_timers(sb_timer_t *t1, sb_timer_t *t2)
|
||||
{
|
||||
sb_timer_t t;
|
||||
|
||||
t.my_time = t1->my_time+t2->my_time;
|
||||
t.sum_time = t1->sum_time+t2->sum_time;
|
||||
t.events = t1->events+t2->events;
|
||||
|
||||
if (t1->max_time > t2->max_time)
|
||||
t.max_time = t1->max_time;
|
||||
else
|
||||
t.max_time = t2->max_time;
|
||||
|
||||
if (t1->min_time<t2->min_time)
|
||||
t.min_time = t1->min_time;
|
||||
else
|
||||
t.min_time = t2->min_time;
|
||||
|
||||
return t;
|
||||
}
|
||||
104
sysbench/sb_timer.h
Normal file
104
sysbench/sb_timer.h
Normal file
@ -0,0 +1,104 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SB_TIMER_H
|
||||
#define SB_TIMER_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Convert nanoseconds to seconds and vice versa */
|
||||
#define NS2SEC(msec) ((msec)/1000000000.)
|
||||
#define SEC2NS(sec) ((sec)*1000000000ULL)
|
||||
|
||||
|
||||
/* Wrapper over various *gettime* functions */
|
||||
#ifdef HAVE_CLOCK_GETTIME
|
||||
# define SB_GETTIME(tsp) clock_gettime(CLOCK_REALTIME, tsp)
|
||||
#else
|
||||
# define SB_GETTIME(tsp) \
|
||||
do { \
|
||||
struct timeval tv; \
|
||||
gettimeofday(&tv, NULL); \
|
||||
tsp->tv_sec = tv.tv_sec; \
|
||||
tsp->tv_nsec = tv.tv_usec * 1000; \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
typedef enum {TIMER_UNINITIALIZED, TIMER_INITIALIZED, TIMER_STOPPED, \
|
||||
TIMER_RUNNING} timer_state_t;
|
||||
|
||||
/* Timer structure definition */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
struct timespec time_start;
|
||||
struct timespec time_end;
|
||||
unsigned long long my_time;
|
||||
unsigned long long min_time;
|
||||
unsigned long long max_time;
|
||||
unsigned long long sum_time;
|
||||
unsigned long long events;
|
||||
timer_state_t state;
|
||||
} sb_timer_t;
|
||||
|
||||
|
||||
/* timer control functions */
|
||||
|
||||
/* Initialize timer */
|
||||
void sb_timer_init(sb_timer_t *);
|
||||
|
||||
/* start timer */
|
||||
void sb_timer_start(sb_timer_t *);
|
||||
|
||||
/* stop timer */
|
||||
void sb_timer_stop(sb_timer_t *);
|
||||
|
||||
/* get timer's value in microseconds */
|
||||
unsigned long long sb_timer_value(sb_timer_t *);
|
||||
|
||||
/* get current time without stopping timer */
|
||||
unsigned long long sb_timer_current(sb_timer_t *);
|
||||
|
||||
/* get average time per event */
|
||||
unsigned long long get_avg_time(sb_timer_t *);
|
||||
|
||||
/* get total time for all events */
|
||||
unsigned long long get_sum_time(sb_timer_t *);
|
||||
|
||||
/* get minimum time */
|
||||
unsigned long long get_min_time(sb_timer_t *);
|
||||
|
||||
/* get maximum time */
|
||||
unsigned long long get_max_time(sb_timer_t *);
|
||||
|
||||
/* sum data from two timers. used in summing data from multiple threads */
|
||||
sb_timer_t merge_timers(sb_timer_t *, sb_timer_t *);
|
||||
|
||||
#endif /* SB_TIMER_H */
|
||||
638
sysbench/sysbench.c
Normal file
638
sysbench/sysbench.c
Normal file
@ -0,0 +1,638 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
#ifdef HAVE_ERRNO_H
|
||||
# include <errno.h>
|
||||
#endif
|
||||
#ifdef HAVE_FCNTL_H
|
||||
# include <fcntl.h>
|
||||
#endif
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
#ifdef HAVE_THREAD_H
|
||||
# include <thread.h>
|
||||
#endif
|
||||
#ifdef HAVE_MATH_H
|
||||
# include <math.h>
|
||||
#endif
|
||||
#ifdef HAVE_SCHED_H
|
||||
# include <sched.h>
|
||||
#endif
|
||||
|
||||
#include "sysbench.h"
|
||||
#include "sb_options.h"
|
||||
|
||||
/* If we should initialize random numbers generator */
|
||||
static int init_rng;
|
||||
|
||||
/* Stack size for each thread */
|
||||
static int thread_stack_size;
|
||||
|
||||
/* General options */
|
||||
sb_arg_t general_args[] =
|
||||
{
|
||||
{"num-threads", "number of threads to use", SB_ARG_TYPE_INT, "1"},
|
||||
{"max-requests", "limit for total number of requests", SB_ARG_TYPE_INT, "10000"},
|
||||
{"max-time", "limit for total execution time in seconds", SB_ARG_TYPE_INT, "0"},
|
||||
{"thread-stack-size", "size of stack per thread", SB_ARG_TYPE_SIZE, "32K"},
|
||||
{"init-rng", "initialize random number generator", SB_ARG_TYPE_FLAG, "off"},
|
||||
{"test", "test to run", SB_ARG_TYPE_STRING, NULL},
|
||||
{"debug", "print more debugging info", SB_ARG_TYPE_FLAG, "off"},
|
||||
{"validate", "perform validation checks where possible", SB_ARG_TYPE_FLAG, "off"},
|
||||
{"help", "print help and exit", SB_ARG_TYPE_FLAG, NULL},
|
||||
{NULL, NULL, SB_ARG_TYPE_NULL, NULL}
|
||||
};
|
||||
|
||||
/* Our main thread descriptors */
|
||||
sb_thread_ctxt_t *threads;
|
||||
|
||||
/* List of available tests */
|
||||
sb_list_t tests;
|
||||
|
||||
/* Global variables */
|
||||
sb_globals_t sb_globals;
|
||||
|
||||
/* Mutexes */
|
||||
|
||||
/* used to start test with all threads ready */
|
||||
static pthread_mutex_t thread_start_mutex;
|
||||
static pthread_attr_t thread_attr;
|
||||
|
||||
static void print_header(void);
|
||||
static void print_usage(void);
|
||||
static void print_run_mode(sb_test_t *);
|
||||
|
||||
|
||||
/* Main request provider function */
|
||||
|
||||
|
||||
sb_request_t get_request(sb_test_t *test, int thread_id)
|
||||
{
|
||||
sb_request_t r;
|
||||
(void)thread_id; /* unused */
|
||||
|
||||
if (test->ops.get_request != NULL)
|
||||
r = test->ops.get_request();
|
||||
else
|
||||
{
|
||||
log_text(LOG_ALERT, "Unsupported mode! Creating NULL request.");
|
||||
r.type = SB_REQ_TYPE_NULL;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
/* Main request execution function */
|
||||
|
||||
|
||||
int execute_request(sb_test_t *test, sb_request_t *r,int thread_id)
|
||||
{
|
||||
unsigned int rc;
|
||||
|
||||
if (test->ops.execute_request != NULL)
|
||||
rc = test->ops.execute_request(r, thread_id);
|
||||
else
|
||||
{
|
||||
log_text(LOG_FATAL, "Unknown request. Aborting");
|
||||
rc = 1;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
int register_test(sb_test_t *test)
|
||||
{
|
||||
SB_LIST_ADD_TAIL(&test->listitem, &tests);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int register_tests(void)
|
||||
{
|
||||
SB_LIST_INIT(&tests);
|
||||
|
||||
/* Register tests */
|
||||
return register_test_fileio(&tests)
|
||||
+ register_test_cpu(&tests)
|
||||
+ register_test_memory(&tests)
|
||||
+ register_test_threads(&tests)
|
||||
+ register_test_mutex(&tests)
|
||||
+ register_test_oltp(&tests)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
/* Print program header */
|
||||
|
||||
|
||||
void print_header(void)
|
||||
{
|
||||
log_text(LOG_NOTICE, PACKAGE" v"PACKAGE_VERSION
|
||||
": multi-threaded system evaluation benchmark\n");
|
||||
}
|
||||
|
||||
|
||||
/* Print program usage */
|
||||
|
||||
|
||||
void print_usage(void)
|
||||
{
|
||||
sb_list_item_t *pos;
|
||||
sb_test_t *test;
|
||||
|
||||
printf("Usage:\n");
|
||||
printf(" sysbench [general-options]... --test=<test-name> "
|
||||
"[test-options]... command\n\n");
|
||||
printf("General options:\n");
|
||||
sb_print_options(general_args);
|
||||
printf("Compiled-in tests:\n");
|
||||
SB_LIST_FOR_EACH(pos, &tests)
|
||||
{
|
||||
test = SB_LIST_ENTRY(pos, sb_test_t, listitem);
|
||||
printf(" %s - %s\n", test->sname, test->lname);
|
||||
}
|
||||
printf("\n");
|
||||
printf("Commands: prepare run cleanup help\n\n");
|
||||
printf("See 'sysbench --test=<name> help' for a list of options for each test.\n\n");
|
||||
}
|
||||
|
||||
|
||||
sb_arg_t *find_argument(char *name, sb_arg_t *args)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
if (args == NULL)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; args[i].name != NULL; i++)
|
||||
if (!strcasecmp(args[i].name, name))
|
||||
return &(args[i]);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
sb_cmd_t parse_command(char *cmd)
|
||||
{
|
||||
if (!strcmp(cmd, "prepare"))
|
||||
return SB_COMMAND_PREPARE;
|
||||
else if (!strcmp(cmd, "run"))
|
||||
return SB_COMMAND_RUN;
|
||||
else if (!strcmp(cmd, "help"))
|
||||
return SB_COMMAND_HELP;
|
||||
else if (!strcmp(cmd, "cleanup"))
|
||||
return SB_COMMAND_CLEANUP;
|
||||
|
||||
return SB_COMMAND_NULL;
|
||||
}
|
||||
|
||||
|
||||
int parse_arguments(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
char *name;
|
||||
char *value;
|
||||
char *tmp;
|
||||
sb_list_item_t *pos;
|
||||
sb_test_t *test;
|
||||
option_t *opt;
|
||||
|
||||
sb_globals.command = SB_COMMAND_NULL;
|
||||
|
||||
/* Set default values for general options */
|
||||
if (sb_register_arg_set(general_args))
|
||||
return 1;
|
||||
/* Set default values for test specific options */
|
||||
SB_LIST_FOR_EACH(pos, &tests)
|
||||
{
|
||||
test = SB_LIST_ENTRY(pos, sb_test_t, listitem);
|
||||
if (test->args == NULL)
|
||||
break;
|
||||
if (sb_register_arg_set(test->args))
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Parse command line arguments */
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (strncmp(argv[i], "--", 2)) {
|
||||
if (sb_globals.command != SB_COMMAND_NULL)
|
||||
{
|
||||
fprintf(stderr, "Multiple commands are not allowed.\n");
|
||||
return 1;
|
||||
}
|
||||
sb_globals.command = parse_command(argv[i]);
|
||||
if (sb_globals.command == SB_COMMAND_NULL)
|
||||
{
|
||||
fprintf(stderr, "Unknown command: %s.\n", argv[i]);
|
||||
return 1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
name = argv[i] + 2;
|
||||
tmp = strchr(name, '=');
|
||||
if (tmp != NULL)
|
||||
{
|
||||
*tmp = '\0';
|
||||
value = tmp + 1;
|
||||
} else
|
||||
value = NULL;
|
||||
|
||||
if (!strcmp(name, "help"))
|
||||
return 1;
|
||||
|
||||
/* Search available options */
|
||||
opt = sb_find_option(name);
|
||||
if (opt == NULL)
|
||||
{
|
||||
fprintf(stderr, "Unknown option: %s.\n", argv[i]);
|
||||
return 1;
|
||||
}
|
||||
if (set_option(name, value, opt->type))
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void print_run_mode(sb_test_t *test)
|
||||
{
|
||||
log_text(LOG_NOTICE, "Running the test with following options:");
|
||||
log_text(LOG_NOTICE, "Number of threads: %d", sb_globals.num_threads);
|
||||
|
||||
if (sb_globals.debug)
|
||||
log_text(LOG_NOTICE, "Debug mode enabled.\n");
|
||||
|
||||
if (sb_globals.validate)
|
||||
log_text(LOG_NOTICE, "Additional request validation enabled.\n");
|
||||
|
||||
if (init_rng)
|
||||
{
|
||||
log_text(LOG_NOTICE, "Initializing random number generator from timer.\n");
|
||||
srandom(time(NULL));
|
||||
}
|
||||
|
||||
log_text(LOG_NOTICE, "");
|
||||
|
||||
if (test->ops.print_mode != NULL)
|
||||
test->ops.print_mode();
|
||||
}
|
||||
|
||||
|
||||
/* Main runner test thread */
|
||||
|
||||
|
||||
void *runner_thread(void *arg)
|
||||
{
|
||||
sb_request_t request;
|
||||
sb_thread_ctxt_t *ctxt;
|
||||
sb_test_t *test;
|
||||
unsigned int thread_id;
|
||||
|
||||
ctxt = (sb_thread_ctxt_t *)arg;
|
||||
test = ctxt->test;
|
||||
thread_id = ctxt->id;
|
||||
|
||||
log_text(LOG_DEBUG, "Runner thread started (%d)!", thread_id);
|
||||
if (test->ops.thread_init != NULL && test->ops.thread_init(thread_id) != 0)
|
||||
{
|
||||
sb_globals.error = 1;
|
||||
return NULL; /* thread initialization failed */
|
||||
}
|
||||
|
||||
/*
|
||||
We do this to make sure all threads get to this barrier
|
||||
about the same time
|
||||
*/
|
||||
pthread_mutex_lock(&thread_start_mutex);
|
||||
pthread_mutex_unlock(&thread_start_mutex);
|
||||
do
|
||||
{
|
||||
request = get_request(test, thread_id);
|
||||
/* check if we shall execute it */
|
||||
if (request.type != SB_REQ_TYPE_NULL)
|
||||
{
|
||||
if (execute_request(test, &request, thread_id))
|
||||
break; /* break if error returned (terminates only one thread) */
|
||||
}
|
||||
/* Check if we have a time limit */
|
||||
if (sb_globals.max_time != 0 &&
|
||||
NS2SEC(sb_timer_current(&sb_globals.exec_timer))
|
||||
>= sb_globals.max_time)
|
||||
{
|
||||
log_text(LOG_INFO, "Time limit exceeded, exiting...");
|
||||
break;
|
||||
}
|
||||
} while ((request.type != SB_REQ_TYPE_NULL) && (!sb_globals.error) );
|
||||
|
||||
if (test->ops.thread_done != NULL)
|
||||
test->ops.thread_done(thread_id);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Main test function. Start threads.
|
||||
Wait for them to complete and measure time
|
||||
*/
|
||||
|
||||
|
||||
int run_test(sb_test_t *test)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
/* initialize test */
|
||||
if (test->ops.init != NULL && test->ops.init() != 0)
|
||||
return 1;
|
||||
|
||||
/* print test mode */
|
||||
print_run_mode(test);
|
||||
|
||||
/* initialize and start timers */
|
||||
sb_timer_init(&sb_globals.exec_timer);
|
||||
for(i = 0; i < sb_globals.num_threads; i++)
|
||||
{
|
||||
sb_timer_init(&sb_globals.op_timers[i]);
|
||||
threads[i].id = i;
|
||||
threads[i].test = test;
|
||||
}
|
||||
sb_timer_start(&sb_globals.exec_timer);
|
||||
|
||||
/* prepare test */
|
||||
if (test->ops.prepare != NULL && test->ops.prepare() != 0)
|
||||
return 1;
|
||||
|
||||
pthread_mutex_init(&sb_globals.exec_mutex, NULL);
|
||||
|
||||
/* start mutex used for barrier */
|
||||
pthread_mutex_init(&thread_start_mutex,NULL);
|
||||
pthread_mutex_lock(&thread_start_mutex);
|
||||
|
||||
/* initialize attr */
|
||||
pthread_attr_init(&thread_attr);
|
||||
pthread_attr_setscope(&thread_attr,PTHREAD_SCOPE_SYSTEM);
|
||||
pthread_attr_setstacksize(&thread_attr, thread_stack_size);
|
||||
|
||||
#ifdef HAVE_THR_SETCONCURRENCY
|
||||
/* Set thread concurrency (required on Solaris) */
|
||||
thr_setconcurrency(sb_globals.num_threads);
|
||||
#endif
|
||||
|
||||
/* Starting the test threads */
|
||||
for(i = 0; i < sb_globals.num_threads; i++)
|
||||
{
|
||||
if (sb_globals.error)
|
||||
return 1;
|
||||
if (pthread_create(&(threads[i].thread), &thread_attr, &runner_thread,
|
||||
(void*)&(threads[i])) != 0)
|
||||
{
|
||||
log_errno(LOG_FATAL, "Thread #%d creation failed", i);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&thread_start_mutex);
|
||||
|
||||
log_text(LOG_INFO, "Threads started!");
|
||||
for(i = 0; i < sb_globals.num_threads; i++)
|
||||
{
|
||||
if(pthread_join(threads[i].thread, NULL))
|
||||
{
|
||||
log_errno(LOG_FATAL, "Thread #%d join failed", i);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
log_text(LOG_INFO, "Done.\n");
|
||||
|
||||
/* cleanup test */
|
||||
if (test->ops.cleanup != NULL && test->ops.cleanup() != 0)
|
||||
return 1;
|
||||
|
||||
sb_timer_stop(&sb_globals.exec_timer);
|
||||
|
||||
/* print test-specific stats */
|
||||
if (test->ops.print_stats != NULL && !sb_globals.error)
|
||||
test->ops.print_stats();
|
||||
|
||||
pthread_mutex_destroy(&sb_globals.exec_mutex);
|
||||
|
||||
pthread_mutex_destroy(&thread_start_mutex);
|
||||
|
||||
/* finalize test */
|
||||
if (test->ops.done != NULL)
|
||||
(*(test->ops.done))();
|
||||
|
||||
return sb_globals.error != 0;
|
||||
}
|
||||
|
||||
|
||||
sb_test_t *find_test(char *name)
|
||||
{
|
||||
sb_list_item_t *pos;
|
||||
sb_test_t *test;
|
||||
|
||||
SB_LIST_FOR_EACH(pos, &tests)
|
||||
{
|
||||
test = SB_LIST_ENTRY(pos, sb_test_t, listitem);
|
||||
if (!strcmp(test->sname, name))
|
||||
return test;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
int init(void)
|
||||
{
|
||||
option_t *opt;
|
||||
|
||||
sb_globals.num_threads = sb_get_value_int("num-threads");
|
||||
if (sb_globals.num_threads <= 0)
|
||||
{
|
||||
log_text(LOG_FATAL, "Invalid value for --num-threads: %d.\n", sb_globals.num_threads);
|
||||
return 1;
|
||||
}
|
||||
sb_globals.max_requests = sb_get_value_int("max-requests");
|
||||
sb_globals.max_time = sb_get_value_int("max-time");
|
||||
if (!sb_globals.max_requests && !sb_globals.max_time)
|
||||
log_text(LOG_WARNING, "WARNING: Both max-requests and max-time are 0, running endless test");
|
||||
|
||||
sb_globals.op_timers = (sb_timer_t *)malloc(sb_globals.num_threads *
|
||||
sizeof(sb_timer_t));
|
||||
threads = (sb_thread_ctxt_t *)malloc(sb_globals.num_threads *
|
||||
sizeof(sb_thread_ctxt_t));
|
||||
if (sb_globals.op_timers == NULL || threads == NULL)
|
||||
{
|
||||
log_text(LOG_FATAL, "Memory allocation failure.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
thread_stack_size = sb_get_value_int("thread-stack-size");
|
||||
if (thread_stack_size <= 0)
|
||||
{
|
||||
log_text(LOG_FATAL, "Invalid value for thread-stack-size: %d.\n", thread_stack_size);
|
||||
return 1;
|
||||
}
|
||||
|
||||
sb_globals.debug = sb_get_value_flag("debug");
|
||||
/* Automatically set logger verbosity to 'debug' */
|
||||
if (sb_globals.debug)
|
||||
{
|
||||
opt = sb_find_option("verbosity");
|
||||
if (opt != NULL)
|
||||
set_option(opt->name, "5", opt->type);
|
||||
}
|
||||
|
||||
sb_globals.validate = sb_get_value_flag("validate");
|
||||
init_rng = sb_get_value_flag("init-rng");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *testname;
|
||||
sb_test_t *test = NULL;
|
||||
|
||||
/* Initialize options library */
|
||||
sb_options_init();
|
||||
|
||||
/* First register the logger */
|
||||
if (log_register())
|
||||
exit(1);
|
||||
|
||||
/* Register available tests */
|
||||
if (register_tests())
|
||||
{
|
||||
fprintf(stderr, "Failed to register tests.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Parse command line arguments */
|
||||
if (parse_arguments(argc,argv))
|
||||
{
|
||||
print_usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (sb_globals.command == SB_COMMAND_NULL)
|
||||
{
|
||||
fprintf(stderr, "Missing required command argument.\n");
|
||||
print_usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Initialize global variables and logger */
|
||||
if (init() || log_init())
|
||||
exit(1);
|
||||
|
||||
print_header();
|
||||
|
||||
testname = sb_get_value_string("test");
|
||||
if (testname != NULL)
|
||||
test = find_test(testname);
|
||||
|
||||
/* 'help' command */
|
||||
if (sb_globals.command == SB_COMMAND_HELP)
|
||||
{
|
||||
if (test == NULL)
|
||||
print_usage();
|
||||
else
|
||||
{
|
||||
printf("%s options:\n", test->sname);
|
||||
sb_print_options(test->args);
|
||||
if (test->cmds.help != NULL)
|
||||
test->cmds.help();
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (testname == NULL)
|
||||
{
|
||||
fprintf(stderr, "Missing required argument: --test.\n");
|
||||
print_usage();
|
||||
exit(1);
|
||||
}
|
||||
if (test == NULL)
|
||||
{
|
||||
fprintf(stderr, "Invalid test name: %s.\n", testname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* 'prepare' command */
|
||||
if (sb_globals.command == SB_COMMAND_PREPARE)
|
||||
{
|
||||
if (test->cmds.prepare == NULL)
|
||||
{
|
||||
fprintf(stderr, "'%s' test does not have the 'prepare' command.\n",
|
||||
test->sname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return test->cmds.prepare();
|
||||
}
|
||||
|
||||
/* 'cleanup' command */
|
||||
if (sb_globals.command == SB_COMMAND_CLEANUP)
|
||||
{
|
||||
if (test->cmds.cleanup == NULL)
|
||||
{
|
||||
fprintf(stderr, "'%s' test does not have the 'cleanup' command.\n",
|
||||
test->sname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
exit(test->cmds.cleanup());
|
||||
}
|
||||
|
||||
/* 'run' command */
|
||||
if (run_test(test))
|
||||
exit(1);
|
||||
|
||||
/* Uninitialize logger */
|
||||
log_done();
|
||||
|
||||
exit(0);
|
||||
}
|
||||
210
sysbench/sysbench.h
Normal file
210
sysbench/sysbench.h
Normal file
@ -0,0 +1,210 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SYSBENCH_H
|
||||
#define SYSBENCH_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
||||
#include "sb_list.h"
|
||||
#include "sb_options.h"
|
||||
#include "sb_timer.h"
|
||||
#include "sb_logger.h"
|
||||
|
||||
#include "tests/sb_cpu.h"
|
||||
#include "tests/sb_fileio.h"
|
||||
#include "tests/sb_memory.h"
|
||||
#include "tests/sb_threads.h"
|
||||
#include "tests/sb_mutex.h"
|
||||
#include "tests/sb_oltp.h"
|
||||
|
||||
/* Macros to control global execution mutex */
|
||||
#define SB_THREAD_MUTEX_LOCK() pthread_mutex_lock(&sb_globals.exec_mutex)
|
||||
#define SB_THREAD_MUTEX_UNLOCK() pthread_mutex_unlock(&sb_globals.exec_mutex)
|
||||
|
||||
/* used in sb_rnd() */
|
||||
#define SB_MAX_RND 0x3fffffff
|
||||
|
||||
/* Sysbench commands */
|
||||
typedef enum
|
||||
{
|
||||
SB_COMMAND_NULL,
|
||||
SB_COMMAND_PREPARE,
|
||||
SB_COMMAND_RUN,
|
||||
SB_COMMAND_CLEANUP,
|
||||
SB_COMMAND_HELP
|
||||
} sb_cmd_t;
|
||||
|
||||
/* Request types definition */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SB_REQ_TYPE_NULL,
|
||||
SB_REQ_TYPE_CPU,
|
||||
SB_REQ_TYPE_MEMORY,
|
||||
SB_REQ_TYPE_FILE,
|
||||
SB_REQ_TYPE_SQL,
|
||||
SB_REQ_TYPE_THREADS,
|
||||
SB_REQ_TYPE_MUTEX
|
||||
} sb_request_type_t;
|
||||
|
||||
/* Request structure definition */
|
||||
|
||||
struct sb_test; /* Forward declaration */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int type;
|
||||
struct sb_test_t *test;
|
||||
|
||||
/* type-specific data */
|
||||
union
|
||||
{
|
||||
sb_file_request_t file_request;
|
||||
sb_mem_request_t mem_request;
|
||||
sb_threads_request_t threads_request;
|
||||
sb_mutex_request_t mutex_request;
|
||||
sb_sql_request_t sql_request;
|
||||
} u;
|
||||
} sb_request_t;
|
||||
|
||||
/* Test commands definition */
|
||||
|
||||
typedef int sb_cmd_help(void);
|
||||
typedef int sb_cmd_prepare(void);
|
||||
typedef int sb_cmd_run(void);
|
||||
typedef int sb_cmd_cleanup(void);
|
||||
|
||||
|
||||
/* Test operations definition */
|
||||
|
||||
typedef int sb_op_init(void);
|
||||
typedef int sb_op_prepare(void);
|
||||
typedef int sb_op_thread_init(int);
|
||||
typedef void sb_op_print_mode(void);
|
||||
typedef sb_request_t sb_op_get_request(void);
|
||||
typedef int sb_op_execute_request(sb_request_t *, int);
|
||||
typedef void sb_op_print_stats(void);
|
||||
typedef int sb_op_thread_done(int);
|
||||
typedef int sb_op_cleanup(void);
|
||||
typedef int sb_op_done(void);
|
||||
|
||||
/* Test commands structure definitions */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sb_cmd_help *help; /* print help */
|
||||
sb_cmd_prepare *prepare; /* prepare for the test */
|
||||
sb_cmd_run *run; /* run the test */
|
||||
sb_cmd_cleanup *cleanup; /* cleanup the test database, files, etc. */
|
||||
} sb_commands_t;
|
||||
|
||||
/* Test operations structure definition */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sb_op_init *init; /* initialization function */
|
||||
sb_op_prepare *prepare; /* called after timers start, but
|
||||
before thread execution */
|
||||
sb_op_thread_init *thread_init; /* thread initialization
|
||||
(called when each thread starts) */
|
||||
sb_op_print_mode *print_mode; /* print mode function */
|
||||
sb_op_get_request *get_request; /* request generation function */
|
||||
sb_op_execute_request *execute_request; /* request execution function */
|
||||
sb_op_print_stats *print_stats; /* stats generation function */
|
||||
sb_op_thread_done *thread_done; /* thread finalize function */
|
||||
sb_op_cleanup *cleanup; /* called after exit from thread,
|
||||
but before timers stop */
|
||||
sb_op_done *done; /* finalize function */
|
||||
} sb_operations_t;
|
||||
|
||||
/* Test structure definition */
|
||||
|
||||
typedef struct sb_test
|
||||
{
|
||||
char *sname;
|
||||
char *lname;
|
||||
sb_operations_t ops;
|
||||
sb_commands_t cmds;
|
||||
sb_arg_t *args;
|
||||
|
||||
sb_list_item_t listitem;
|
||||
} sb_test_t;
|
||||
|
||||
/* Thread context definition */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sb_test_t *test;
|
||||
pthread_t thread;
|
||||
unsigned int id;
|
||||
} sb_thread_ctxt_t;
|
||||
|
||||
|
||||
/* sysbench global variables */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sb_cmd_t command; /* command passed from command line */
|
||||
int error; /* global error - everyone exit */
|
||||
pthread_mutex_t exec_mutex; /* execution mutex */
|
||||
sb_timer_t *op_timers; /* timers to measure each thread's run time */
|
||||
sb_timer_t exec_timer; /* total execution timer */
|
||||
unsigned int num_threads; /* number of threads to use */
|
||||
unsigned int max_requests; /* maximum number of requests */
|
||||
unsigned int max_time; /* total execution time limit */
|
||||
unsigned char debug; /* debug flag */
|
||||
unsigned char validate; /* validation flag */
|
||||
} sb_globals_t;
|
||||
|
||||
extern sb_globals_t sb_globals;
|
||||
|
||||
/* used to get options passed from command line */
|
||||
|
||||
int sb_get_value_flag(char *);
|
||||
int sb_get_value_int(char *);
|
||||
unsigned long long sb_get_value_size(char *);
|
||||
float sb_get_value_float(char *);
|
||||
char *sb_get_value_string(char *);
|
||||
|
||||
/* We need this function as RAND_MAX is too small on some systems*/
|
||||
|
||||
static inline unsigned int sb_rnd(void); /* To avoid compilation warnings */
|
||||
static inline unsigned int sb_rnd(void)
|
||||
{
|
||||
if (RAND_MAX < SB_MAX_RND)
|
||||
return (random() * 0xffff + random()) % SB_MAX_RND;
|
||||
else
|
||||
return random() % SB_MAX_RND;
|
||||
}
|
||||
|
||||
#endif
|
||||
17
sysbench/tests/Makefile.am
Normal file
17
sysbench/tests/Makefile.am
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SUBDIRS = cpu fileio memory threads mutex oltp
|
||||
487
sysbench/tests/Makefile.in
Normal file
487
sysbench/tests/Makefile.in
Normal file
@ -0,0 +1,487 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = sysbench/tests
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
SUBDIRS = cpu fileio memory threads mutex oltp
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sysbench/tests/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign sysbench/tests/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| mkdir "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="../$(top_distdir)" \
|
||||
distdir="../$(distdir)/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libtool clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
21
sysbench/tests/cpu/Makefile.am
Normal file
21
sysbench/tests/cpu/Makefile.am
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
noinst_LIBRARIES = libsbcpu.a
|
||||
|
||||
libsbcpu_a_SOURCES = sb_cpu.c ../sb_cpu.h
|
||||
|
||||
libsbcpu_a_CPPFLAGS = -I../.. $(AM_CPPFLAGS)
|
||||
482
sysbench/tests/cpu/Makefile.in
Normal file
482
sysbench/tests/cpu/Makefile.in
Normal file
@ -0,0 +1,482 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SOURCES = $(libsbcpu_a_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = sysbench/tests/cpu
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libsbcpu_a_AR = $(AR) $(ARFLAGS)
|
||||
libsbcpu_a_LIBADD =
|
||||
am_libsbcpu_a_OBJECTS = libsbcpu_a-sb_cpu.$(OBJEXT)
|
||||
libsbcpu_a_OBJECTS = $(am_libsbcpu_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libsbcpu_a-sb_cpu.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libsbcpu_a_SOURCES)
|
||||
DIST_SOURCES = $(libsbcpu_a_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
noinst_LIBRARIES = libsbcpu.a
|
||||
libsbcpu_a_SOURCES = sb_cpu.c ../sb_cpu.h
|
||||
libsbcpu_a_CPPFLAGS = -I../.. $(AM_CPPFLAGS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sysbench/tests/cpu/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign sysbench/tests/cpu/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libsbcpu.a: $(libsbcpu_a_OBJECTS) $(libsbcpu_a_DEPENDENCIES)
|
||||
-rm -f libsbcpu.a
|
||||
$(libsbcpu_a_AR) libsbcpu.a $(libsbcpu_a_OBJECTS) $(libsbcpu_a_LIBADD)
|
||||
$(RANLIB) libsbcpu.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsbcpu_a-sb_cpu.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libsbcpu_a-sb_cpu.o: sb_cpu.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbcpu_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbcpu_a-sb_cpu.o -MD -MP -MF "$(DEPDIR)/libsbcpu_a-sb_cpu.Tpo" -c -o libsbcpu_a-sb_cpu.o `test -f 'sb_cpu.c' || echo '$(srcdir)/'`sb_cpu.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbcpu_a-sb_cpu.Tpo" "$(DEPDIR)/libsbcpu_a-sb_cpu.Po"; else rm -f "$(DEPDIR)/libsbcpu_a-sb_cpu.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_cpu.c' object='libsbcpu_a-sb_cpu.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbcpu_a-sb_cpu.Po' tmpdepfile='$(DEPDIR)/libsbcpu_a-sb_cpu.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbcpu_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbcpu_a-sb_cpu.o `test -f 'sb_cpu.c' || echo '$(srcdir)/'`sb_cpu.c
|
||||
|
||||
libsbcpu_a-sb_cpu.obj: sb_cpu.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbcpu_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbcpu_a-sb_cpu.obj -MD -MP -MF "$(DEPDIR)/libsbcpu_a-sb_cpu.Tpo" -c -o libsbcpu_a-sb_cpu.obj `if test -f 'sb_cpu.c'; then $(CYGPATH_W) 'sb_cpu.c'; else $(CYGPATH_W) '$(srcdir)/sb_cpu.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbcpu_a-sb_cpu.Tpo" "$(DEPDIR)/libsbcpu_a-sb_cpu.Po"; else rm -f "$(DEPDIR)/libsbcpu_a-sb_cpu.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_cpu.c' object='libsbcpu_a-sb_cpu.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbcpu_a-sb_cpu.Po' tmpdepfile='$(DEPDIR)/libsbcpu_a-sb_cpu.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbcpu_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbcpu_a-sb_cpu.obj `if test -f 'sb_cpu.c'; then $(CYGPATH_W) 'sb_cpu.c'; else $(CYGPATH_W) '$(srcdir)/sb_cpu.c'; fi`
|
||||
|
||||
libsbcpu_a-sb_cpu.lo: sb_cpu.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbcpu_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbcpu_a-sb_cpu.lo -MD -MP -MF "$(DEPDIR)/libsbcpu_a-sb_cpu.Tpo" -c -o libsbcpu_a-sb_cpu.lo `test -f 'sb_cpu.c' || echo '$(srcdir)/'`sb_cpu.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbcpu_a-sb_cpu.Tpo" "$(DEPDIR)/libsbcpu_a-sb_cpu.Plo"; else rm -f "$(DEPDIR)/libsbcpu_a-sb_cpu.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_cpu.c' object='libsbcpu_a-sb_cpu.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbcpu_a-sb_cpu.Plo' tmpdepfile='$(DEPDIR)/libsbcpu_a-sb_cpu.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbcpu_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbcpu_a-sb_cpu.lo `test -f 'sb_cpu.c' || echo '$(srcdir)/'`sb_cpu.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
165
sysbench/tests/cpu/sb_cpu.c
Normal file
165
sysbench/tests/cpu/sb_cpu.c
Normal file
@ -0,0 +1,165 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MATH_H
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
#include "sysbench.h"
|
||||
|
||||
/* CPU test arguments */
|
||||
static sb_arg_t cpu_args[] =
|
||||
{
|
||||
{"cpu-max-prime", "upper limit for primes generator", SB_ARG_TYPE_INT, "10000"},
|
||||
{NULL, NULL, SB_ARG_TYPE_NULL, NULL}
|
||||
};
|
||||
|
||||
/* CPU test operations */
|
||||
static int cpu_init(void);
|
||||
static void cpu_print_mode(void);
|
||||
static sb_request_t cpu_get_request(void);
|
||||
static int cpu_execute_request(sb_request_t *, int);
|
||||
static void cpu_print_stats(void);
|
||||
static int cpu_done(void);
|
||||
|
||||
static sb_test_t cpu_test =
|
||||
{
|
||||
.sname = "cpu",
|
||||
.lname = "CPU performance test",
|
||||
.ops = {
|
||||
.init = cpu_init,
|
||||
.prepare = NULL,
|
||||
.thread_init = NULL,
|
||||
.thread_done = NULL,
|
||||
.cleanup = NULL,
|
||||
.print_mode = cpu_print_mode,
|
||||
.get_request = cpu_get_request,
|
||||
.execute_request = cpu_execute_request,
|
||||
.print_stats = cpu_print_stats,
|
||||
.done = cpu_done
|
||||
},
|
||||
.cmds = {
|
||||
.prepare = NULL,
|
||||
.help = NULL,
|
||||
.run = NULL,
|
||||
.cleanup = NULL
|
||||
},
|
||||
.args = cpu_args,
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
/* Upper limit for primes */
|
||||
static unsigned int max_prime;
|
||||
/* Request counter */
|
||||
static unsigned int req_performed;
|
||||
/* Counter mutex */
|
||||
static pthread_mutex_t request_mutex;
|
||||
|
||||
int register_test_cpu(sb_list_t * tests)
|
||||
{
|
||||
SB_LIST_ADD_TAIL(&cpu_test.listitem, tests);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cpu_init(void)
|
||||
{
|
||||
max_prime = sb_get_value_int("cpu-max-prime");
|
||||
if (max_prime <= 0)
|
||||
{
|
||||
log_text(LOG_FATAL, "Invalid value of cpu-max-prime: %d.", max_prime);
|
||||
return 1;
|
||||
}
|
||||
|
||||
req_performed = 0;
|
||||
|
||||
pthread_mutex_init(&request_mutex, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
sb_request_t cpu_get_request(void)
|
||||
{
|
||||
sb_request_t req;
|
||||
|
||||
if (req_performed >= sb_globals.max_requests)
|
||||
{
|
||||
req.type = SB_REQ_TYPE_NULL;
|
||||
return req;
|
||||
}
|
||||
req.type = SB_REQ_TYPE_CPU;
|
||||
pthread_mutex_lock(&request_mutex);
|
||||
req_performed++;
|
||||
pthread_mutex_unlock(&request_mutex);
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
int cpu_execute_request(sb_request_t *r, int thread_id)
|
||||
{
|
||||
unsigned long long c;
|
||||
unsigned long long l,t;
|
||||
unsigned long long n=0;
|
||||
log_msg_t msg;
|
||||
log_msg_oper_t op_msg;
|
||||
|
||||
(void)r; /* unused */
|
||||
|
||||
/* Prepare log message */
|
||||
msg.type = LOG_MSG_TYPE_OPER;
|
||||
msg.data = &op_msg;
|
||||
|
||||
/* So far we're using very simple test prime number tests in 64bit */
|
||||
LOG_EVENT_START(msg, thread_id);
|
||||
|
||||
for(c=3; c < max_prime; c++)
|
||||
{
|
||||
t = sqrt(c);
|
||||
for(l = 2; l <= t; l++)
|
||||
if (c % l == 0)
|
||||
break;
|
||||
if (l > t )
|
||||
n++;
|
||||
}
|
||||
|
||||
LOG_EVENT_STOP(msg, thread_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cpu_print_mode(void)
|
||||
{
|
||||
log_text(LOG_INFO, "Doing CPU performance benchmark\n");
|
||||
}
|
||||
|
||||
void cpu_print_stats(void)
|
||||
{
|
||||
log_text(LOG_NOTICE, "Maximum prime number checked in CPU test: %d\n",
|
||||
max_prime);
|
||||
}
|
||||
|
||||
int cpu_done(void)
|
||||
{
|
||||
pthread_mutex_destroy(&request_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
21
sysbench/tests/fileio/Makefile.am
Normal file
21
sysbench/tests/fileio/Makefile.am
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
noinst_LIBRARIES = libsbfileio.a
|
||||
|
||||
libsbfileio_a_SOURCES = sb_fileio.c ../sb_fileio.h crc32.c crc32.h crc32tbl.h
|
||||
|
||||
libsbfileio_a_CPPFLAGS = -I../.. $(AM_CPPFLAGS)
|
||||
482
sysbench/tests/fileio/Makefile.in
Normal file
482
sysbench/tests/fileio/Makefile.in
Normal file
@ -0,0 +1,482 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SOURCES = $(libsbfileio_a_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = sysbench/tests/fileio
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libsbfileio_a_AR = $(AR) $(ARFLAGS)
|
||||
libsbfileio_a_LIBADD =
|
||||
am_libsbfileio_a_OBJECTS = libsbfileio_a-sb_fileio.$(OBJEXT)
|
||||
libsbfileio_a_OBJECTS = $(am_libsbfileio_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libsbfileio_a-sb_fileio.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libsbfileio_a_SOURCES)
|
||||
DIST_SOURCES = $(libsbfileio_a_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
noinst_LIBRARIES = libsbfileio.a
|
||||
libsbfileio_a_SOURCES = sb_fileio.c ../sb_fileio.h
|
||||
libsbfileio_a_CPPFLAGS = -I../.. $(AM_CPPFLAGS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sysbench/tests/fileio/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign sysbench/tests/fileio/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libsbfileio.a: $(libsbfileio_a_OBJECTS) $(libsbfileio_a_DEPENDENCIES)
|
||||
-rm -f libsbfileio.a
|
||||
$(libsbfileio_a_AR) libsbfileio.a $(libsbfileio_a_OBJECTS) $(libsbfileio_a_LIBADD)
|
||||
$(RANLIB) libsbfileio.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsbfileio_a-sb_fileio.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libsbfileio_a-sb_fileio.o: sb_fileio.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbfileio_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbfileio_a-sb_fileio.o -MD -MP -MF "$(DEPDIR)/libsbfileio_a-sb_fileio.Tpo" -c -o libsbfileio_a-sb_fileio.o `test -f 'sb_fileio.c' || echo '$(srcdir)/'`sb_fileio.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbfileio_a-sb_fileio.Tpo" "$(DEPDIR)/libsbfileio_a-sb_fileio.Po"; else rm -f "$(DEPDIR)/libsbfileio_a-sb_fileio.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_fileio.c' object='libsbfileio_a-sb_fileio.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbfileio_a-sb_fileio.Po' tmpdepfile='$(DEPDIR)/libsbfileio_a-sb_fileio.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbfileio_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbfileio_a-sb_fileio.o `test -f 'sb_fileio.c' || echo '$(srcdir)/'`sb_fileio.c
|
||||
|
||||
libsbfileio_a-sb_fileio.obj: sb_fileio.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbfileio_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbfileio_a-sb_fileio.obj -MD -MP -MF "$(DEPDIR)/libsbfileio_a-sb_fileio.Tpo" -c -o libsbfileio_a-sb_fileio.obj `if test -f 'sb_fileio.c'; then $(CYGPATH_W) 'sb_fileio.c'; else $(CYGPATH_W) '$(srcdir)/sb_fileio.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbfileio_a-sb_fileio.Tpo" "$(DEPDIR)/libsbfileio_a-sb_fileio.Po"; else rm -f "$(DEPDIR)/libsbfileio_a-sb_fileio.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_fileio.c' object='libsbfileio_a-sb_fileio.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbfileio_a-sb_fileio.Po' tmpdepfile='$(DEPDIR)/libsbfileio_a-sb_fileio.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbfileio_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbfileio_a-sb_fileio.obj `if test -f 'sb_fileio.c'; then $(CYGPATH_W) 'sb_fileio.c'; else $(CYGPATH_W) '$(srcdir)/sb_fileio.c'; fi`
|
||||
|
||||
libsbfileio_a-sb_fileio.lo: sb_fileio.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbfileio_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbfileio_a-sb_fileio.lo -MD -MP -MF "$(DEPDIR)/libsbfileio_a-sb_fileio.Tpo" -c -o libsbfileio_a-sb_fileio.lo `test -f 'sb_fileio.c' || echo '$(srcdir)/'`sb_fileio.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbfileio_a-sb_fileio.Tpo" "$(DEPDIR)/libsbfileio_a-sb_fileio.Plo"; else rm -f "$(DEPDIR)/libsbfileio_a-sb_fileio.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_fileio.c' object='libsbfileio_a-sb_fileio.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbfileio_a-sb_fileio.Plo' tmpdepfile='$(DEPDIR)/libsbfileio_a-sb_fileio.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbfileio_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbfileio_a-sb_fileio.lo `test -f 'sb_fileio.c' || echo '$(srcdir)/'`sb_fileio.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
1654
sysbench/tests/fileio/sb_fileio.c
Normal file
1654
sysbench/tests/fileio/sb_fileio.c
Normal file
File diff suppressed because it is too large
Load Diff
21
sysbench/tests/memory/Makefile.am
Normal file
21
sysbench/tests/memory/Makefile.am
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
noinst_LIBRARIES = libsbmemory.a
|
||||
|
||||
libsbmemory_a_SOURCES = sb_memory.c ../sb_memory.h
|
||||
|
||||
libsbmemory_a_CPPFLAGS = -I../.. $(AM_CPPFLAGS)
|
||||
482
sysbench/tests/memory/Makefile.in
Normal file
482
sysbench/tests/memory/Makefile.in
Normal file
@ -0,0 +1,482 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SOURCES = $(libsbmemory_a_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = sysbench/tests/memory
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libsbmemory_a_AR = $(AR) $(ARFLAGS)
|
||||
libsbmemory_a_LIBADD =
|
||||
am_libsbmemory_a_OBJECTS = libsbmemory_a-sb_memory.$(OBJEXT)
|
||||
libsbmemory_a_OBJECTS = $(am_libsbmemory_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libsbmemory_a-sb_memory.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libsbmemory_a_SOURCES)
|
||||
DIST_SOURCES = $(libsbmemory_a_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
noinst_LIBRARIES = libsbmemory.a
|
||||
libsbmemory_a_SOURCES = sb_memory.c ../sb_memory.h
|
||||
libsbmemory_a_CPPFLAGS = -I../.. $(AM_CPPFLAGS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sysbench/tests/memory/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign sysbench/tests/memory/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libsbmemory.a: $(libsbmemory_a_OBJECTS) $(libsbmemory_a_DEPENDENCIES)
|
||||
-rm -f libsbmemory.a
|
||||
$(libsbmemory_a_AR) libsbmemory.a $(libsbmemory_a_OBJECTS) $(libsbmemory_a_LIBADD)
|
||||
$(RANLIB) libsbmemory.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsbmemory_a-sb_memory.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libsbmemory_a-sb_memory.o: sb_memory.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmemory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbmemory_a-sb_memory.o -MD -MP -MF "$(DEPDIR)/libsbmemory_a-sb_memory.Tpo" -c -o libsbmemory_a-sb_memory.o `test -f 'sb_memory.c' || echo '$(srcdir)/'`sb_memory.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbmemory_a-sb_memory.Tpo" "$(DEPDIR)/libsbmemory_a-sb_memory.Po"; else rm -f "$(DEPDIR)/libsbmemory_a-sb_memory.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_memory.c' object='libsbmemory_a-sb_memory.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbmemory_a-sb_memory.Po' tmpdepfile='$(DEPDIR)/libsbmemory_a-sb_memory.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmemory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbmemory_a-sb_memory.o `test -f 'sb_memory.c' || echo '$(srcdir)/'`sb_memory.c
|
||||
|
||||
libsbmemory_a-sb_memory.obj: sb_memory.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmemory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbmemory_a-sb_memory.obj -MD -MP -MF "$(DEPDIR)/libsbmemory_a-sb_memory.Tpo" -c -o libsbmemory_a-sb_memory.obj `if test -f 'sb_memory.c'; then $(CYGPATH_W) 'sb_memory.c'; else $(CYGPATH_W) '$(srcdir)/sb_memory.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbmemory_a-sb_memory.Tpo" "$(DEPDIR)/libsbmemory_a-sb_memory.Po"; else rm -f "$(DEPDIR)/libsbmemory_a-sb_memory.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_memory.c' object='libsbmemory_a-sb_memory.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbmemory_a-sb_memory.Po' tmpdepfile='$(DEPDIR)/libsbmemory_a-sb_memory.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmemory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbmemory_a-sb_memory.obj `if test -f 'sb_memory.c'; then $(CYGPATH_W) 'sb_memory.c'; else $(CYGPATH_W) '$(srcdir)/sb_memory.c'; fi`
|
||||
|
||||
libsbmemory_a-sb_memory.lo: sb_memory.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmemory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbmemory_a-sb_memory.lo -MD -MP -MF "$(DEPDIR)/libsbmemory_a-sb_memory.Tpo" -c -o libsbmemory_a-sb_memory.lo `test -f 'sb_memory.c' || echo '$(srcdir)/'`sb_memory.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbmemory_a-sb_memory.Tpo" "$(DEPDIR)/libsbmemory_a-sb_memory.Plo"; else rm -f "$(DEPDIR)/libsbmemory_a-sb_memory.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_memory.c' object='libsbmemory_a-sb_memory.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbmemory_a-sb_memory.Plo' tmpdepfile='$(DEPDIR)/libsbmemory_a-sb_memory.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmemory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbmemory_a-sb_memory.lo `test -f 'sb_memory.c' || echo '$(srcdir)/'`sb_memory.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
412
sysbench/tests/memory/sb_memory.c
Normal file
412
sysbench/tests/memory/sb_memory.c
Normal file
@ -0,0 +1,412 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "sysbench.h"
|
||||
|
||||
#ifdef HAVE_SYS_IPC_H
|
||||
# include <sys/ipc.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SHM_H
|
||||
# include <sys/shm.h>
|
||||
#endif
|
||||
|
||||
#define LARGE_PAGE_SIZE (4UL * 1024 * 1024)
|
||||
|
||||
/* Memory test arguments */
|
||||
static sb_arg_t memory_args[] =
|
||||
{
|
||||
{"memory-block-size", "size of memory block for test",
|
||||
SB_ARG_TYPE_SIZE, "1K"},
|
||||
{"memory-total-size", "total size of data to transfer",
|
||||
SB_ARG_TYPE_SIZE, "100G"},
|
||||
{"memory-scope", "memory access scope {global,local}", SB_ARG_TYPE_STRING,
|
||||
"global"},
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
{"memory-hugetlb", "allocate memory from HugeTLB pool", SB_ARG_TYPE_FLAG, "off"},
|
||||
#endif
|
||||
{"memory-oper", "type of memory operations {read, write, none}",
|
||||
SB_ARG_TYPE_STRING, "write"},
|
||||
{"memory-access-mode", "memory access mode {seq,rnd}", SB_ARG_TYPE_STRING, "seq"},
|
||||
{NULL, NULL, SB_ARG_TYPE_NULL, NULL}
|
||||
};
|
||||
|
||||
/* Memory test operations */
|
||||
static int memory_init(void);
|
||||
static void memory_print_mode(void);
|
||||
static sb_request_t memory_get_request(void);
|
||||
static int memory_execute_request(sb_request_t *, int);
|
||||
static void memory_print_stats(void);
|
||||
|
||||
static sb_test_t memory_test =
|
||||
{
|
||||
.sname = "memory",
|
||||
.lname = "Memory functions speed test",
|
||||
.ops =
|
||||
{
|
||||
.init = memory_init,
|
||||
.prepare = NULL,
|
||||
.thread_init = NULL,
|
||||
.thread_done = NULL,
|
||||
.cleanup = NULL,
|
||||
.print_mode = memory_print_mode,
|
||||
.get_request = memory_get_request,
|
||||
.execute_request = memory_execute_request,
|
||||
.print_stats = memory_print_stats,
|
||||
.done = NULL
|
||||
},
|
||||
.cmds = {
|
||||
.help = NULL,
|
||||
.prepare = NULL,
|
||||
.run = NULL,
|
||||
.cleanup = NULL
|
||||
},
|
||||
.args = memory_args,
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
/* Test arguments */
|
||||
|
||||
static ssize_t memory_block_size;
|
||||
static off_t memory_total_size;
|
||||
static unsigned int memory_scope;
|
||||
static unsigned int memory_oper;
|
||||
static unsigned int memory_access_rnd;
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
static unsigned int memory_hugetlb;
|
||||
#endif
|
||||
|
||||
/* Statistics */
|
||||
static unsigned int total_ops;
|
||||
static off_t total_bytes;
|
||||
|
||||
/* Array of per-thread buffers */
|
||||
static int **buffers;
|
||||
/* Global buffer */
|
||||
static int *buffer;
|
||||
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
static void * hugetlb_alloc(size_t size);
|
||||
#endif
|
||||
|
||||
int register_test_memory(sb_list_t *tests)
|
||||
{
|
||||
SB_LIST_ADD_TAIL(&memory_test.listitem, tests);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int memory_init(void)
|
||||
{
|
||||
unsigned int i;
|
||||
char *s;
|
||||
|
||||
memory_block_size = sb_get_value_size("memory-block-size");
|
||||
if (memory_block_size % sizeof(int) != 0)
|
||||
{
|
||||
log_text(LOG_FATAL, "memory-block-size must be a multiple of %ld!", (long)sizeof(int));
|
||||
return 1;
|
||||
}
|
||||
memory_total_size = sb_get_value_size("memory-total-size");
|
||||
|
||||
s = sb_get_value_string("memory-scope");
|
||||
if (!strcmp(s, "global"))
|
||||
memory_scope = SB_MEM_SCOPE_GLOBAL;
|
||||
else if (!strcmp(s, "local"))
|
||||
memory_scope = SB_MEM_SCOPE_LOCAL;
|
||||
else
|
||||
{
|
||||
log_text(LOG_FATAL, "Invalid value for memory-scope: %s", s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
memory_hugetlb = sb_get_value_flag("memory-hugetlb");
|
||||
#endif
|
||||
|
||||
s = sb_get_value_string("memory-oper");
|
||||
if (!strcmp(s, "write"))
|
||||
memory_oper = SB_MEM_OP_WRITE;
|
||||
else if (!strcmp(s, "read"))
|
||||
memory_oper = SB_MEM_OP_READ;
|
||||
else if (!strcmp(s, "none"))
|
||||
memory_oper = SB_MEM_OP_NONE;
|
||||
else
|
||||
{
|
||||
log_text(LOG_FATAL, "Invalid value for memory-oper: %s", s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
s = sb_get_value_string("memory-access-mode");
|
||||
if (!strcmp(s, "seq"))
|
||||
memory_access_rnd = 0;
|
||||
else if (!strcmp(s, "rnd"))
|
||||
memory_access_rnd = 1;
|
||||
else
|
||||
{
|
||||
log_text(LOG_FATAL, "Invalid value for memory-access-mode: %s", s);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (memory_scope == SB_MEM_SCOPE_GLOBAL)
|
||||
{
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
if (memory_hugetlb)
|
||||
buffer = (int *)hugetlb_alloc(memory_block_size);
|
||||
else
|
||||
#endif
|
||||
buffer = (int *)malloc(memory_block_size);
|
||||
if (buffer == NULL)
|
||||
{
|
||||
log_text(LOG_FATAL, "Failed to allocate buffer!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
memset(buffer, 0, memory_block_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
buffers = (int **)malloc(sb_globals.num_threads * sizeof(char *));
|
||||
if (buffers == NULL)
|
||||
{
|
||||
log_text(LOG_FATAL, "Failed to allocate buffers array!");
|
||||
return 1;
|
||||
}
|
||||
for (i = 0; i < sb_globals.num_threads; i++)
|
||||
{
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
if (memory_hugetlb)
|
||||
buffers[i] = (int *)hugetlb_alloc(memory_block_size);
|
||||
else
|
||||
#endif
|
||||
buffers[i] = (int *)malloc(memory_block_size);
|
||||
if (buffers[i] == NULL)
|
||||
{
|
||||
log_text(LOG_FATAL, "Failed to allocate buffer for thread #%d!", i);
|
||||
return 1;
|
||||
}
|
||||
|
||||
memset(buffers[i], 0, memory_block_size);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
sb_request_t memory_get_request(void)
|
||||
{
|
||||
sb_request_t req;
|
||||
sb_mem_request_t *mem_req = &req.u.mem_request;
|
||||
|
||||
SB_THREAD_MUTEX_LOCK();
|
||||
if (total_bytes >= memory_total_size)
|
||||
{
|
||||
req.type = SB_REQ_TYPE_NULL;
|
||||
SB_THREAD_MUTEX_UNLOCK();
|
||||
return req;
|
||||
}
|
||||
total_ops++;
|
||||
total_bytes += memory_block_size;
|
||||
SB_THREAD_MUTEX_UNLOCK();
|
||||
|
||||
req.type = SB_REQ_TYPE_MEMORY;
|
||||
mem_req->block_size = memory_block_size;
|
||||
mem_req->scope = memory_scope;
|
||||
mem_req->type = memory_oper;
|
||||
|
||||
return req;
|
||||
}
|
||||
|
||||
int memory_execute_request(sb_request_t *sb_req, int thread_id)
|
||||
{
|
||||
sb_mem_request_t *mem_req = &sb_req->u.mem_request;
|
||||
int tmp = 0;
|
||||
int idx;
|
||||
int *buf, *end;
|
||||
log_msg_t msg;
|
||||
log_msg_oper_t op_msg;
|
||||
long i;
|
||||
unsigned int rand;
|
||||
|
||||
/* Prepare log message */
|
||||
msg.type = LOG_MSG_TYPE_OPER;
|
||||
msg.data = &op_msg;
|
||||
|
||||
if (mem_req->scope == SB_MEM_SCOPE_GLOBAL)
|
||||
buf = buffer;
|
||||
else
|
||||
buf = buffers[thread_id];
|
||||
end = (int *)((char *)buf + memory_block_size);
|
||||
|
||||
LOG_EVENT_START(msg, thread_id);
|
||||
|
||||
if (memory_access_rnd)
|
||||
{
|
||||
rand = sb_rnd();
|
||||
switch (mem_req->type) {
|
||||
case SB_MEM_OP_WRITE:
|
||||
for (i = 0; i < memory_block_size; i++)
|
||||
{
|
||||
idx = (int)((double)rand / (double)SB_MAX_RND *
|
||||
(double)(memory_block_size / sizeof(int)));
|
||||
buf[idx] = tmp;
|
||||
}
|
||||
break;
|
||||
case SB_MEM_OP_READ:
|
||||
for (i = 0; i < memory_block_size; i++)
|
||||
{
|
||||
idx = (int)((double)rand / (double)SB_MAX_RND *
|
||||
(double)(memory_block_size / sizeof(int)));
|
||||
tmp = buf[idx];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
log_text(LOG_FATAL, "Unknown memory request type:%d. Aborting...\n",
|
||||
mem_req->type);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (mem_req->type) {
|
||||
case SB_MEM_OP_NONE:
|
||||
for (; buf < end; buf++)
|
||||
tmp = end - buf;
|
||||
break;
|
||||
case SB_MEM_OP_WRITE:
|
||||
for (; buf < end; buf++)
|
||||
*buf = tmp;
|
||||
break;
|
||||
case SB_MEM_OP_READ:
|
||||
for (; buf < end; buf++)
|
||||
tmp = *buf;
|
||||
break;
|
||||
default:
|
||||
log_text(LOG_FATAL, "Unknown memory request type:%d. Aborting...\n",
|
||||
mem_req->type);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
LOG_EVENT_STOP(msg, thread_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void memory_print_mode(void)
|
||||
{
|
||||
char *str;
|
||||
|
||||
log_text(LOG_INFO, "Doing memory operations speed test");
|
||||
log_text(LOG_INFO, "Memory block size: %ldK\n",
|
||||
(long)(memory_block_size / 1024));
|
||||
log_text(LOG_INFO, "Memory transfer size: %ldM\n",
|
||||
(long)(memory_total_size / 1024 / 1024));
|
||||
|
||||
switch (memory_oper) {
|
||||
case SB_MEM_OP_READ:
|
||||
str = "read";
|
||||
break;
|
||||
case SB_MEM_OP_WRITE:
|
||||
str = "write";
|
||||
break;
|
||||
case SB_MEM_OP_NONE:
|
||||
str = "none";
|
||||
break;
|
||||
default:
|
||||
str = "(unknown)";
|
||||
break;
|
||||
}
|
||||
log_text(LOG_INFO, "Memory operations type: %s", str);
|
||||
|
||||
switch (memory_scope) {
|
||||
case SB_MEM_SCOPE_GLOBAL:
|
||||
str = "global";
|
||||
break;
|
||||
case SB_MEM_SCOPE_LOCAL:
|
||||
str = "local";
|
||||
break;
|
||||
default:
|
||||
str = "(unknown)";
|
||||
break;
|
||||
}
|
||||
log_text(LOG_INFO, "Memory scope type: %s", str);
|
||||
}
|
||||
|
||||
|
||||
void memory_print_stats(void)
|
||||
{
|
||||
double total_time;
|
||||
|
||||
total_time = NS2SEC(sb_timer_value(&sb_globals.exec_timer));
|
||||
|
||||
log_text(LOG_NOTICE, "Operations performed: %d (%8.2f ops/sec)\n", total_ops,
|
||||
total_ops / total_time);
|
||||
if (memory_oper != SB_MEM_OP_NONE)
|
||||
log_text(LOG_NOTICE, "%4.2f MB transferred (%4.2f MB/sec)\n",
|
||||
(double)total_bytes / (1024 * 1024),
|
||||
(double)total_bytes / (1024 * 1024) / total_time);
|
||||
}
|
||||
|
||||
#ifdef HAVE_LARGE_PAGES
|
||||
|
||||
/* Allocate memory from HugeTLB pool */
|
||||
|
||||
void * hugetlb_alloc(size_t size)
|
||||
{
|
||||
int shmid;
|
||||
void *ptr;
|
||||
struct shmid_ds buf;
|
||||
|
||||
/* Align block size to my_large_page_size */
|
||||
size = ((size - 1) & ~LARGE_PAGE_SIZE) + LARGE_PAGE_SIZE;
|
||||
|
||||
shmid = shmget(IPC_PRIVATE, size, SHM_HUGETLB | SHM_R | SHM_W);
|
||||
if (shmid < 0)
|
||||
{
|
||||
log_errno(LOG_FATAL,
|
||||
"Failed to allocate %d bytes from HugeTLB memory.", size);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr = shmat(shmid, NULL, 0);
|
||||
if (ptr == (void *)-1)
|
||||
{
|
||||
log_errno(LOG_FATAL, "Failed to attach shared memory segment,");
|
||||
shmctl(shmid, IPC_RMID, &buf);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the shared memory segment so that it will be automatically freed
|
||||
after memory is detached or process exits
|
||||
*/
|
||||
shmctl(shmid, IPC_RMID, &buf);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
#endif
|
||||
21
sysbench/tests/mutex/Makefile.am
Normal file
21
sysbench/tests/mutex/Makefile.am
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
noinst_LIBRARIES = libsbmutex.a
|
||||
|
||||
libsbmutex_a_SOURCES = sb_mutex.c ../sb_mutex.h
|
||||
|
||||
libsbmutex_a_CPPFLAGS = -I../.. $(AM_CPPFLAGS)
|
||||
482
sysbench/tests/mutex/Makefile.in
Normal file
482
sysbench/tests/mutex/Makefile.in
Normal file
@ -0,0 +1,482 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SOURCES = $(libsbmutex_a_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = sysbench/tests/mutex
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libsbmutex_a_AR = $(AR) $(ARFLAGS)
|
||||
libsbmutex_a_LIBADD =
|
||||
am_libsbmutex_a_OBJECTS = libsbmutex_a-sb_mutex.$(OBJEXT)
|
||||
libsbmutex_a_OBJECTS = $(am_libsbmutex_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libsbmutex_a-sb_mutex.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libsbmutex_a_SOURCES)
|
||||
DIST_SOURCES = $(libsbmutex_a_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
noinst_LIBRARIES = libsbmutex.a
|
||||
libsbmutex_a_SOURCES = sb_mutex.c ../sb_mutex.h
|
||||
libsbmutex_a_CPPFLAGS = -I../.. $(AM_CPPFLAGS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sysbench/tests/mutex/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign sysbench/tests/mutex/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libsbmutex.a: $(libsbmutex_a_OBJECTS) $(libsbmutex_a_DEPENDENCIES)
|
||||
-rm -f libsbmutex.a
|
||||
$(libsbmutex_a_AR) libsbmutex.a $(libsbmutex_a_OBJECTS) $(libsbmutex_a_LIBADD)
|
||||
$(RANLIB) libsbmutex.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsbmutex_a-sb_mutex.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libsbmutex_a-sb_mutex.o: sb_mutex.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmutex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbmutex_a-sb_mutex.o -MD -MP -MF "$(DEPDIR)/libsbmutex_a-sb_mutex.Tpo" -c -o libsbmutex_a-sb_mutex.o `test -f 'sb_mutex.c' || echo '$(srcdir)/'`sb_mutex.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbmutex_a-sb_mutex.Tpo" "$(DEPDIR)/libsbmutex_a-sb_mutex.Po"; else rm -f "$(DEPDIR)/libsbmutex_a-sb_mutex.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_mutex.c' object='libsbmutex_a-sb_mutex.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbmutex_a-sb_mutex.Po' tmpdepfile='$(DEPDIR)/libsbmutex_a-sb_mutex.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmutex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbmutex_a-sb_mutex.o `test -f 'sb_mutex.c' || echo '$(srcdir)/'`sb_mutex.c
|
||||
|
||||
libsbmutex_a-sb_mutex.obj: sb_mutex.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmutex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbmutex_a-sb_mutex.obj -MD -MP -MF "$(DEPDIR)/libsbmutex_a-sb_mutex.Tpo" -c -o libsbmutex_a-sb_mutex.obj `if test -f 'sb_mutex.c'; then $(CYGPATH_W) 'sb_mutex.c'; else $(CYGPATH_W) '$(srcdir)/sb_mutex.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbmutex_a-sb_mutex.Tpo" "$(DEPDIR)/libsbmutex_a-sb_mutex.Po"; else rm -f "$(DEPDIR)/libsbmutex_a-sb_mutex.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_mutex.c' object='libsbmutex_a-sb_mutex.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbmutex_a-sb_mutex.Po' tmpdepfile='$(DEPDIR)/libsbmutex_a-sb_mutex.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmutex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbmutex_a-sb_mutex.obj `if test -f 'sb_mutex.c'; then $(CYGPATH_W) 'sb_mutex.c'; else $(CYGPATH_W) '$(srcdir)/sb_mutex.c'; fi`
|
||||
|
||||
libsbmutex_a-sb_mutex.lo: sb_mutex.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmutex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbmutex_a-sb_mutex.lo -MD -MP -MF "$(DEPDIR)/libsbmutex_a-sb_mutex.Tpo" -c -o libsbmutex_a-sb_mutex.lo `test -f 'sb_mutex.c' || echo '$(srcdir)/'`sb_mutex.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbmutex_a-sb_mutex.Tpo" "$(DEPDIR)/libsbmutex_a-sb_mutex.Plo"; else rm -f "$(DEPDIR)/libsbmutex_a-sb_mutex.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_mutex.c' object='libsbmutex_a-sb_mutex.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbmutex_a-sb_mutex.Plo' tmpdepfile='$(DEPDIR)/libsbmutex_a-sb_mutex.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbmutex_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbmutex_a-sb_mutex.lo `test -f 'sb_mutex.c' || echo '$(srcdir)/'`sb_mutex.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
177
sysbench/tests/mutex/sb_mutex.c
Normal file
177
sysbench/tests/mutex/sb_mutex.c
Normal file
@ -0,0 +1,177 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
||||
#include "sysbench.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
pthread_mutex_t mutex;
|
||||
char pad[256];
|
||||
} thread_lock;
|
||||
|
||||
|
||||
/* Mutex test arguments */
|
||||
static sb_arg_t mutex_args[] =
|
||||
{
|
||||
{"mutex-num", "total size of mutex array", SB_ARG_TYPE_INT, "4096"},
|
||||
{"mutex-locks", "number of mutex locks to do per thread",
|
||||
SB_ARG_TYPE_INT, "50000"},
|
||||
{"mutex-loops", "number of empty loops to do inside mutex lock",
|
||||
SB_ARG_TYPE_INT, "10000"},
|
||||
{NULL, NULL, SB_ARG_TYPE_NULL, NULL}
|
||||
};
|
||||
|
||||
/* Mutex test operations */
|
||||
static int mutex_init(void);
|
||||
static void mutex_print_mode(void);
|
||||
static sb_request_t mutex_get_request(void);
|
||||
static int mutex_execute_request(sb_request_t *, int);
|
||||
static int mutex_done(void);
|
||||
|
||||
static sb_test_t mutex_test =
|
||||
{
|
||||
.sname = "mutex",
|
||||
.lname = "Mutex performance test",
|
||||
.ops = {
|
||||
.init = mutex_init,
|
||||
.prepare = NULL,
|
||||
.thread_init = NULL,
|
||||
.thread_done = NULL,
|
||||
.print_mode = mutex_print_mode,
|
||||
.print_stats = NULL,
|
||||
.get_request = mutex_get_request,
|
||||
.execute_request = mutex_execute_request,
|
||||
.cleanup = NULL,
|
||||
.done = mutex_done
|
||||
},
|
||||
.cmds = {
|
||||
.help = NULL,
|
||||
.prepare = NULL,
|
||||
.run = NULL,
|
||||
.cleanup = NULL
|
||||
},
|
||||
.args = mutex_args,
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
||||
static thread_lock *thread_locks;
|
||||
static unsigned int mutex_num;
|
||||
static unsigned int mutex_loops;
|
||||
static unsigned int mutex_locks;
|
||||
static unsigned int global_var;
|
||||
|
||||
int register_test_mutex(sb_list_t *tests)
|
||||
{
|
||||
SB_LIST_ADD_TAIL(&mutex_test.listitem, tests);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int mutex_init(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
mutex_num = sb_get_value_int("mutex-num");
|
||||
mutex_loops = sb_get_value_int("mutex-loops");
|
||||
mutex_locks = sb_get_value_int("mutex-locks");
|
||||
|
||||
thread_locks = (thread_lock *)malloc(mutex_num * sizeof(thread_lock));
|
||||
if (thread_locks == NULL)
|
||||
{
|
||||
log_text(LOG_FATAL, "Memory allocation failure!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < mutex_num; i++)
|
||||
pthread_mutex_init(&thread_locks[i].mutex, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int mutex_done(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for(i=0; i < mutex_num; i++)
|
||||
pthread_mutex_destroy(&thread_locks[i].mutex);
|
||||
free(thread_locks);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
sb_request_t mutex_get_request(void)
|
||||
{
|
||||
sb_request_t sb_req;
|
||||
sb_mutex_request_t *mutex_req = &sb_req.u.mutex_request;
|
||||
|
||||
sb_req.type = SB_REQ_TYPE_MUTEX;
|
||||
mutex_req->nlocks = mutex_locks;
|
||||
mutex_req->nloops = mutex_loops;
|
||||
|
||||
return sb_req;
|
||||
}
|
||||
|
||||
|
||||
int mutex_execute_request(sb_request_t *sb_req, int thread_id)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned int c;
|
||||
unsigned int current_lock;
|
||||
sb_mutex_request_t *mutex_req = &sb_req->u.mutex_request;
|
||||
log_msg_t msg;
|
||||
log_msg_oper_t op_msg;
|
||||
|
||||
/* Prepare log message */
|
||||
msg.type = LOG_MSG_TYPE_OPER;
|
||||
msg.data = &op_msg;
|
||||
|
||||
LOG_EVENT_START(msg, thread_id);
|
||||
do
|
||||
{
|
||||
current_lock = rand() % mutex_num;
|
||||
for (i = 0; i < mutex_req->nloops; i++)
|
||||
c++;
|
||||
pthread_mutex_lock(&thread_locks[current_lock].mutex);
|
||||
global_var++;
|
||||
pthread_mutex_unlock(&thread_locks[current_lock].mutex);
|
||||
mutex_req->nlocks--;
|
||||
}
|
||||
while (mutex_req->nlocks > 0);
|
||||
LOG_EVENT_STOP(msg, thread_id);
|
||||
|
||||
/* Perform only one request per thread */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void mutex_print_mode(void)
|
||||
{
|
||||
log_text(LOG_INFO, "Doing mutex performance test");
|
||||
}
|
||||
|
||||
29
sysbench/tests/oltp/Makefile.am
Normal file
29
sysbench/tests/oltp/Makefile.am
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
noinst_LIBRARIES = libsboltp.a
|
||||
|
||||
libsboltp_a_SOURCES = sb_oltp.c ../sb_oltp.h
|
||||
|
||||
if USE_MYSQL
|
||||
|
||||
libsboltp_a_CPPFLAGS = -I.. -I../.. $(AM_CPPFLAGS) $(MYSQL_CFLAGS)
|
||||
|
||||
else
|
||||
|
||||
libsboltp_a_CPPFLAGS = -I.. -I../.. $(AM_CPPFLAGS)
|
||||
|
||||
endif
|
||||
483
sysbench/tests/oltp/Makefile.in
Normal file
483
sysbench/tests/oltp/Makefile.in
Normal file
@ -0,0 +1,483 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SOURCES = $(libsboltp_a_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = sysbench/tests/oltp
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libsboltp_a_AR = $(AR) $(ARFLAGS)
|
||||
libsboltp_a_LIBADD =
|
||||
am_libsboltp_a_OBJECTS = libsboltp_a-sb_oltp.$(OBJEXT)
|
||||
libsboltp_a_OBJECTS = $(am_libsboltp_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libsboltp_a-sb_oltp.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libsboltp_a_SOURCES)
|
||||
DIST_SOURCES = $(libsboltp_a_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
noinst_LIBRARIES = libsboltp.a
|
||||
libsboltp_a_SOURCES = sb_oltp.c ../sb_oltp.h
|
||||
@USE_MYSQL_FALSE@libsboltp_a_CPPFLAGS = -I.. -I../.. $(AM_CPPFLAGS)
|
||||
@USE_MYSQL_TRUE@libsboltp_a_CPPFLAGS = -I.. -I../.. $(AM_CPPFLAGS) $(MYSQL_CFLAGS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sysbench/tests/oltp/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign sysbench/tests/oltp/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libsboltp.a: $(libsboltp_a_OBJECTS) $(libsboltp_a_DEPENDENCIES)
|
||||
-rm -f libsboltp.a
|
||||
$(libsboltp_a_AR) libsboltp.a $(libsboltp_a_OBJECTS) $(libsboltp_a_LIBADD)
|
||||
$(RANLIB) libsboltp.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsboltp_a-sb_oltp.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libsboltp_a-sb_oltp.o: sb_oltp.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsboltp_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsboltp_a-sb_oltp.o -MD -MP -MF "$(DEPDIR)/libsboltp_a-sb_oltp.Tpo" -c -o libsboltp_a-sb_oltp.o `test -f 'sb_oltp.c' || echo '$(srcdir)/'`sb_oltp.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsboltp_a-sb_oltp.Tpo" "$(DEPDIR)/libsboltp_a-sb_oltp.Po"; else rm -f "$(DEPDIR)/libsboltp_a-sb_oltp.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_oltp.c' object='libsboltp_a-sb_oltp.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsboltp_a-sb_oltp.Po' tmpdepfile='$(DEPDIR)/libsboltp_a-sb_oltp.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsboltp_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsboltp_a-sb_oltp.o `test -f 'sb_oltp.c' || echo '$(srcdir)/'`sb_oltp.c
|
||||
|
||||
libsboltp_a-sb_oltp.obj: sb_oltp.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsboltp_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsboltp_a-sb_oltp.obj -MD -MP -MF "$(DEPDIR)/libsboltp_a-sb_oltp.Tpo" -c -o libsboltp_a-sb_oltp.obj `if test -f 'sb_oltp.c'; then $(CYGPATH_W) 'sb_oltp.c'; else $(CYGPATH_W) '$(srcdir)/sb_oltp.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsboltp_a-sb_oltp.Tpo" "$(DEPDIR)/libsboltp_a-sb_oltp.Po"; else rm -f "$(DEPDIR)/libsboltp_a-sb_oltp.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_oltp.c' object='libsboltp_a-sb_oltp.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsboltp_a-sb_oltp.Po' tmpdepfile='$(DEPDIR)/libsboltp_a-sb_oltp.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsboltp_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsboltp_a-sb_oltp.obj `if test -f 'sb_oltp.c'; then $(CYGPATH_W) 'sb_oltp.c'; else $(CYGPATH_W) '$(srcdir)/sb_oltp.c'; fi`
|
||||
|
||||
libsboltp_a-sb_oltp.lo: sb_oltp.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsboltp_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsboltp_a-sb_oltp.lo -MD -MP -MF "$(DEPDIR)/libsboltp_a-sb_oltp.Tpo" -c -o libsboltp_a-sb_oltp.lo `test -f 'sb_oltp.c' || echo '$(srcdir)/'`sb_oltp.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsboltp_a-sb_oltp.Tpo" "$(DEPDIR)/libsboltp_a-sb_oltp.Plo"; else rm -f "$(DEPDIR)/libsboltp_a-sb_oltp.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_oltp.c' object='libsboltp_a-sb_oltp.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsboltp_a-sb_oltp.Plo' tmpdepfile='$(DEPDIR)/libsboltp_a-sb_oltp.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsboltp_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsboltp_a-sb_oltp.lo `test -f 'sb_oltp.c' || echo '$(srcdir)/'`sb_oltp.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
2063
sysbench/tests/oltp/sb_oltp.c
Normal file
2063
sysbench/tests/oltp/sb_oltp.c
Normal file
File diff suppressed because it is too large
Load Diff
23
sysbench/tests/sb_cpu.h
Normal file
23
sysbench/tests/sb_cpu.h
Normal file
@ -0,0 +1,23 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SB_CPU_H
|
||||
#define SB_CPU_H
|
||||
|
||||
int register_test_cpu(sb_list_t *tests);
|
||||
|
||||
#endif
|
||||
42
sysbench/tests/sb_fileio.h
Normal file
42
sysbench/tests/sb_fileio.h
Normal file
@ -0,0 +1,42 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SB_FILEIO_H
|
||||
#define SB_FILEIO_H
|
||||
|
||||
/* File operation types */
|
||||
typedef enum
|
||||
{
|
||||
FILE_OP_TYPE_NULL,
|
||||
FILE_OP_TYPE_READ,
|
||||
FILE_OP_TYPE_WRITE,
|
||||
FILE_OP_TYPE_FSYNC
|
||||
} sb_file_op_t;
|
||||
|
||||
/* File IO request definition */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int file_id;
|
||||
off_t pos;
|
||||
ssize_t size;
|
||||
sb_file_op_t operation;
|
||||
} sb_file_request_t;
|
||||
|
||||
int register_test_fileio(sb_list_t *tests);
|
||||
|
||||
#endif
|
||||
49
sysbench/tests/sb_memory.h
Normal file
49
sysbench/tests/sb_memory.h
Normal file
@ -0,0 +1,49 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SB_MEMORY_H
|
||||
#define SB_MEMORY_H
|
||||
|
||||
/* Memory request type definition */
|
||||
typedef enum
|
||||
{
|
||||
SB_MEM_OP_NONE,
|
||||
SB_MEM_OP_READ,
|
||||
SB_MEM_OP_WRITE
|
||||
} sb_mem_op_t;
|
||||
|
||||
|
||||
/* Memory scope type definition */
|
||||
typedef enum
|
||||
{
|
||||
SB_MEM_SCOPE_GLOBAL,
|
||||
SB_MEM_SCOPE_LOCAL
|
||||
} sb_mem_scope_t;
|
||||
|
||||
|
||||
/* Memory IO request definition */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sb_mem_op_t type;
|
||||
unsigned long block_size;
|
||||
sb_mem_scope_t scope;
|
||||
} sb_mem_request_t;
|
||||
|
||||
int register_test_memory(sb_list_t *tests);
|
||||
|
||||
#endif
|
||||
32
sysbench/tests/sb_mutex.h
Normal file
32
sysbench/tests/sb_mutex.h
Normal file
@ -0,0 +1,32 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SB_MUTEX_H
|
||||
#define SB_MUTEX_H
|
||||
|
||||
/* Threads request definition */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int nlocks;
|
||||
unsigned int nloops;
|
||||
} sb_mutex_request_t;
|
||||
|
||||
int register_test_mutex(sb_list_t *tests);
|
||||
|
||||
#endif
|
||||
|
||||
103
sysbench/tests/sb_oltp.h
Normal file
103
sysbench/tests/sb_oltp.h
Normal file
@ -0,0 +1,103 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SB_OLTP_H
|
||||
#define SB_OLTP_H
|
||||
|
||||
#include "sb_list.h"
|
||||
|
||||
/* SQL query types definiton */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SB_SQL_QUERY_NULL,
|
||||
SB_SQL_QUERY_LOCK,
|
||||
SB_SQL_QUERY_UNLOCK,
|
||||
SB_SQL_QUERY_POINT,
|
||||
SB_SQL_QUERY_CALL,
|
||||
SB_SQL_QUERY_RANGE,
|
||||
SB_SQL_QUERY_RANGE_SUM,
|
||||
SB_SQL_QUERY_RANGE_ORDER,
|
||||
SB_SQL_QUERY_RANGE_DISTINCT,
|
||||
SB_SQL_QUERY_UPDATE_INDEX,
|
||||
SB_SQL_QUERY_UPDATE_NON_INDEX,
|
||||
SB_SQL_QUERY_DELETE,
|
||||
SB_SQL_QUERY_INSERT
|
||||
} sb_sql_query_type_t;
|
||||
|
||||
/* SQL queries definitions */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id;
|
||||
} sb_sql_query_point_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int from;
|
||||
int to;
|
||||
} sb_sql_query_range_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id;
|
||||
} sb_sql_query_update_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id;
|
||||
} sb_sql_query_delete_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id;
|
||||
} sb_sql_query_insert_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int thread_id;
|
||||
int nthreads;
|
||||
} sb_sql_query_call_t;
|
||||
|
||||
/* SQL request definition */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sb_sql_query_type_t type;
|
||||
unsigned int num_times; /* times to repeat the query */
|
||||
unsigned int think_time; /* sleep this time before executing query */
|
||||
unsigned long long nrows; /* expected number of rows in a result set */
|
||||
union
|
||||
{
|
||||
sb_sql_query_point_t point_query;
|
||||
sb_sql_query_range_t range_query;
|
||||
sb_sql_query_update_t update_query;
|
||||
sb_sql_query_delete_t delete_query;
|
||||
sb_sql_query_insert_t insert_query;
|
||||
} u;
|
||||
|
||||
sb_list_item_t listitem; /* this struct can be stored in a linked list */
|
||||
} sb_sql_query_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sb_list_t *queries; /* list of actual queries to perform */
|
||||
} sb_sql_request_t;
|
||||
|
||||
int register_test_oltp(sb_list_t *tests);
|
||||
|
||||
#endif
|
||||
31
sysbench/tests/sb_threads.h
Normal file
31
sysbench/tests/sb_threads.h
Normal file
@ -0,0 +1,31 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef SB_THREADS_H
|
||||
#define SB_THREADS_H
|
||||
|
||||
/* Threads request definition */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int lock_num;
|
||||
} sb_threads_request_t;
|
||||
|
||||
int register_test_threads(sb_list_t *tests);
|
||||
|
||||
#endif
|
||||
|
||||
21
sysbench/tests/threads/Makefile.am
Normal file
21
sysbench/tests/threads/Makefile.am
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
noinst_LIBRARIES = libsbthreads.a
|
||||
|
||||
libsbthreads_a_SOURCES = sb_threads.c ../sb_threads.h
|
||||
|
||||
libsbthreads_a_CPPFLAGS = -I../.. $(AM_CPPFLAGS)
|
||||
482
sysbench/tests/threads/Makefile.in
Normal file
482
sysbench/tests/threads/Makefile.in
Normal file
@ -0,0 +1,482 @@
|
||||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
SOURCES = $(libsbthreads_a_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = sysbench/tests/threads
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libsbthreads_a_AR = $(AR) $(ARFLAGS)
|
||||
libsbthreads_a_LIBADD =
|
||||
am_libsbthreads_a_OBJECTS = libsbthreads_a-sb_threads.$(OBJEXT)
|
||||
libsbthreads_a_OBJECTS = $(am_libsbthreads_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libsbthreads_a-sb_threads.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libsbthreads_a_SOURCES)
|
||||
DIST_SOURCES = $(libsbthreads_a_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AM_CFLAGS = @AM_CFLAGS@
|
||||
AM_CPPFLAGS = @AM_CPPFLAGS@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CAT_ENTRY_END = @CAT_ENTRY_END@
|
||||
CAT_ENTRY_START = @CAT_ENTRY_START@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DOCBOOK_ROOT = @DOCBOOK_ROOT@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MYSQL_CFLAGS = @MYSQL_CFLAGS@
|
||||
MYSQL_LIBS = @MYSQL_LIBS@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_AIO_FALSE = @USE_AIO_FALSE@
|
||||
USE_AIO_TRUE = @USE_AIO_TRUE@
|
||||
USE_MYSQL_FALSE = @USE_MYSQL_FALSE@
|
||||
USE_MYSQL_TRUE = @USE_MYSQL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
XML_CATALOG = @XML_CATALOG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROC_FLAGS = @XSLTPROC_FLAGS@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
have_xsltproc_FALSE = @have_xsltproc_FALSE@
|
||||
have_xsltproc_TRUE = @have_xsltproc_TRUE@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mysqlconfig = @mysqlconfig@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
noinst_LIBRARIES = libsbthreads.a
|
||||
libsbthreads_a_SOURCES = sb_threads.c ../sb_threads.h
|
||||
libsbthreads_a_CPPFLAGS = -I../.. $(AM_CPPFLAGS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign sysbench/tests/threads/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign sysbench/tests/threads/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libsbthreads.a: $(libsbthreads_a_OBJECTS) $(libsbthreads_a_DEPENDENCIES)
|
||||
-rm -f libsbthreads.a
|
||||
$(libsbthreads_a_AR) libsbthreads.a $(libsbthreads_a_OBJECTS) $(libsbthreads_a_LIBADD)
|
||||
$(RANLIB) libsbthreads.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsbthreads_a-sb_threads.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libsbthreads_a-sb_threads.o: sb_threads.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbthreads_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbthreads_a-sb_threads.o -MD -MP -MF "$(DEPDIR)/libsbthreads_a-sb_threads.Tpo" -c -o libsbthreads_a-sb_threads.o `test -f 'sb_threads.c' || echo '$(srcdir)/'`sb_threads.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbthreads_a-sb_threads.Tpo" "$(DEPDIR)/libsbthreads_a-sb_threads.Po"; else rm -f "$(DEPDIR)/libsbthreads_a-sb_threads.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_threads.c' object='libsbthreads_a-sb_threads.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbthreads_a-sb_threads.Po' tmpdepfile='$(DEPDIR)/libsbthreads_a-sb_threads.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbthreads_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbthreads_a-sb_threads.o `test -f 'sb_threads.c' || echo '$(srcdir)/'`sb_threads.c
|
||||
|
||||
libsbthreads_a-sb_threads.obj: sb_threads.c
|
||||
@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbthreads_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbthreads_a-sb_threads.obj -MD -MP -MF "$(DEPDIR)/libsbthreads_a-sb_threads.Tpo" -c -o libsbthreads_a-sb_threads.obj `if test -f 'sb_threads.c'; then $(CYGPATH_W) 'sb_threads.c'; else $(CYGPATH_W) '$(srcdir)/sb_threads.c'; fi`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbthreads_a-sb_threads.Tpo" "$(DEPDIR)/libsbthreads_a-sb_threads.Po"; else rm -f "$(DEPDIR)/libsbthreads_a-sb_threads.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_threads.c' object='libsbthreads_a-sb_threads.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbthreads_a-sb_threads.Po' tmpdepfile='$(DEPDIR)/libsbthreads_a-sb_threads.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbthreads_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbthreads_a-sb_threads.obj `if test -f 'sb_threads.c'; then $(CYGPATH_W) 'sb_threads.c'; else $(CYGPATH_W) '$(srcdir)/sb_threads.c'; fi`
|
||||
|
||||
libsbthreads_a-sb_threads.lo: sb_threads.c
|
||||
@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbthreads_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libsbthreads_a-sb_threads.lo -MD -MP -MF "$(DEPDIR)/libsbthreads_a-sb_threads.Tpo" -c -o libsbthreads_a-sb_threads.lo `test -f 'sb_threads.c' || echo '$(srcdir)/'`sb_threads.c; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsbthreads_a-sb_threads.Tpo" "$(DEPDIR)/libsbthreads_a-sb_threads.Plo"; else rm -f "$(DEPDIR)/libsbthreads_a-sb_threads.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sb_threads.c' object='libsbthreads_a-sb_threads.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libsbthreads_a-sb_threads.Plo' tmpdepfile='$(DEPDIR)/libsbthreads_a-sb_threads.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsbthreads_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libsbthreads_a-sb_threads.lo `test -f 'sb_threads.c' || echo '$(srcdir)/'`sb_threads.c
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLIBRARIES ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
187
sysbench/tests/threads/sb_threads.c
Normal file
187
sysbench/tests/threads/sb_threads.c
Normal file
@ -0,0 +1,187 @@
|
||||
/* Copyright (C) 2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
||||
#include "sysbench.h"
|
||||
|
||||
/* How to test scheduler pthread_yield or sched_yield */
|
||||
#ifdef HAVE_PTHREAD_YIELD
|
||||
#define YIELD pthread_yield
|
||||
#else
|
||||
#define YIELD sched_yield
|
||||
#endif
|
||||
|
||||
/* Threads test arguments */
|
||||
static sb_arg_t threads_args[] =
|
||||
{
|
||||
{
|
||||
"thread-yields", "number of yields to do per request", SB_ARG_TYPE_INT,
|
||||
"1000"
|
||||
},
|
||||
{"thread-locks", "number of locks per thread", SB_ARG_TYPE_INT, "8"},
|
||||
{NULL, NULL, SB_ARG_TYPE_NULL, NULL}
|
||||
};
|
||||
|
||||
/* Threads test operations */
|
||||
static int threads_init(void);
|
||||
static int threads_prepare(void);
|
||||
static void threads_print_mode(void);
|
||||
static sb_request_t threads_get_request(void);
|
||||
static int threads_execute_request(sb_request_t *, int);
|
||||
static int threads_cleanup(void);
|
||||
|
||||
static sb_test_t threads_test =
|
||||
{
|
||||
.sname = "threads",
|
||||
.lname = "Threads subsystem performance test",
|
||||
.ops = {
|
||||
.init = threads_init,
|
||||
.prepare = threads_prepare,
|
||||
.thread_init = NULL,
|
||||
.thread_done = NULL,
|
||||
.print_mode = threads_print_mode,
|
||||
.print_stats = NULL,
|
||||
.get_request = threads_get_request,
|
||||
.execute_request = threads_execute_request,
|
||||
.cleanup = threads_cleanup,
|
||||
.done = NULL
|
||||
},
|
||||
.cmds = {
|
||||
.help = NULL,
|
||||
.prepare = NULL,
|
||||
.run = NULL,
|
||||
.cleanup = NULL
|
||||
},
|
||||
.args = threads_args,
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static unsigned int thread_yields;
|
||||
static unsigned int thread_locks;
|
||||
static pthread_mutex_t *test_mutexes;
|
||||
static unsigned int req_performed;
|
||||
|
||||
|
||||
int register_test_threads(sb_list_t *tests)
|
||||
{
|
||||
SB_LIST_ADD_TAIL(&threads_test.listitem, tests);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int threads_init(void)
|
||||
{
|
||||
thread_yields = sb_get_value_int("thread-yields");
|
||||
thread_locks = sb_get_value_int("thread-locks");
|
||||
req_performed = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int threads_prepare(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
test_mutexes = (pthread_mutex_t *)malloc(thread_locks *
|
||||
sizeof(pthread_mutex_t));
|
||||
if (test_mutexes == NULL)
|
||||
{
|
||||
log_text(LOG_FATAL, "Memory allocation failure!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
for(i = 0; i < thread_locks; i++)
|
||||
pthread_mutex_init(test_mutexes + i, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int threads_cleanup(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for(i=0; i < thread_locks; i++)
|
||||
pthread_mutex_destroy(test_mutexes + i);
|
||||
free(test_mutexes);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
sb_request_t threads_get_request(void)
|
||||
{
|
||||
sb_request_t sb_req;
|
||||
sb_threads_request_t *threads_req = &sb_req.u.threads_request;
|
||||
|
||||
SB_THREAD_MUTEX_LOCK();
|
||||
if (req_performed >= sb_globals.max_requests)
|
||||
{
|
||||
sb_req.type = SB_REQ_TYPE_NULL;
|
||||
SB_THREAD_MUTEX_UNLOCK();
|
||||
return sb_req;
|
||||
}
|
||||
|
||||
sb_req.type = SB_REQ_TYPE_THREADS;
|
||||
threads_req->lock_num = req_performed % thread_locks;
|
||||
req_performed++;
|
||||
SB_THREAD_MUTEX_UNLOCK();
|
||||
|
||||
return sb_req;
|
||||
}
|
||||
|
||||
|
||||
int threads_execute_request(sb_request_t *sb_req, int thread_id)
|
||||
{
|
||||
unsigned int i;
|
||||
sb_threads_request_t *threads_req = &sb_req->u.threads_request;
|
||||
log_msg_t msg;
|
||||
log_msg_oper_t op_msg;
|
||||
|
||||
/* Prepare log message */
|
||||
msg.type = LOG_MSG_TYPE_OPER;
|
||||
msg.data = &op_msg;
|
||||
|
||||
LOG_EVENT_START(msg, thread_id);
|
||||
for(i = 0; i < thread_yields; i++)
|
||||
{
|
||||
pthread_mutex_lock(&test_mutexes[threads_req->lock_num]);
|
||||
YIELD();
|
||||
pthread_mutex_unlock(&test_mutexes[threads_req->lock_num]);
|
||||
}
|
||||
LOG_EVENT_STOP(msg, thread_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void threads_print_mode(void)
|
||||
{
|
||||
log_text(LOG_INFO, "Doing thread subsystem performance test");
|
||||
log_text(LOG_INFO, "Thread yields per test: %d Locks used: %d",
|
||||
thread_yields, thread_locks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user