In general, you must 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 runtime data required (such as primary key to select or data to insert).
Write code to submit SQL or stored procedures to Adaptive Server (for example, using dbsqlexec() calls).
Write code to process result sets
Name each transaction explicitly (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, use performance monitoring tools, available from third parties, to capture data streams.