Commit Graph

28 Commits

Author SHA1 Message Date
eb8b51b475 ENH: use back(), pop_back() instead remove()
- adjust looping to resemble LIFO pattern

STYLE: adjust some string includes
2023-01-27 09:50:46 +01:00
3d892ace29 STYLE: set readOpt(..), writeOpt(..) by parameter, not by assignment
STYLE: qualify format/version/compression with IOstreamOption not IOstream

STYLE: reduce number of lookups when scanning {fa,fv}Solution

STYLE: call IOobject::writeEndDivider as static
2022-07-19 11:17:47 +02:00
a088bda4d2 ENH: use unique_ptr for memory management of profiling
- makes it easier to distinguish between pointers referring to pool
  data versus pointers actually holding storage, avoids
  manual demand-driven deletion and autoPtr.

ENH: simplify/improve Pstream profiling

- times now double (not scalar) for consistency with what cpuTime
  delivers

- use bool to track suspend state
2020-07-09 16:17:33 +02:00
3e43edf056 ENH: unify use of dictionary method names
- previously introduced `getOrDefault` as a dictionary _get_ method,
  now complete the transition and use it everywhere instead of
  `lookupOrDefault`. This avoids mixed usage of the two methods that
  are identical in behaviour, makes for shorter names, and promotes
  the distinction between "lookup" access (ie, return a token stream,
  locate and return an entry) and "get" access (ie, the above with
  conversion to concrete types such as scalar, label etc).
2020-06-02 17:26:03 +02:00
42299dca22 ENH: use IOstreamOption for writeObject() calls.
- reduces the number of parameters that are being passed around
  and allows future additions into the IOstreamOption with mininal
  effort.
2020-02-19 09:25:33 +00:00
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
de11575e1e STYLE: mark containers empty() and size() as noexcept 2019-10-02 09:04:20 +02:00
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
ef394e9d99 GIT: missed commit for 9ae4ea6882 2018-09-10 18:34:52 +02:00
6390c18381 ENH: suppress Info output for some cases (issue #722, #893)
- add additional control via a Foam::infoDetailLevel flag, which is
  supported by a 'DetailLevel' macro.  Eg,

      DetailLevel << "some information" << nl

- When infoDetailLevel is zero, the stdout for all Foam::system() calls
  are also redirected to stderr to prevent child output from
  appearing on the parent.

- close stdin before exec in system call.
2018-06-22 12:26:33 +02:00
d901b4f450 ENH: reduce profiling overhead (issue #764)
- avoid clockTime in favour of clockValue.

- avoid allocations when profiling is not active.

- replace hashing with manual pointer lists
2018-03-26 21:38:47 +02:00
36719bf55b STYLE: consistent lookupOrDefault template parameters
- in many cases can just use lookupOrDefault("key", bool) instead of
  lookupOrDefault<bool> or lookupOrDefault<Switch> since reading a
  bool from an Istream uses the Switch(Istream&) anyhow

STYLE: relocated Switch string names into file-local scope
2018-03-26 09:09:09 +02:00
8fc6bd17c9 ENH: improvements in profiling (issue #648)
- include amount of free system memory in profiling, which can give an
  indication of when swapping is about to start

- profilingSummary utility to collect profiling from parallel
  calculations. Collects profiling information from processor
  directories and summarize the time spent and number of calls as (max
  avg min) values.
2017-12-01 15:44:20 +01:00
10c512f9ef STYLE: note correct defaults for profiling 2017-10-19 17:25:53 +02:00
fb20bc107e INT: Updated dependent code following latest set of integrations 2017-09-06 16:05:12 +01:00
b287d1bddd CONFIG: cpu/sys information in profiling now OFF by default (issue #526)
- since the cpu/sys information is invariant, it doesn't make much
  sense to emit by default at every time-step.
2017-07-14 16:41:15 +02:00
d4c7d8c6e5 ENH: add possibility to enable/disable profiling globally (issue #441)
- use InfoSwitch to disable, or via static method.

- respect the state of the argList banner when deciding to emit
  initialization information. Can otherwise end up with unwanted
  output rubbish on things like foamDictionary and foamListTimes.
2017-04-19 17:04:37 +02:00
e55339d1e1 BUG: name collision on profiling (issue #440) 2017-04-19 11:04:32 +02:00
fa10d97b76 COMP: avoid nested classes for profiling (related to issue #441)
- nested classes can't be forward declared and thus less flexible
  than desired
2017-04-19 01:08:39 +02:00
06f22a9bf3 ENH: cleanup Ostream to ease usage (issue #254)
- Include newline in beginBlock/endBlock, since this corresponds to
  the standard usage. The beginBlock now takes keyType instead of word.

- Provide Ostream::writeEntry method to reduce clutter and simplify
  writing of entries.

  Before
  ======
      os << indent << "name" << nl
         << indent << token::BEGIN_BLOCK << incrIndent << nl;
      os.writeKeyword("key1") << val1 << token::END_STATEMENT << nl;
      os.writeKeyword("key2") << val2 << token::END_STATEMENT << nl;
      os << decrIndent << indent << token::END_BLOCK << nl;

  After
  =====
      os.beginBlock("name");
      os.writeEntry("key1", val1);
      os.writeEntry("key2", val2);
      os.endBlock();

- For completeness, support inline use of various Ostream methods.
  For example,

      os << beginBlock;
      os.writeEntry("key1", val1);
      os.writeEntry("key2", val2);
      os << endBlock;

- For those who wish to write in long form, can also use endEntry inline:

      os.beginBlock("name");
      os.writeKeyword("key1") << val2 << endEntry;
      os.writeKeyword("key2") << val2 << endEntry;
      os.endBlock();

The endEntry encapsulates a semi-colon, newline combination.
2016-06-06 11:51:05 +01:00
8752f77ab9 ENH: adjust output format of profiling (issue #157)
- output as dictionary format instead of PtrList.
  Makes it easier to manipulate (changeDictionaryDict, foamInfoExec).
2016-06-28 15:52:58 +02:00
95c9e53a14 STYLE: remove echo to stdout for profiling::writeNow() 2016-06-23 16:15:27 +02:00
ea58a523da ENH: use long for number of calls in profiling (issue #157)
- provide a static profiling::print(Ostream&) method to output
  values to a log file.
2016-06-23 14:34:45 +02:00
eb3ba2479a BUG: disturbing warning about multiple initialization of profiling
- For example, decomposePar use multiple simultaneous Times.
  So permit multiple initialization without a warning. (issue #157)
2016-06-23 14:18:17 +02:00
85e246b8f2 BUG: profiling dictionary could be binary/compressed (fixed #157)
BUG: memInfo not activated by -profiling option (fixed #157)
2016-06-22 17:20:15 +02:00
cbc4e0d96f ENH: add maxMem information to profiling
- value corresponds to the max memory when the corresponding profiling
  is started.
  Only used when the top-level profiling has memInfo active.

- memInfo is disabled by default, since the new maxMem functionality
  otherwise adds overhead with every call.

tutorial:
    /lagrangian/reactingParcelFoam/verticalChannelLTS
2016-06-20 21:21:43 +02:00
37bf28c249 STYLE: rename Profiling -> profiling 2016-06-20 21:20:31 +02:00