Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

profiling a C++ CGI scipt

Posted on 1997-07-09
4
156 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 80 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

856 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