Performance question and testing

23 views
Skip to first unread message

Rafael Lucio

unread,
Apr 9, 2013, 11:43:14 AM4/9/13
to pirc...@googlegroups.com
First of all I wanted to ask you about how do you test your bot?

I have couple hundreds of ppl waiting for me to finish this bot and I'm kinda scary about the performance.
I'm going to host the bot on an AWS host, the micro instance if that matters.

Can you tell me if I can have any performance problem? 
It's a bot for only 1 channel, but with probabbly lots of activity (dota inhouse).

poste9

unread,
Apr 9, 2013, 11:45:02 AM4/9/13
to pirc...@googlegroups.com
Also, I'm using pircbotx + jpa + eclipselink. 


2013/4/9 Rafael Lucio <pos...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "pircbotx" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pircbotx/4ZkT2y9JyHA/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to pircbotx+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Leon Blakey

unread,
Apr 9, 2013, 11:58:09 AM4/9/13
to pirc...@googlegroups.com
I was doing some benchmarking towards the end of 1.9 and found on my semi-crappy laptop with Firefox, Netbeans, and a not so great benchmarker ( https://code.google.com/p/pircbotx/source/browse/src/test/java/org/pircbotx/Benchmark.java @ 50 iterations) running at the same time I got 13,000 - 14,000 lines per second. However in 2.0 I have increased this to ~16,500  That is way higher than any real world bot will see.

If you absolutely need as much performance as possible
 - ThreadedListenerManager with a fixed size thread pool with probably (# of cores - 1) threads. Just be careful of blocking calls to the database as they may clog your event queue
 - Don't use ListenerAdapter, it calls all methods with reflection. Implement onEvent and call your handler methods manually
 - Look forward to 2.0 where the performance has increased


--
You received this message because you are subscribed to the Google Groups "pircbotx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pircbotx+u...@googlegroups.com.

poste9

unread,
Apr 9, 2013, 12:07:58 PM4/9/13
to pircbotx
I don't know if its the jpa or the elipselink that makes the cache system, but its nicely done. I query the database only for insert/update/delete the select is cached and the cache is cleaned only when a new user enters the system. 

I'm going to look toward the onEvent thing, thank you.


2013/4/9 Leon Blakey <lord.qu...@gmail.com>



--

poste9

unread,
Apr 9, 2013, 12:18:59 PM4/9/13
to pircbotx
For googling purposes, I think this is a great example of how to use the onEvent:



2013/4/9 poste9 <pos...@gmail.com>



--
Reply all
Reply to author
Forward
0 new messages