
CHAPTER 7 Test: Ensuring Stability and Performance
85
Writing Performance Scripts
This section discusses the basics of writing performance scripts:
• Write Benchmark Scripts
• Drivers
Write Benchmark Scripts
In general, you have to write special benchmark scripts rather than rewriting
applications as benchmarks.
To write the benchmark script:
• Add a function to
funcs.c for each transaction
• Generate any run-time data required (such as primary key to select or data
to insert)
• Write code to submit SQL or stored procedure(s) to Adaptive Server (for
example, using
dbsqlexec() calls)
Transaction
generation
Thin client to simulate
user execution of
transactions
• Strong multiuser load
testing
• Focus on back-end
server issues
• May increase development time for
creating multiuser test simulations,
though learning and development
curve generally less than keystroke
capture tools
• Adds time for debugging test harness
to prevent skewed results
• Depends on strong analysis of process
or transaction profiles
Production
load capture
Using tools to capture
real transactions in a
production environment,
including performance
and semantic
characteristics, and
resubmit in a test
environment for analysis
• Tests real production
loads, including ad
hoc queries
• Especially useful
when little or no
analysis of
transaction profiles is
available
• Introduces new software into a
production environment
• Production and test system
configurations must be identical for
valid performance analysis
Technique Description Advantages Disadvantages
Komentáře k této Příručce