Blog

Slight nanotimer performance update

26/10/2011 23:17

Lately I (Virgo47) started to use Google+ more and there I also shortly informed about new findings on the nanoTimer performance.

In the end the link leads to the one particular wiki page - bottom line being that Windows 7 seems to be really usable platform when it comes to ns. At last.

Quiet, but not completely

25/11/2009 15:17

It is true, we sort of put Java Simon on ice, but that doesn't mean we gave up on it altogether. Virgo has a secret plan to work on Radovan's previous Simon servlet filter and maybe we can build also some web frontend. That is if our other work duties go a bit less hectic, because right now there is no way how we can pull it off. However - the most important thing is that Java Simon is still used. Download counts are not so high like when we released news on TheServerSide.com, but it doesn't matter that much.

We're glad that there are developers out there that use Java Simon and sometimes even come with their own ideas - however small they are. Just today we commited contribution from one of our users - WrappingJavaSimonDatasource - so soon you can use it out of the box if you need it (when 2.2 version goes out - or just copy&paste it from trunk, whatever). Java Simon is not only about us, but also about you - our users. If you have some nice experience, or even something you can call success story - tell us! Post a blog post, write a tutorial (a lot of things is not covered on our wiki, we realize that) and let us know. If Java Simon solved your problems, help us to spread the word. Bigger community will be good for all of us in return. And it may also virtually kick our butts to do something new. :-)

Funny nanotimer performance

11/06/2009 15:16

We're slowly closing in with version 2 of the Java Simon and during the process I tried to test how we stand against JAMon after adding things like Callbacks. Truth is that Simon now does a bit more than before and I was curious about the impact. I compiled JamonComparison class from our examples, started it and... shock! Man, it can't be THAT bad. Simon was incredibly slower than the JAMon. I didn't believe it was only because of more processing in the Simon because in our previous tests in both cases (Simon/JAMon) timer calls were the slowest part by far. That led me to our other micro-test that measures how precise are milli- and nano-timers. And in case of nanotime also how fast it can return the results. I compiled SystemTimersPrecision and when I ran it I discovered that nanotimer needs nearly 2000 ns for every call. This was in contrast with my previous measurement when it needed around 250 ns.

I'm not sure if it's JDK update or Windows XP update - the thing is that you generally don't choose your JDK/OS combination to have fast nanotimer calls, do you? :-) Check our Wiki page on this topic to find more results in the article and comments bellow it. It's unlucky that the call costs so much on various Windows systems but it still shouldn't be show-stopper when you need to measure something. If you need to track some fast methods, millis are unusable anyway, nanos are fine, but the overhead is bigger (even 10 times), but at least you have your results. If you measure something long-running than the overhead is not so significant. Long-running is anything with I/O involved, DB access for instance (something our JDBC proxy driver can help you with). Sure, you could use other product with millis in that case, but I'm pretty sure Java Simon can convince you with the architecture, extensibility via Callbacks, JMX support and also that often mentioned JDBC proxy driver. Of course, if you need something else entirely, go for it.

Java Simon v2 is over-due, we know it, but I still want to write about Callbacks and Configuration before we release it. But whatever is now in the trunk, it's pretty close to the final version.

 

Major changes in the core of the Java Simon v2

28/01/2009 14:30

While there are some important extensions to the Java Simon (JMX, Spring integration, etc.) there are a few important changes in the core part of the API that are probably even more important. If you've already managed to use Java Simon 1 I strongly suggest that you use version 2 even in its alpha stages. The thing is:

  • If your project is finished or close to finish (month or two) stay with version 1.
  • If your project continues and you're just experimenting with Simon, definitely use version 2! There is v2-alpha1 which is basically rework of the v1 after a few changes in Stopwatch. If there is newer alpha out (check Featured Downloads on the right on our project page) take that one of course, because it contains more features from v2.
  • Version 2 is planned to be out during March or April 2009, which is really soon.

Now what are the changes and why we made them?

  • Important change happened in the Stopwatch. While in the v1 it contained various start/stop methods that took care of multi-threaded environment now it has only one start method and this start doesn't return this anymore but it returns new Split object instead. You have to take care of the Split object, you have to take care of your multi-threading, you have to call stop method on the Split. This makes our code safer as the Stopwatch doesn't contain internal maps that were prone to memore-leaks if client forgot to stop some split. Thanks to Erik van Oosten and his great Java Simon evaluation.
  • Based on the same post we changed sample methods so that they return Java Bean objects now instead of the field.
  • While in v1 you had to use SimonManager now you can use non-static Manager implementation directly. SimonManager still stays your favourite convenient class full of static methods, of course. ;-) This allows to have multiple separeated Simon hierarchies which may be handy in Java EE environment.
  • To provide some extensibility for the API we introduced Callback interface. This allows to hook onto various events and process these events in any way you want - to log them, send JMX notifications, whatever.

There are more features to come with version 2 and I covered only those in the core part of the API. Stay tuned, download, use, test, let us know what you think. :-)

 

Website for Java Simon?

13/01/2009 23:46

I'm trying to create something representative for Java Simon API library - but there is always some limitation if you don't wanna use your own machine or some raw hosting. I'm just a fresh user of Webnode and it seems to be nice, but I can't upload plain HTML files here which means I can't host Javadocs for our project here. I can't host it on Google Code either (unless I want to have them in SVN, which I don't). One thing is sure. When we have "Donate" button on our project page and this button gets actually used we might think about some real hosting that will probably not obsolete Google Group and Google Code but it will work as a proper presentation for Java Simon with Javadoc - and who knows what else too.

For now... consider this site as non-official. I don't even link to it now. ;-) But if anyone who knows what Java Simon is get here, please, leave us a comment. Just for the fun.

Tags

The list of tags is empty.