6f1e6fe232
Isolate all PyTables stuff to a single file.
...
This will make migrating to my own data storage engine easier.
2012-12-31 17:22:29 -05:00
b0d76312d1
Add must_close() decorator, use it in nilmdb
...
Warns at runtime if a class's close() method wasn't called before the
object was destroyed.
2012-12-31 17:21:19 -05:00
19c846c71c
Remove outdated files
2012-12-31 15:55:43 -05:00
f355c73209
Refactor utility classes into nilmdb.utils subdir/namespace
...
There's some bug with the testing harness where placing e.g.
from du import du
in nilmdb/utils/__init__.py doesn't quite work -- sometimes the
module "du" replaces the function "du". Not exactly sure why;
we work around that by just renaming files so they don't match
the imported names directly.
2012-12-31 15:55:36 -05:00
173014ba19
Use nilmdb.lrucache for caching interval sets
2012-12-31 14:52:46 -05:00
24d4752bc3
Add LRU cache memoizing decorator for functions
2012-12-31 14:39:16 -05:00
a85b273e2e
Remove compression.
...
Messes up extraction, since we random access for the timestamp binary
search. In the future, maybe switching to multiple tables (one for
timestamp, one for compressed data) would be smart.
2012-12-14 17:19:23 -05:00
7f73b4b304
Use compression in pytables
2012-12-14 17:17:52 -05:00
f3eb6d1b79
Time it!
2012-12-14 16:57:02 -05:00
9082cc9f44
Merging adjacent intervals is working now!
...
Adjust test expectations accordingly, since the number of intervals
they print out will now be smaller.
2012-12-12 19:25:27 -05:00
bf64a40472
Some misc test additions, interval optimizations. Still need adjacency test
2012-12-11 23:31:55 -05:00
32dbeebc09
More insertion checks. Need to get interval concatenation working.
2012-12-11 18:08:00 -05:00
66ddc79b15
Inserting works again, with proper end/start for paired blocks.
...
timeit.sh script works too!
2012-12-07 20:30:39 -05:00
7a8bd0bf41
Don't include layout on client side
2012-12-07 16:24:15 -05:00
ee552de740
Start reworking/fixing insert timestamps
2012-12-06 20:25:24 -05:00
6d1fb61573
Use 'repr' instead of 'str' in Interval string representation.
...
Otherwise timestamps get truncated to 2 decimal places.
2012-12-05 17:47:48 -05:00
f094529e66
TODO update
2012-12-04 22:15:53 -05:00
5fecec2a4c
Support deleting streams with new 'destroy' command
2012-12-04 22:15:00 -05:00
85bb46f45c
Use pytable's createparents flag to avoid having to create group
...
structure manually.
2012-12-04 18:57:36 -05:00
17c329fd6d
Start to be a little more strict about how intervals are half-open.
2012-11-29 15:35:11 -05:00
437e1b425a
More speed tests, some whitespace cleanups
2012-11-29 15:22:47 -05:00
c0f87db3c1
Converted rbtree, interval to Cython. Serious speedups!
2012-11-29 15:13:09 -05:00
a9c5c19e30
Start converting interval.py to Cython.
2012-11-29 12:42:38 -05:00
f39567b2bc
Speed updates
2012-11-29 01:35:01 -05:00
99ec0f4946
Converted rbtree.py to Cython
...
About 3x faster
2012-11-29 01:25:51 -05:00
f5c60f68dc
Speed tests.
...
test_interval_speed is about O(n * log n), which is good -- but the
constants are high and it hits swap on a 4G machine for the 2**21
test. Hopefully cython helps!
2012-11-29 01:00:54 -05:00
bdef0986d6
rbtree and interval tests fully pass now.
...
On to benchmarking...
2012-11-29 00:42:50 -05:00
c396c4dac8
rbtree tests complete
2012-11-29 00:07:49 -05:00
0b443f510b
Filling out rbtree tests, search routines
2012-11-28 20:57:23 -05:00
66fa6f3824
Add rendering test
2012-11-28 18:34:51 -05:00
875fbe969f
Some documentation and other cleanups in rbtree.py
2012-11-28 18:30:21 -05:00
e35e85886e
add .gitignore
2012-11-28 17:21:51 -05:00
7211217f40
Working on getting the RBTree working. Intersections are busted.
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11380 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-15 18:55:56 +00:00
d34b980516
RBTree seems generally OK now
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11379 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-14 20:10:43 +00:00
6aee52d980
Deletion is still broken. F.
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11378 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-14 04:23:53 +00:00
090c8d5315
More progress
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11377 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-14 04:12:15 +00:00
1042ff9f4b
add RBtree C++ example that I based this on; update tests
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11376 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-14 03:55:37 +00:00
bc687969c1
Work in progress switching to my own RBTree. Currently creates loops
...
somewhere, need to figure out what's going on.
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11375 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-14 03:48:04 +00:00
de27bd3f41
Attempt at using a sentinel instead of class instances for the leaf node.. doesnt quite work for deletion
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11361 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-10 02:12:01 +00:00
4dcf713d0e
Attempts at speeding up the RbTree implementation
...
with cython. Still quite a bit slower than the bxinterval
implementation, though.
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11360 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-09 21:06:04 +00:00
f9dea53c24
Randomize order for the insertion test
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11358 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-08 23:50:23 +00:00
6cedd7c327
fix
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11357 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-08 23:44:21 +00:00
6278d32f7d
Passes tests, but is slow
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11356 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-08 23:08:01 +00:00
991039903c
Partial implementation of Interval and IntervalSet with a red-black
...
tree.
This is currently hitting an issue where it's considering the
intersection of [0,1] and [1,2] to be [1,1]. It matches the
fully-closed definition of intervals, unlike before -- but might
cause issues. Need to consider whether test case is correct.
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11355 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-08 22:56:05 +00:00
ea3e92be3f
Some prep work for merging adjacent insertions.
...
Doesn't actually merge them yet; need to change Interval
implementation to allow deletes.
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@11354 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-11-08 21:27:52 +00:00
56c3306b38
Fix comments
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@10999 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-08-09 19:11:25 +00:00
cb6561c151
Fix some comments and text
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@10998 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-08-09 18:26:45 +00:00
407aedcd20
Can't represent 2112 on 32-bit systems
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@10997 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-08-09 18:04:47 +00:00
bf8ff66c77
Fix timezone issues in cmdline test
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@10996 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-08-09 18:03:18 +00:00
82f753efb1
disable TestLayoutSpeed for now
...
git-svn-id: https://bucket.mit.edu/svn/nilm/nilmdb@10995 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2012-08-09 17:53:01 +00:00