
Migrating to Sybase Adaptive Server Enterprise 11.5 7-7
Adaptive Server Enterprise 11.5 Writing Performance Scripts
• Add 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 to Adaptive Server
(for example, using
dbsqlexec() calls)
• Write code to process result set(s)
• Name each transaction explicitly for (for example, “
begin tran
cust_update
”) to make it easier to identify in system procedures
and tables
• For a stored procedure-based system, verify the parameters that
make the stored procedures work. If the parameters need to vary
for a meaningful test, add the necessary logic.
Volume is critical in performance simulation. A script roughly
equivalent to an application, running at the normal production
volume for that application, is usually better than a script
functionally matched to an application, but running at only half the
volume.
If workload is based on client PCs issuing Transact-SQL, you can use
performance monitoring tools, available in the market, to capture
data streams.
Drivers
In addition, you need drivers for these tasks:
• Error handling
• Deadlock handling
• Result handling
• Timing measurement
• Run-time data generation
General Error Handling
In the event of an error, you can either throw away the transaction
and not count it or, depending on the requirements of the test, restart
the transaction and count the entire response time.
Commenti su questo manuale