Opened 6 years ago

Last modified 5 years ago

#5263 new enhancement

rmgen profiler — at Initial Version

Reported by: elexis Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Maps Keywords:
Cc: Patch:

Description

In #4950 a random map script performance logger was introduced. But it only prints the data in chronological order to stdout / mainlog.

There are at least two use cases not covered by that:

  1. Finding the slowest calls (i.e. the most important ones to improve)
  2. A graph allowing visual performance comparison of the different calls (i.e. finding all important calls to improve)

The current rmgen logger output is easy enough to read for maps with few code (< 400 lines, most current maps), but warrants a better solution for complex code (> 1000 lines, new maps).

As we already have two profilers (see wiki:EngineProfiling), the first consideration must be an integration of rmgen performance into the existing solutions, so as to prevent any duplicate implementation.

But we quickly find the Profiler1 data format to be lacking. It is a text file optimized to be human readable. It seems JSON or XML would have been better and the intermediate step extract.pl with all its regex magic would be unneeded. The text format is not really inviting to have a second table added. Also the format is designed to measure each of the categories once per turn, but in the rmgen case each call is only done once currently, or multiple times but at arbitrary times if extended. The latter is true for Profiler2 too.

So the cleanest solution seems to be to write a custom minimalistic rmgen profiler that writes a JSON file that is displayed with a jquery graph equal to the replayprofile graph.

Change History (1)

by elexis, 6 years ago

Attachment: screenshot.png added
Note: See TracTickets for help on using tickets.