~soapdog/flumefind-racket

A version of flumefind built with racket
version that works inside DrRacket. Support for switching between RegEx and JSON decoding
add verbose mode

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~soapdog/flumefind-racket
read/write
git@git.sr.ht:~soapdog/flumefind-racket

You can also use your local clone with git send-email.

#flumefind.rkt

This is just a toy to search flumedb backwards looking for a message and output its offset. I decided to build this after seeing Cel implementation in C in %5Pmvr9fijzjX/ouPf3pq+RfkvH5KX7RqYqN8RMltCDc=.sha256.

I've used his C implementation as a reference and included it on this repo so that I don't lose it.

The Racket version is much slower for obvious reasons since it is interpreted and not compiled like the C version but also because the Racket version parses the json of every message which the C version doesn't.

Cel's C version:

soapdog@FafiGo$ time ./flumefind ./log.offset %5Pmvr9fijzjX/ouPf3pq+RfkvH5KX7RqYqN8RMltCDc=.sha256
676860406

real    0m0.256s
user    0m0.047s
sys     0m0.141s

SoapDog's Racket version:

soapdog@FafiGo$ time racket ./flumefind.rkt --id %5Pmvr9fijzjX/ouPf3pq+RfkvH5KX7RqYqN8RMltCDc=.sha256 ./log.offset
676860406

real    0m15.977s
user    0m11.422s
sys     0m4.547s

Implementing this has been a great experience. It is the first time I work with files or bytes in Racket. I am confident now that I can write a parser that moves all the content from flume into SQLite in Racket now.

Thanks for everyone that supported me in %LTiHz/i2WHnNv9T2bwdETlxscwDcCtvTQ4gIuzFQud0=.sha256