2010-10-23

A while ago I wrote a python library for parse and statistical analysis of network usage logs generated by net-acct.

A python was used for that implementation.

Later I began to learn Scala in order to make it closer to functional programming world. It seemed that writing simple log parser was an adequate task to take a feeling of language without experiencing extra difficulties.

A nice timing bonus makes me develop scala version futher and drop the python one.

python
real 2m32.052s
user 2m24.957s
sys 0m3.840s

scala
real 0m21.942s
user 0m15.653s
sys 0m0.456s

Tests were done on 6 Mb of gzipped logs with 1833.650 Mhz Athlon (3667.30 bogomips).

P.S. Improvements of configuration subsystem are now making Scala version useful for non-programmers. Documentation is still lacking, but I'm publishing it nevertheless.

Комментариев нет:

Отправить комментарий