Merge pull request #1 from matsuu/set-writer-at-flush

Add condition to set profiling ratio and set writer at flush
initial commit
add test
Merge pull request #3 from netmarkjp/add_memo

Add memo feature.