Hi everyone,
I am currently stumbled into this problem and I'd love to hear some suggestions from you.
I have a C++ program that uses a precompiled library to make some queries to PostgreSQL database. Now the problem is I want to find out the total (combined) cpu time it takes to do all routines described in the source code of the program and also the time it spends waiting for the database-related activities.
I used the time
command in Linux, but it seems that it didn't measure the time the program spent on the database.
And in my situation, it won't be possible for me to recompile the library provided to me, so I don't think things like gprof
would work.
Any suggestions?
Thank you.