summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-14 08:00:48 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-14 08:00:48 +0000
commita26b2c537312b59ff991486e9cde6e5a22eebc32 (patch)
treee09a40c5c277153ae73881bff09f0870aebdc964
parent7cadd2d8822be26de86747160b163b50367a2666 (diff)
downloadhercules-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
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--src/map/script.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 7e605b08f..71c051380 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,9 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/06/14
* [Improved]:
+ - script_save_mapreg for MapregSQL Saving to display perfomance only in slow
+ queries. [Lance]
+ * [Improved]:
- npc_parse_script to show information and remove duplicated NPCs [Lance]
2006/06/13
* Updated mob_db.sql and item_db.sql to latest. [Skotlex]
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;