chore(style): fix space width in editorconfig
tess: test process command code path
refactor: split code blocks into functions

mainly for two reasons:
 * easier to profile and find out hot code path
 * easier to change some of the implementation later, for example, a faster
   list sum implementation for gauge metrics.
update gitignore
add tox.ini
chore: fix pep errors
Merge pull request #5 from houqp/master

minor adjustments