Solved

profiling a C++ CGI scipt

Posted on 1997-07-09
4
157 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
[X]
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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Disk Ram Peak 1 54
Facebook React and SyntheticEvents 6 76
Sums of coloumns in html/java 15 83
Perl script to process a .csv file 18 59
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

740 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