SVN Rev:3501

View and discuss the latests SVN commits, to ensure the best efficiency in our work.

Moderators: Support Team, Developer Team

SVN Rev:3501

Postby HunabKu » Sat Jun 06, 2015 5:06 pm

Commit from HunabKu

Log Messages:
- MODIFIED : Corrected GameServer/gameutils/StatPrint.cs but show error if data is null

Files Changed:
MODIFY - DOLSharp/trunk/GameServer/gameutils/StatPrint.cs
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am

Re: SVN Rev:3501

Postby Leodagan » Sun Jun 07, 2015 12:59 pm

Could you explain why you check that PerformanceCounter are "not null" before "creating" them ?

Looks like you should check if they ARE null before initializing them...

These are private member they aren't initialized anywhere else, and the only way to initialize them twice would be to call "OnScriptCompiled" multiple time !

Which error did you want to fix ?

En Français :

Tu pourrais expliquer pourquoi tu vérifies que les PerformanceCounter ne soit "pas null" avant de les "créer" ?

Le plus logique serait de vérifier s'ils sont null avant de les initialiser...

Ce sont des membres privés de la classe qui ne sont initialisé nul part ailleurs, et la seule façon de les initialiser plusieurs fois serait d’appeler la méthode "OnScriptCompiled" à la main dans une autre partie du code !

Quel problème as tu voulu corriger ?
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: SVN Rev:3501

Postby HunabKu » Mon Jun 08, 2015 4:36 am

In fact this "occupied" the server when one of these values is null, which made an error I are not on hand and slowed the server.

En fait ça "occupait" le serveur quand une de ces valeurs était null, ce qui rendait un message d'erreur que je n'es pas sous la main et ralentissait le serveur.
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am

Re: SVN Rev:3501

Postby Leodagan » Sun Jun 14, 2015 10:39 am

As expected from your update :

We lost all 4 System Performance Counters...

Did you test this ?

No one ever reported CPU usage trouble from StatPrint Script !

I have to update or revert this commit...
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: SVN Rev:3501

Postby HunabKu » Sun Jun 14, 2015 10:43 am

In my test serveur each counter are shown except if is null
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am

Re: SVN Rev:3501

Postby Leodagan » Sun Jun 14, 2015 10:52 am

And these values are displayed on your server ? (After RegionTime Stats)
CPU=0,6% DOL=0,0% pg/s=0,0 dsk/s=1,6
Not possible with your code except if you initialize Perf Counter elsewhere...
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: SVN Rev:3501

Postby HunabKu » Wed Jun 17, 2015 6:30 am

It's appear the null error message appear only when CPU=0,0%.
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am

Re: SVN Rev:3501

Postby HunabKu » Thu Jul 16, 2015 9:48 am

I have the message again :
Code: Select all
DOL.WeakMulticastDelegate - InvokeSafe took 1217ms! method: DOL.GS.GameEvents.StatPrint.OnScriptCompiled target: null
With the last svn unmodifie code
Code: Select all
public static void OnScriptCompiled(DOLEvent e, object sender, EventArgs args) { lock (typeof(StatPrint)) { m_timerStatsByMgr = new Hashtable(); m_timer = new Timer(new TimerCallback(PrintStats), null, 10000, 0); // Create performance counters if (m_systemCpuUsedCounter == null) m_systemCpuUsedCounter = CreatePerformanceCounter("Processor", "% processor time", "_total"); if (m_processCpuUsedCounter == null) m_processCpuUsedCounter = CreatePerformanceCounter("Process", "% processor time", GetProcessCounterName()); if (m_memoryPages == null) m_memoryPages = CreatePerformanceCounter("Memory", "Pages/sec", null); if (m_physycalDisk == null) m_physycalDisk = CreatePerformanceCounter("PhysicalDisk", "Disk Transfers/sec", "_Total"); } }
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am

Re: SVN Rev:3501

Postby Tolakram » Thu Jul 16, 2015 1:54 pm

It took 1.2 seconds to compile a script. Not sure that's an issue, or are you seeing something else?
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: SVN Rev:3501

Postby HunabKu » Thu Jul 16, 2015 3:13 pm

What worries me is that it returns null and memory overflow risk but can be me I worry too much?
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am

Re: SVN Rev:3501

Postby Leodagan » Thu Jul 23, 2015 8:32 am

Target is null because this Delegate is not related to any GameObject I think...

Like Tolakram says it's just a compile-time slow down warning !

If you notice any "run-time" error or warning then maybe it can be worth investigating.
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: SVN Rev:3501

Postby HunabKu » Fri Jul 24, 2015 7:13 am

I've not anny other error. We'll leave it like that, it seemed safe.
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am


Return to “%s” DOL SVN Commits

Who is online

Users browsing this forum: No registered users and 1 guest