RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Testing the performance of a new logger... pretty amasing!

L

Lost User

Guest
Testing the performance of a new logger... pretty amasing!

well not screenshots.. but it will work:

[code:1]
World: Saving...done in 0,2 seconds.
Logging 1 lines of string
"Hi everybody, this is test and I am logging 1 line!!! :) "
Logging took 0 seconds!
Logging 1000 lines of string
"I don't wanna make you wait, so look at what babe is capable of! "
Logging took 0 seconds!
Logging 1000 lines of string
"I don't wanna make you wait, so look at what babe is capable of! "
Logging took 0 seconds!
World: Saving...done in 0,2 seconds.
World: Saving...done in 0,4 seconds.
Logging 10000 lines of string
"Like that don't you? :) Let's go to 10 thousand :) "
Logging took 0,03125 seconds!
Logging 10000 lines of string
"Like that don't you? :) Let's go to 10 thousand :) AGAIN! "
Logging took 0,109375 seconds!
Logging 10000 lines of string
"Like that don't you? :) Let's go to 10 thousand :) AGAIN! "
Logging took 0,078125 seconds!
Logging 100000 lines of string
"ehh whatever lez make it 100 thousand :) "
Logging took 1,046875 seconds!
Logging 100000 lines of string
"ehh whatever lez make it 100 thousand :) and again :L) "
Logging took 1,125 seconds!
Logging 1000000 lines of string
"Now watch 1 million :) "
Logging took 7,8125 seconds!
World: Saving...done in 0,4 seconds.
World: Saving...done in 0,2 seconds.
Logging 1000000 lines of string
"Now watch 1 million :) AGAIn ( worldsave :((( ) "
Logging took 5,140625 seconds!
Logging 10000000 lines of string
"This babe is cute ain't it? Lez go to 10 million :) "
Logging took 93,78125 seconds!
World: Saving...done in 0,5 seconds.
World: Saving...done in 0,2 seconds.
World: Saving...done in 0,2 seconds.
World: Saving...done in 0,1 seconds.
World: Saving...done in 0,2 seconds.
Logging 1000 lines of string
"Wow that hurt :) Well can u beat this record? :) "
Logging took 0 seconds!
Logging 1000 lines of string
"Wow that hurt :) Well can u beat this record? :) "
Logging took 0,015625 seconds!
Logging 1000 lines of string
"Wow that hurt :) Well can u beat this record? :) "
Logging took 0 seconds!
Logging 1000 lines of string
"Wow that hurt :) Well can u beat this record? :) BIG LINES GO :)))) "
Logging took 0 seconds!
World: Saving...done in 0,2 seconds.
World: Saving...done in 0,2 seconds.
World: Saving...done in 0,2 seconds.
World: Saving...done in 0,3 seconds.
Logging 2000 lines of string
"Thank you for watching, you will soon have it. Richard - [email protected] "
Logging took 0,015625 seconds!
World: Saving...done in 0,2 seconds.
World: Saving...done in 0,2 seconds.
[/code:1]


... Pretty nice aint't it? But it's not finished yet - I will release max in a week :). But the point is - right now even if you have 500 players online all the time, and you log everything they say, and all your scripts, it should not affect your computer's performance in almost any way ( maybe 0.00001%).... That's how powerful it is :) Besides - I was running that on my comp which is 1.6 Ghz P4, 700 MB RAM, and I also had 5 browsers running, runuo script editor, runuo, client, a whole bunch of soft including MP3, Kaaz, and a lot more...

Here are the lines of code I were executing:

[code:1] private static void l_OnCommand( CommandEventArgs e )
{
string str = "";
for ( int i = 1; i < e.Length; i++ ) str += e.GetString(i) + " ";
Console.WriteLine("Logging " + e.GetInt32(0) + " lines of string\n\"" + str + "\"");

long sec = System.DateTime.Now.ToFileTime();

for ( int z = 0; z < e.GetInt32(0); z++ )
log.LogLine(str);

sec = System.DateTime.Now.ToFileTime() - sec;
Console.WriteLine( "Logging took " +(double) sec/10000000 + " seconds!" );
}[/code:1]
 
L

Lost User

Guest
BTw, if anybody wants proof - I can send them the 600 mb text file that it created during those tests that I showed you :)
 
L

Lost User

Guest
Hehe :)

It's capable of logging sync 4 trillion bytes in less than 3 minutes on my machine :)

..WHich means, that you can do WHATEVER you want while you logging that, since I am using threading, and you can even access and modify the log file while it's logging :)
 

Ariel

Wanderer
Richard, i havent used sphere for over a year (thank god), but im guessing this is like the /hearall function.
Will it acctually log the name of the person speaking, something like

[lord vain]omg that was so kewl
[dread]yeah cant wait to see whats next

etc etc

Ariel
 
L

Lost User

Guest
... No it's not.. .all that is is a command Log("string"), which will log the string :) ... with some really cool features, and extremely powerful performance :)
 

Vale

Wanderer
Richard that sounds sweet, but when you said 600mb logged pretty quickly it brought something up to my attention... Would it be possible to use this system to bring the server down? If I was to log on several clients and spam would that over memory, hehe, the computer?
 
L

Lost User

Guest
no it wouldn't....

Besides, if that becomes an issue - it's extremely easily to limit size of 1 log file...
 
L

Lost User

Guest
Look it's an incredibly stupid issue... If you don't trust ur devs that much - why even hire them? Besides - even without this logger class it's pretty easy to make something that kills ur computer with C#...
 

TikiTorchBob

Wanderer
Note the :p , meaning "I'm joking".

No need to get offended everytime someone makes a comment. It's constructive criticism, if you can't take it don't publicize your scripts. Dur?
 
Top