background preloader

Java

Facebook Twitter

JavaMicrobenchmarks - caliper - What is a microbenchmark? - Microbenchmarking framework for Java. A microbenchmark attempts to measure the performance of a "small" bit of code.

JavaMicrobenchmarks - caliper - What is a microbenchmark? - Microbenchmarking framework for Java

These tests are typically in the sub-millisecond range. The code being tested usually performs no I/O, or else is a test of some single, specific I/O task. Microbenchmarking is very different from profiling! When profiling, you work with an entire application, either in production or in an environment very painstakingly contrived to resemble production. Because of this, you get performance data that is, for lack of a better term, real. What? The goal you probably have in mind when you seek to write a Java microbenchmark is, "what are the intrinsic performance properties of this snippet of Java code? " In the olden days, studying the performance of code was like the study of physics or chemistry: you could perform controlled experiments and get predictable results. Examples of microbenchmark fallibility: Why would I ever write a microbenchmark then?

Most of the time, you shouldn't! Ok, but... How should I do it? Hikage/jenv. Subethasmtp - SubEtha SMTP is an easy-to-use server-side SMTP library for Java. SubEtha SMTP is a Java library which allows your application to receive SMTP mail with a simple, easy-to-understand API.

subethasmtp - SubEtha SMTP is an easy-to-use server-side SMTP library for Java

This component can be used in almost any kind of email processing application. Hypothetical (and not-so hypothetical) uses include: A mailing list manager (see SubEthaMail) A mail server that delivers mail to user inboxes A mail archiver like The Mail Archive An email test harness (see Wiser) An email2fax system SMTPseudo A filtering forwarding server Baton SMTP proxy for one or more backends (rules based on sender/envelope) Mireka - Mail server and SMTP proxy with detailed logging, statistics and built-in, fail-fast filters SubEthaSMTP's simple, low-level API is suitable for writing almost any kind of mail-receiving application.

Read more in UsingSubEthaSMTP or join our MailingList. A Little History SubEthaSMTP was split out of the SubEthaMail mailing list manager because it is a useful standalone component. We hate reinventing wheels. Project Authors Support. Gson - A Java library to convert JSON to Java objects and vice-versa. Gson is a Java library that can be used to convert Java Objects into their JSON representation.

gson - A Java library to convert JSON to Java objects and vice-versa

It can also be used to convert a JSON string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of. There are a few open-source projects that can convert Java objects to JSON. However, most of them require that you place Java annotations in your classes; something that you can not do if you do not have access to the source-code. Most also do not fully support the use of Java Generics. Gson Goals Provide simple toJson() and fromJson() methods to convert Java objects to JSON and vice-versa Allow pre-existing unmodifiable objects to be converted to and from JSON Extensive support of Java Generics Allow custom representations for objects Support arbitrarily complex objects (with deep inheritance hierarchies and extensive use of generic types)

Gag - Google Annotations Gallery. The Google Annotations Gallery is an exciting new Java open source library that provides a rich set of annotations for developers to express themselves.

gag - Google Annotations Gallery

Do you find the standard Java annotations dry and lackluster? Have you ever resorted to leaving messages to fellow developers with the @Deprecated annotation? Wouldn't you rather leave a @LOL or @Facepalm instead? If so, then this is the gallery for you. Not only can you leave expressive remarks in your code, you can use these annotations to draw attention to your poetic endeavors. But wait, there's more. If we've whet your appetite for truly expressive annotations, then read on and immerse yourself in the Google Annotations Gallery. A new distribution has been uploaded (gag-1.0.1.zip) to add many great user-suggested annotatons. New for 1.0.1 Disclaimer @AhaMoment @BossMadeMeDoIt @HandsOff @IAmAwesome @LegacySucks Enforceable @CantTouchThis @ImaLetYouFinishBut Literary Verse (new subcategory) Remarks @Fail @OhNoYouDidnt @RTFM @Win @WrittenWhile.