97bec3b1ee
Optimization that uses slices on the table rather than checking each row individually, when extracting data.
Jim Paris2012-06-04 23:46:33 +00:00
27f8dcf06d
Extract works now and we're back to 100% test coverage! It's slow, though; need to figure out where the slowdown lies.
Jim Paris2012-05-30 18:24:36 +00:00
cb97ad3d2c
Interval bisection to find the correct database row seems to work in nilmdb now. Needs testing, and nilmdb's stream_extract needs to be finished
Jim Paris2012-05-29 23:49:08 +00:00
8a7b3b5f95
Add DBInterval and associated tests. Clean up other interval tests as well, and fix missing coverage on IntervalSet.str()
Jim Paris2012-05-25 21:45:05 +00:00
11cc124019
Formatters done, not necessarily fast enough though
Jim Paris2012-05-25 19:02:58 +00:00
e2daeb5e54
- Some updates to max_results handling on server side
Jim Paris2012-05-25 16:44:24 +00:00
cbc7c5125d
WIP on getting stream extract to work.
Jim Paris2012-05-24 21:05:38 +00:00
27fd9d54f9
Streaming responses from the server weren't actually streaming. Fix that. This requires a bit of restructuring of server.py:intervals() to allow us to properly report errors before beginning the stream.
Jim Paris2012-05-23 23:18:24 +00:00
e5e7ae9eda
Fix bug that caused responses to always be truncated early
Jim Paris2012-05-23 20:19:06 +00:00
315bc57ac3
More complete test coverage of nilmdb.httpclient, yay
Jim Paris2012-05-23 20:00:01 +00:00
3b0b9175d6
For stream_interval, make the server handle sending multiple requests to the database, not the client. The server now maintains the open HTTP connection and sends a continuous streaming reply to the GET request.
Jim Paris2012-05-23 19:08:59 +00:00
e570800396
Add "iteratorizor", which transforms a function that uses callbacks into a generator. Needed to get pycurl's WRITEFUNCTION to give us a generator instead. It's a bit tricky and uses threads and queues, but seems to work OK.
Jim Paris2012-05-23 01:00:12 +00:00
c327378373
Split MyCurl into a HTTPClient class instead
Jim Paris2012-05-21 21:50:01 +00:00
624980a47b
Started moving to python-requests so we can do a get() with an interator on the response, but it turns out that it's really crappy with regards to socket closing, so I'll revert this in a moment.
Jim Paris2012-05-18 21:49:29 +00:00
3f436e6dfd
Use simplejson instead of json for performance
Jim Paris2012-05-16 22:19:00 +00:00
d647ea7eee
Cleanup handling of truncated intervals, more work on extract
Jim Paris2012-05-11 18:31:11 +00:00
e3be1a1d8a
Add IntervalSet.intersection(). This returns a generator that allows us to look at just some of the intervals without having to reconstruct an entire IntervalSet class -- which greatly reduces server load when handling requests that cover large interval ranges.
Jim Paris2012-05-10 21:54:29 +00:00
f63e58f2d9
Cleanup cmdline by splitting it into multiple files. Essentially the individual subcommands are still treated as being part of the same class (and use "self" to refer to the Cmdline class), but they're different modules now.
Jim Paris2012-05-10 20:35:51 +00:00
a05a026bc7
Make stream_intervals use a generator, so the client library handles re-issuing the request when the output data gets truncated. Works well.
Jim Paris2012-05-10 18:14:57 +00:00
1d875b1f1f
Start extract command in cmdline.py
Jim Paris2012-05-08 21:27:56 +00:00
f4f2493b59
Some small speed improvements. Intervals are really a pain; need to rework how this all works together, but will probably move on to extraction now.
Jim Paris2012-05-08 17:40:11 +00:00
47245df9bd
nilmdb now caches the intervals the first time a particular stream's intervals are accessed, so it doesn't need to keep rebuilding them as long as it's running.
Jim Paris2012-04-24 21:59:33 +00:00
c07670ac3e
Make the whole nilmdb.layout parser Cython, and rewrite the parsing bits so it's hopefully quite a bit faster now.
Jim Paris2012-04-24 21:00:26 +00:00
ac32647fac
Remove PyTables indexing support; it's not necessary since we're just using pytables as a row-indexed data store.
Jim Paris2012-04-13 20:51:18 +00:00
b84ffddd50
New bxinterval implementation is at least linear -- not much better in the TestIntervalSpeed versus the previous bisect version, but should be better in general.
Jim Paris2012-04-12 22:39:16 +00:00
1531114677
fix typos in test_interval; test big numbers and floats
Jim Paris2012-04-12 21:05:54 +00:00
ab4c1f0925
Update bxintersect to use doubles, not ints. Cython is easy!
Jim Paris2012-04-12 20:26:33 +00:00
f7149e48e8
Add intersection.pyx from bx-python
Jim Paris2012-04-12 20:16:46 +00:00
055cfa12b2
Various work on improving intervals...
Jim Paris2012-04-11 22:05:27 +00:00
5cb03cd6ef
Update design.md. Add commit after each insert
Jim Paris2012-04-10 20:52:59 +00:00
f3b0dfabea
More work on commandline and commandline tests.
Jim Paris2012-04-06 18:25:09 +00:00
cccaec326a
Need to figure out a better way to handle this
Jim Paris2012-04-04 22:57:12 +00:00
a3f444eb25
A lot more command line testing. There'es some issue with tons of requests getting slowly blocked, though...
Jim Paris2012-04-04 22:34:01 +00:00
277b0c1d00
More command line tests. Make nilmdb.cmdline a proper class Fix various stuff Add /dbpath command to get DB path
Jim Paris2012-04-04 18:54:24 +00:00
7bba4a80d9
Work on command line client, and some improvements to server handling of bad URLs
Jim Paris2012-04-03 22:21:42 +00:00
e63ab23d20
stream_insert puts data into the database now. Fill out tests to cover overlapping data, missing data, etc.
Jim Paris2012-03-31 04:15:29 +00:00
776279a4e6
Go back to generic parsing for most stuff now. Need to rework what's most efficient here.
Jim Paris2012-03-30 22:15:04 +00:00
7a9012c3e9
work on improving layout parsing
Jim Paris2012-03-30 21:29:22 +00:00
cc4e3bdb76
Rename some nilmdb methods to be private
Jim Paris2012-03-29 21:43:05 +00:00
3dfd187710
Use instantiated classes for layouts.
Jim Paris2012-03-29 16:46:34 +00:00
cf66eca42c
Spent time trying to get Intervals and IntervalSets to handle a gap tolerance in equality comparisions, but it's a real pain to get all the edge cases right, and it's not clear we actually need that functionality at the moment. Skip it for now.
Jim Paris2012-03-28 19:25:02 +00:00
18720db594
Remove outdated chunk tests. Again, serves as a good example if we need chunked streaming uploads in the future, but probably not necessary right now.
Jim Paris2012-03-26 21:36:27 +00:00
19c70bf887
Remove the cherrypy ChunkedRFile fixup, and the disable_prb tool that disables process_request_body. They'll be necessary if we want to support streaming chunked uploads, but at this point it doesn't seem like that's going to be necessary.
Jim Paris2012-03-26 21:35:33 +00:00
a672119dd0
Minor cleanups for test passage
Jim Paris2012-03-26 21:31:37 +00:00
f721e41f2b
Minor cleanups for test passage
Jim Paris2012-03-26 21:31:35 +00:00
853639f390
better error code for curl-generated problems
Jim Paris2012-03-26 21:29:04 +00:00
ba11e4467f
Parsing happens before serialization on server... now need to put in database
Jim Paris2012-03-26 21:23:58 +00:00
dd5658f987
Better handling on server side -- insert now reads the body.
Jim Paris2012-03-26 16:47:11 +00:00
54847b0710
Upload the data in the POST. Client side should be mostly good, for now
Jim Paris2012-03-25 19:12:49 +00:00
b72e276eb8
More timestamper tests. Add "end" parameter to TimestamperRate, to force the file to end before a specific time. Will be good for loading in old files and knowing that things don't overlap.
Jim Paris2012-03-24 21:15:24 +00:00
0808ed5bd8
Add datetime_tz module from python-datetime-tz repository. This could go away if it gets packaged in Debian etc.
Jim Paris2012-03-24 17:32:11 +00:00
ec25eac697
Misc cleanups, fix some pylint issues
Jim Paris2012-03-23 15:50:33 +00:00