Browse Source

Rearrange documentation, clean up Makefile, README

tags/nilmdb-0.2^2
Jim Paris 8 years ago
parent
commit
1fb37604d3
9 changed files with 24 additions and 94 deletions
  1. +1
    -1
      .gitignore
  2. +0
    -11
      Makefile
  3. +9
    -2
      README.txt
  4. +0
    -4
      TODO
  5. +9
    -0
      docs/Makefile
  6. +5
    -0
      docs/TODO.md
  7. +0
    -0
      docs/design.md
  8. +0
    -54
      time-bxintersect
  9. +0
    -22
      timeit.sh

+ 1
- 1
.gitignore View File

@@ -4,6 +4,7 @@ tests/*testdb/
db/

# Compiled / cythonized files
docs/*.html
build/
*.pyc
nilmdb/server/interval.c
@@ -18,6 +19,5 @@ dist/
nilmdb.egg-info/

# Misc
design.html
timeit*out


+ 0
- 11
Makefile View File

@@ -1,22 +1,11 @@
all: test

tool:
python nilmtool.py --help
python nilmtool.py list --help
python nilmtool.py -u asfdadsf list

lint:
pylint -f parseable nilmdb

%.html: %.md
pandoc -s $< > $@

test:
python runtests.py

profile:
python runtests.py --with-profile

clean::
find . -name '*pyc' | xargs rm -f
rm -f .coverage


+ 9
- 2
README.txt View File

@@ -1,3 +1,10 @@
sudo apt-get install python2.7 python-cherrypy3 python-decorator python-nose python-coverage
sudo apt-get install cython # 0.17.1-1 or newer
nilmdb: Non-Intrusive Load Monitor Database
by Jim Paris <jim@jtan.com>

Prerequisites:

sudo apt-get install python2.7 python-cherrypy3 python-decorator python-nose python-coverage python-setuptools

Install:

python setup.py install

+ 0
- 4
TODO View File

@@ -1,5 +0,0 @@
json-formatted data to OverflowError and DB parsing errors. It
seems like subclassing cherrypy.HTTPError and overriding
set_response is the best thing to do -- it would let me get rid
of the _be_ie_unfriendly and other hacks in the server.

+ 9
- 0
docs/Makefile View File

@@ -0,0 +1,9 @@
ALL_DOCS = $(wildcard *.md)

all: $(ALL_DOCS:.md=.html)

%.html: %.md
pandoc -s $< > $@

clean:
rm -f *.html

+ 5
- 0
docs/TODO.md View File

@@ -0,0 +1,5 @@
- Documentation

- Machine-readable information in OverflowError, parser errors.
Maybe subclass `cherrypy.HTTPError` and override `set_response`
to add another JSON field?

design.md → docs/design.md View File


+ 0
- 54
time-bxintersect View File

@@ -1,54 +0,0 @@
nosetests

32: 386 μs (12.0625 μs each)
64: 672.102 μs (10.5016 μs each)
128: 1510.86 μs (11.8036 μs each)
256: 2782.11 μs (10.8676 μs each)
512: 5591.87 μs (10.9216 μs each)
1024: 12812.1 μs (12.5119 μs each)
2048: 21835.1 μs (10.6617 μs each)
4096: 46059.1 μs (11.2449 μs each)
8192: 114127 μs (13.9315 μs each)
16384: 181217 μs (11.0606 μs each)
32768: 419649 μs (12.8067 μs each)
65536: 804320 μs (12.2729 μs each)
131072: 1.73534e+06 μs (13.2396 μs each)
262144: 3.74451e+06 μs (14.2842 μs each)
524288: 8.8694e+06 μs (16.917 μs each)
1048576: 1.69993e+07 μs (16.2118 μs each)
2097152: 3.29387e+07 μs (15.7064 μs each)
|
+3.29387e+07 *
| ----
| -----
| ----
| -----
| -----
| ----
| -----
| -----
| ----
| -----
| ----
| -----
| ---
| ---
| ---
| -------
---+386---------------------------------------------------------------------+---
+32 +2.09715e+06

name #n tsub ttot tavg
..vl/lees/bucket/nilm/nilmdb/nilmdb/interval.py.__iadd__:184 4194272 10.025323 30.262723 0.000007
..evl/lees/bucket/nilm/nilmdb/nilmdb/interval.py.__init__:27 4194272 24.715377 24.715377 0.000006
../lees/bucket/nilm/nilmdb/nilmdb/interval.py.intersects:239 4194272 6.705053 12.577620 0.000003
..im/devl/lees/bucket/nilm/nilmdb/tests/aplotter.py.plot:404 1 0.000048 0.001412 0.001412
../lees/bucket/nilm/nilmdb/tests/aplotter.py.plot_double:311 1 0.000106 0.001346 0.001346
..vl/lees/bucket/nilm/nilmdb/tests/aplotter.py.plot_data:201 1 0.000098 0.000672 0.000672
..vl/lees/bucket/nilm/nilmdb/tests/aplotter.py.plot_line:241 16 0.000298 0.000496 0.000031
..jim/devl/lees/bucket/nilm/nilmdb/nilmdb/printf.py.printf:4 17 0.000252 0.000334 0.000020
..vl/lees/bucket/nilm/nilmdb/tests/aplotter.py.transposed:39 1 0.000229 0.000235 0.000235
..vl/lees/bucket/nilm/nilmdb/tests/aplotter.py.y_reversed:45 1 0.000151 0.000174 0.000174

name tid fname ttot scnt
_MainThread 47269783682784 ..b/python2.7/threading.py.setprofile:88 64.746000 1

+ 0
- 22
timeit.sh View File

@@ -1,22 +0,0 @@
./nilmtool.py destroy /bpnilm/2/raw
./nilmtool.py create /bpnilm/2/raw RawData

if false; then
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s 20110513-110000 -r 8000 /bpnilm/2/raw
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s 20110513-120001 -r 8000 /bpnilm/2/raw
else
# 170 hours, about 98 gigs uncompressed:
for i in $(seq 2000 2016); do
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s ${i}0101-010001 -r 8000 /bpnilm/2/raw
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s ${i}0101-020002 -r 8000 /bpnilm/2/raw
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s ${i}0101-030003 -r 8000 /bpnilm/2/raw
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s ${i}0101-040004 -r 8000 /bpnilm/2/raw
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s ${i}0101-050005 -r 8000 /bpnilm/2/raw
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s ${i}0101-060006 -r 8000 /bpnilm/2/raw
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s ${i}0101-070007 -r 8000 /bpnilm/2/raw
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s ${i}0101-080008 -r 8000 /bpnilm/2/raw
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s ${i}0101-090009 -r 8000 /bpnilm/2/raw
time zcat /home/jim/bpnilm-data/snapshot-1-20110513-110002.raw.gz | ./nilmtool.py insert -s ${i}0101-100010 -r 8000 /bpnilm/2/raw
done
fi


Loading…
Cancel
Save