mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add timing/memory info to foamToEnsight, foamToEnsightParts, foamToVTK
- useful for performance comparisons
This commit is contained in:
@ -78,6 +78,8 @@ Note
|
||||
#include "cellSet.H"
|
||||
#include "fvMeshSubset.H"
|
||||
|
||||
#include "memInfo.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -153,6 +155,11 @@ int main(int argc, char *argv[])
|
||||
const bool binary = !args.optionFound("ascii");
|
||||
const bool nodeValues = args.optionFound("nodeValues");
|
||||
|
||||
cpuTime timer;
|
||||
memInfo mem;
|
||||
Info<< "Initial memory "
|
||||
<< mem.update().size() << " kB" << endl;
|
||||
|
||||
#include "createTime.H"
|
||||
|
||||
instantList Times = timeSelector::select0(runTime, args);
|
||||
@ -743,6 +750,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "Wrote in "
|
||||
<< timer.cpuTimeIncrement() << " s, "
|
||||
<< mem.update().size() << " kB" << endl;
|
||||
}
|
||||
|
||||
#include "ensightCaseTail.H"
|
||||
@ -752,7 +763,9 @@ int main(int argc, char *argv[])
|
||||
delete ensightCaseFilePtr;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
Info<< "\nEnd: "
|
||||
<< timer.elapsedCpuTime() << " s, "
|
||||
<< mem.update().peak() << " kB (peak)\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user