arviarya
arviarya

Reputation: 660

Speed4j Vs Perf4j

Speed4j and perf4j, both are Java performance analysis tools are similar in nature.

If I am looking for Speed4j document, I am geting following information:

This is Speed4j, a very simple (but fast) Java performance analysis library. It is designed using Perf4j as a model, but hopefully avoiding the pitfalls inherent in Perf4j's design. Also, Perf4j does not seem to be seeing a lot of development these days.

But not sure what is the meaning of "avoiding the pitfalls inherent in Perf4j's design", What are perf4j pitfalls?

Upvotes: 6

Views: 3078

Answers (1)

Janne Jalkanen
Janne Jalkanen

Reputation: 134

I had three reasons for starting Speed4J:

  1. Avoid String parsing. Perf4j architecture sends measurements through Log4j encoded inside Strings, which are then parsed. The String creation/parsing causes unnecessary GC overhead.
  2. Provide shutdown hooks. Perf4j cannot be cleanly shut down in a web container because it starts threads and provides no way to access them - so there's a memory leak. There was a long-standing bug in Perf4j on that, and I got frustrated because nothing happened.
  3. No development. Bugs were unanswered, no new releases were being made.

I thought about forking Perf4j because of 2 and 3, but in the end point 1 made me start my own project so that I and others could hopefully take it further. Perf4j was a great project though, I loved it :-)

Upvotes: 9

Related Questions