_profile.c

tmi2_fluffos_v2/lib/cmds/adm/_profile.c · 967 B

From the archive tmi2_fluffos_v2.zip

Download the archive   « Back to the archive contents

// _profile.c
// hacked on by Mobydick, 8-15-93
// Prints the command use data kept by the profile daemon.

#include <mudlib.h>
#include <config.h>

inherit DAEMON ;

int cmd_profile() {

#ifdef PROFILING
   "/adm/daemons/profile"->dump_data() ;
   return 1 ;
#else
    write ("Profiling is not currently enabled.\n") ;
    return 1 ;
#endif
}

string help() {
	return ("Usage: profile\n\n"+
"If PROFILING is #defined in config.h, and the mud is rebooted, then\n"+
"thereafter the daemon object /adm/daemons/profile.c keeps track of\n"+
"all commands entered by users, and the system and user time taken in\n"+
"executing them. The profile command writes this information to the\n"+
"file CMD_DUMP in the root directory where it can be examined, usually\n"+
"to find out what commands are in need of speed improvements.\n"+
"This option eats up a lot of CPU, so it's a wise idea to keep it turned\n"+
"off unless you need the information for some reason.\n"+
"") ;
}

Site Stats

Snippets: 1791
Codebases: 571