Skip to content

Instantly share code, notes, and snippets.

@raffaeleguidi
raffaeleguidi / directmemory test log
Created August 21, 2011 12:38
one million entries in 656 milliseconds
14:34:44.741 [main] INFO oneMillionEntries - payload size=531
14:34:44.757 [main] INFO oneMillionEntries - entries=1000000
14:34:44.757 [main] INFO oneMillionEntries - starting...
14:34:45.413 [main] INFO oneMillionEntries - ...done in 656 msecs.
14:34:45.429 [main] INFO dump - off-heap allocated: 512,0Mb
14:34:45.429 [main] INFO dump - off-heap used: 506,4Mb
14:34:45.429 [main] INFO dump - heap - max: 490,7Mb
14:34:45.429 [main] INFO dump - heap - allocated: 490,7Mb
14:34:45.429 [main] INFO dump - heap - free : 413,9Mb
14:34:45.429 [main] INFO dump - ************************************************
@raffaeleguidi
raffaeleguidi / logs
Created September 3, 2011 22:56
DirectMemory show-off
00:48:25.542 [main] INFO init - *** initializing *******************************
____ _ __ __ ___
/ __ \(_)________ _____/ /_/ |/ /___ ____ ___ ____ _______ __
/ / / / // ___/ _ \/ ___/ __/ /|_/ // _ \/ __ `__ \/ __ \/ ___/ / / /
/ /_/ / // / / __/ /__/ /_/ / / // __/ / / / / / /_/ / / / /_/ /
/_____/_//_/ \___/\___/\__/_/ /_/ \___/_/ /_/ /_/\____/_/ \__, /
/____/
00:48:25.550 [main] INFO init - ************************************************
00:48:25.561 [main] INFO createNew - Creating OffHeapMemoryBuffer 0 with a capacity of 128,0Mb
00:48:25.683 [main] INFO init - MemoryManager initialized - 1 buffers, 128,0Mb each
@raffaeleguidi
raffaeleguidi / Application.java
Created October 1, 2011 16:35
A simple file upload and renderBinary example using Play! 1.2.3 and GAE (google appengine) 1.5.6
package controllers;
import play.*;
import play.data.Upload;
import play.db.Model.BinaryField;
import play.libs.MimeTypes;
import play.mvc.*;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;