Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 420
    • Issues 420
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1856
Closed
Open
Issue created Sep 24, 2020 by Henning Scheufler@Henning86

profiling csv

Profiling your application is an important step in development. The new profiling feature drastically simplifies this process by just adding profiling triggers or macros in the relevant function or classes. When writing a test application using the profiling feature the timings can be written to a specific file by adding:

profiling::print(fileName)

However, the current format is hard to parse with another tool/language e.g. python:

profiling
{
    trigger0
    {
        id              0;
        description     "application::main";
        calls           1;
        totalTime       2.50246;
        childTime       2.41516;
        active          true;
    }

    trigger1
    {
        id              1;
        parentId        0;
        description     "trigger";
        calls           56;
        totalTime       2.39554;
        childTime       1.21259;
        maxMem          260780;
        active          true;
    }
    .....

}

Would it be possible to add an alternative write format such as csv:?

trigger,id,parentId,description,calls,totalTime,childTime,maxMem,active trigger0,0,application::main,1,2.50246,2.41516,true

The documentation of the profiling feature is very helpful but could be improved by adding the default write the location of the profiling file:

Detailed Description

Code profiling. 

This is typically activated from within the system/controlDict as follows (defaults shown):
profiling
{
    active      true;
    cpuInfo     false;
    memInfo     false;
    sysInfo     false;
}

or simply using all defaults:
profiling
{}

The default output is timeName/uniform/profiling // added
Assignee
Assign to
Time tracking