Add partial work-in-progress of fswatcher process

Just some simple benchmark operations to get a sense of whether
this thing can work. More to come.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Add #bind method for use with prepared statements

Hopefully this won't be confused with Function.prototype#bind. I am not
too happy with the verbosity of this, but it is somewhat cleaner than
what was there before. I'll keep thinking on it and see if I can come up
with a better way.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Add some more DB operations to complete benchmarks

Here are the results from a sample run of an in-memory database
with 400,000 rows (ie. 400k INSERTs, 100k UPDATEs, a SELECT of 400k
rows, and 100k DELETEs).

  Timings:
    Connect 0.002 seconds
    PRAGMA 0.001 seconds
    CREATE TABLE 0.001 seconds
    CREATE INDEX 0.001 seconds
    INSERT 21.168 seconds
    UPDATE 1 hour, 46 minutes, 58 seconds
    SELECT 0.953 seconds
    DELETE 1 hour, 27 minutes, 8 seconds
  Total: 3 hours, 14 minutes, 29 seconds

It is pretty slow... I'm particularly surprised at how slow UPDATEs are
compared to INSERTs. Likewise, the DELETE performance is surprising.

This might actually be OK as large parts of the tree are unlikely to be
changing at a time.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Add args passing to fswatcher

The "-p/--port" option does nothing right now, but it will later.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Disperse row operations during benchmarking

Just spread it out a bit so we're not always working on the first 25% of
the table. Still, the workload isn't super representative of real world,
but that's probably ok.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Move DB wrapper into a separate file

Keep this somewhat extraneous detail out of the way.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Move options parsing into separate file

Another somewhat distracting detail moved out the way.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Exit on showing help

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Simplify requiring of db and argv modules

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Finally commit of fswatcher files

I've ended up tacking a different route here, but before I kill all the
files I want to leave a snapshot of how things were in the history.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Remove contrib directory

It was an experiment, and I've since found what looks to be a much
better and cheaper way.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Add "watchman" file scanner and accompanying documentation

Signed-off-by: Wincent Colaiuta <win@wincent.com>