Solved

profiling a C++ CGI scipt

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

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to pick specific file from ftp 13 76
using VBS script to log into internal website 6 43
Select SamAccountName - powershell script 2 29
run powershell script endlessly 3 32
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…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

738 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