Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

profiling a C++ CGI scipt

Posted on 1997-07-09
4
Medium Priority
?
164 Views
Last Modified: 2013-12-25
Hi,

I need help in profiling a C++ CGI script using MS Visual C++ or any other tools. I need to know about the function coverage and function timings.
The normal procedure for profiling exe doesn't seem to work as it is a CGI script expecting a HTTP request.

Thanks

shantanu
0
Comment
Question by:shantanu070997
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
faster earned 160 total points
ID: 1829004
It can just be a normal windows console program, just read from stdin/environment and write to the stdout, nothing much.
0
 

Author Comment

by:shantanu070997
ID: 1829005
Hi,

Thanks for your response.

I need some more clarifications.

The problem is that I need to set up the environment/stdin from where the cgi can read from it. I do not know how to do that.
As I understand this is set up by the web server when it receives an HTTP request.

Just running the exe is of no help, my problem is to invoke the
profiler when the cgi exe is invoked by the webserver.

shantanu
0
 
LVL 7

Expert Comment

by:faster
ID: 1829006
I don't quite understand what do you mean by "profiling a C++ CGI scipt".  Of course you will need a web server for testing, and I think microsoft personal web server is a good tool for that.  After you properly setup the server, everything else will just be normal C++ coding.  Maybe you could further clarify your needs.
0
 

Author Comment

by:shantanu070997
ID: 1829007
Hi,

I am sorry that I was not very clear about the question.
Well there is no problem with my CGI script or in running it.
It has been developed by a number of people and there is huge amount of redundant code in it. Now I want to find out how efficient the code is, i.e. things like how many times a function/method in the script is being called, how much of CPU time & other resources a particular function is consuming, etc. so that I can improve it's performance.

Microsoft Visual C++ has a tool called profiler which can be used for getting such statistics for all kind of projects. But I am unable to use that for a CGI-Script as the exe file expects that certain CGI environment variables are set, some input in stdin, etc. as usual.

Like the way i attach the VC++ debugger to the script, I want to know how i can do the same for the "profiler" in VC++.
OR
is there any other tools using which i can use to evaluate the performance of a C++ CGI script.

Sorry for the trouble
Thanx
shantanu
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question