diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-14 08:00:48 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-14 08:00:48 +0000 |
commit | a26b2c537312b59ff991486e9cde6e5a22eebc32 (patch) | |
tree | e09a40c5c277153ae73881bff09f0870aebdc964 /src/map/script.c | |
parent | 7cadd2d8822be26de86747160b163b50367a2666 (diff) | |
download | hercules-a26b2c537312b59ff991486e9cde6e5a22eebc32.tar.gz hercules-a26b2c537312b59ff991486e9cde6e5a22eebc32.tar.bz2 hercules-a26b2c537312b59ff991486e9cde6e5a22eebc32.tar.xz hercules-a26b2c537312b59ff991486e9cde6e5a22eebc32.zip |
* [Improved]:
- script_save_mapreg for MapregSQL Saving to display perfomance only in slow queries.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7150 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c index fa61ab6b1..05cc383c3 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -11930,11 +11930,12 @@ static int script_save_mapreg(void) mapregstr_db->foreach(mapregstr_db,script_save_mapreg_strsub,fp); lock_fclose(fp,mapreg_txt,&lock); #else - int perfomance = gettick_nocache(); + int perfomance = (int)time(NULL); mapreg_db->foreach(mapreg_db,script_save_mapreg_intsub); // [zBuffer] mapregstr_db->foreach(mapregstr_db,script_save_mapreg_strsub); - perfomance = (gettick_nocache() - perfomance) / 1000; - ShowInfo("Mapreg saved in %d seconds.\n", perfomance); + perfomance = ((int)time(NULL) - perfomance) / 1000; + if(perfomance > 2) + ShowWarning("Slow Query: MapregSQL Saving @ %d second(s).\n", perfomance); #endif mapreg_dirty=0; return 0; |