solvcon / modmesh

Toolkit for solving partial differential equations
BSD 3-Clause "New" or "Revised" License
28 stars 35 forks source link

Prototype profiler object serialization using JSON #343

Open yungyuc opened 1 month ago

yungyuc commented 1 month ago

This issue derives from #302.

Develop a helper class or some helper classes to serialize the CallProfile object used for recording the profile data (in memory). Remarks:

  1. The helper class(es) should use proper encapsulation.
  2. The serialized data should be testable in Python. It may also be tested in C++ (google-test) but the C++ tests are not mandatory.
  3. The serialized JSON string should be human readable. The readability should be easy and use decent indentation.

There should be a capability to deserialize the data back to CallProfile. We may use this issue to track the deserialization, or use a different issue.

yungyuc commented 1 month ago

@ThreeMonth03 is working on this issue with PR #323.

yungyuc commented 4 weeks ago

@ThreeMonth03 plans to make the next review for PR #323 ready by 5th June.

yungyuc commented 4 weeks ago

323 is merged. We should start to exercise the data for analyzing performance to find out how useful it is and how to improve the design (of the profiler and the serialization).

tigercosmos commented 6 days ago

@ThreeMonth03 Since https://github.com/solvcon/modmesh/pull/372 and https://github.com/solvcon/modmesh/pull/377, the general JSON parser, is merged, could you revise CallProfiler to use the new SerializableItem. For more details and examples, you can check the https://github.com/solvcon/modmesh/pull/372 and https://github.com/solvcon/modmesh/pull/377.

ThreeMonth03 commented 6 days ago

@ThreeMonth03 Since #372 and #377, the general JSON parser, is merged, could you revise CallProfiler to use the new SerializableItem. For more details and examples, you can check the #372 and #377.

Thank's for your contribution, I will trace the implementation and revise the CallProfiler.