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)
Write code to process result set(s)
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, you can use performance monitoring tools, available in the market, to capture data streams.