Mushcode Profiling

If you're interested in knowing which objects in your mush run the most code, here are two ways of finding out a little about what's going on.


CMD/ALL Logging and Profiling

Stock TinyMUSH 2.2.3 has a an option to have the server write all commands issued by players and objects to the server log. To turn this on, the God issues the command @admin log=all_commands.

The resulting log can get very large, very quickly. It can be processed into a report showing the most active objects. This report is simply a count of the commands run, by command. It can't tell you how long each code fragment actually executed.

The script to perform this parsing is called mushprofile.all (so named because it reads CMD/ALL log entries from the server log.)

This report is good for stock servers, but really isn't a good tool for serious profiling efforts, since it can't give you any information about the cpu time consumed by the code. To do that, you have to patch the server to provide that information.


CMD/PROF Logging and Profiling

If you're willing to apply the SPROF patch to your TinyMUSH 2.2.3 server, then better profiling is available. The patch causes the server to log only code run from the queue, not typed interactively, and it adapts the log output to include a "ticks" count for the fragments.

Another benefit of the SPROF patch is that the server only logs commands from objects that have the PROFILE(o) flag set. So your log is a fraction of the size a CMD/ALL log would be for the same time period. Additionally, the entire profiling system can be enabled or disabled by the God by issuing the command @admin log=profile. This means you don't have to reset the PROFILE(o) flags individually.

The resulting log is processed by the mushprofile script, a close relation to mushprofile.all. (I plan on merging these back into one script in the future.) The report contains less noise and more useful information.


Summary and Comparison

CMD/ALL Logging

Advantages

Disadvantages

CMD/PROF Logging

Advantages


Frames Homepage Non-Frames Homepage

Say no to monopolies, BOYCOTT MICROSOFT!
KMFMS, one of the Angry Penguins.
[U.S. Flag] In memory of those who died Sept. 11, 2001 at the World Trade Center, the Pentagon, and on American Airlines Flight 11, United Airlines Flight 175, American Airlines Flight 77, and United Airlines Flight 93
Honoring Marsh & McLennan professionals I've worked with, including:
Jack Aron, Valerie Hanna, Joe Sisolak, Greg Reda, and Cathy Fagan.
Shattered Photoessay by James Nachtewy

Comments may be sent to gyles19@nospam.visi.com

This page last modified Saturday, 14-Jul-2001 11:15:29 CDT.