Documentation and Tutorial

300 views
Skip to first unread message

Analyn Sarte

unread,
Oct 31, 2014, 3:23:30 AM10/31/14
to shinyp...@googlegroups.com
Hi,

Is there any documentation and or tutorial page for Shiny Profiler? I was thinking of using this one.

Regards,
Analyn

Maximilian Stein

unread,
Oct 31, 2014, 5:37:04 AM10/31/14
to shinyp...@googlegroups.com
Hi Analyn,
 
I'm very sorry for the inconvenience. Please see the .zip-File at
It contains a 'doc' directory where you can find a small (and maybe a bit
outdated) FAQ and API reference. Small examples are included in the
zip-File as well as in the latest repository version (available online at
 
I just realized that I planned to update the documentation and include it
in the source repository for a long time now...
 
If you have any further suggestions or issues please let me know.
 
Best regards
  Maximilian
Gesendet: Freitag, 31. Oktober 2014 um 08:23 Uhr
Von: "Analyn Sarte" <nalyn...@gmail.com>
An: shinyp...@googlegroups.com
Betreff: Documentation and Tutorial
--
You received this message because you are subscribed to the Google Groups "Shiny Profiler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyprofile...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Analyn Sarte

unread,
Nov 4, 2014, 1:56:57 AM11/4/14
to shinyp...@googlegroups.com
Hi Maximilian,

Good day.

I am new to profiling. Is it possible to profile a .exe file or do I have to add shiny macros to my code / application?

In the example, there is this function named ExecuteCommand. Something like the one below. Is it possible to call ExecuteCommand('something.exe')? I am not sure if the code was being profiled after calling that. I was also having difficulty understanding the results after running the sample program. Do you have any additional documentation on this?

void ExecuteCommand(const char *command) {
PROFILE_CODE(command);
}

Thanks and God bless!

Regards,
Analyn


--
You received this message because you are subscribed to a topic in the Google Groups "Shiny Profiler" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/shinyprofiler/BiXp-JSprrI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to shinyprofile...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
*******************************************************************
This e-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return e-mail.

Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.
*******************************************************************

Analyn Sarte

unread,
Nov 5, 2014, 4:51:47 AM11/5/14
to shinyp...@googlegroups.com
Hello,

Good day!

I came across for a ShinyProfileViewer to view for the results. It's looks for .pdxml file that is to be generated from the ShinyProfiler. My question for now is that 'How do I generate the .pdxml file'  then? I tried specifying a .pdxml file-name in PROFILE_OUTPUT but as I open it in the viewer, I haven't seen anything.

I haven't seen any tutorial also on this. If you can give me a link that can walk me through the steps, it would be beneficial.

Thanks!
Analyn

Maximilian Stein

unread,
Nov 6, 2014, 9:04:26 AM11/6/14
to shinyp...@googlegroups.com
Hello Analyn,
 
>>I am new to profiling. Is it possible to profile a .exe file or do I have to add shiny macros to my code / application?
It is not possible to profile a .exe file just like that. You will have to add the profiling macros to your code, then compile and execute it and finally watch the results that you can output with PROFILER_OUTPUT() or creating a custom data format using PROFILE_ROOT_DATA() or PROFILE_SHARED_DATA().
 
>>Is it possible to call ExecuteCommand('something.exe')?
You are referring to the Example called as "Advanced", right? This is possible, but it will not do what you might think. This would only execute the something.exe and measure the total time that the call of system("something.exe") consumes and profile it in a separate profiling scope. See the example below. Here PROFILE_CODE will just call the UnmodifiedFunction() function which does not contain any profiling macros. In this way you can measure the total time that UnmodifiedFunction() takes.
 
void UnmodifiedFunction() {
    // do stuff
    int sum = 0;
    for (int i = 1; i <= 10; i++) {
        sum += i;
    }
    printf("Sum is %d\n\n", sum);
}
 
void ExecuteCommand(void) {
    PROFILE_CODE(UnmodifiedFunction());
}
 
 
>>I haven't seen any tutorial also on this. If you can give me a link that can walk me through the steps, it would be beneficial.
The easiest way to start is to call PROFILE_BEGIN( name ) right at the beginning of your program (first in the main() function or even before). Then place PROFILE_FUNC() in the beginning of every function you have or that you like to profile and in the end of your programm call PROFILE_END() then PROFILE_UPDATE() and finally PROFILE_GET_TREE_STRING() or just PROFILE_OUTPUT() [these are the macros for the latest SVN version of Shiny - if you are using the downloadable zip Version which is labled "Shiny-NoExamples", then you will have to use the names given in the included Reference.html file]
 
// your includes
#include <Shiny.h>
 
int main() {
    PROFILE_BEGIN(myProgram)  /* begin of profiling region */
    // your code with lots of function calls that call PROFILE_FUNC()
    PROFILE_END()  /* end of profiling region */
    PROFILER_UPDATE()  /* update measurements */
    std::string profileString = PROFILE_GET_TREE_STRING()  /* get output as tree style to view call hierarchy */
    PROFILER_OUTPUT("profile.txt")  /* output the results to file profile.txt */
}
 
 
>>My question for now is that 'How do I generate the .pdxml file'  then?
The .pdxml file format is completely unknown to me. Maybe it's a format that was defined by the developer of the ShinyProfileViewer (did you mean this http://gcsc.uni-frankfurt.de/Members/mrupp/shinyviewer/ ?). They seem to use programm called 'ug4' to automatically profile their LUA scripts that will output a .pdxml file. You could ask them about more information about the pdxml format and if they could provide the code to parse it from the Siny profile data. As they state on the website, they use a modified version of Shiny "We made some changes to the original ShinyProfiler to include groups, filenames and lines, so up to now, you can only use it as it is in ug4." The output of the examples is given in "flat" and "tree" format (if you are using the SVN version). The tree format is equal to the representation shown on the ShinyProfileViewer webpage and you can take the description of the output from there. Short version: each node in the tree hierarchy has the accumulated time and percentile of the execution time of the elements (functions) below it. In the flat view you can see the total calls of a profiled region and the total execution time of that region.
 
 
I hope this helped a bit an I will add some description of the examples and their output to the upcomming documentation.
 
Kind regards
  Maximilian
Gesendet: Mittwoch, 05. November 2014 um 10:51 Uhr

Von: "Analyn Sarte" <nalyn...@gmail.com>
An: shinyp...@googlegroups.com
Betreff: Re: Documentation and Tutorial
Reply all
Reply to author
Forward
0 new messages