Always return the last Cal entry (don't worry about how old it might be) #476

Merged
merged 13 commits into from Mar 14, 2015

Conversation

Projects
None yet
4 participants
Owner

jasoncalabrese commented Mar 12, 2015

Also some refactoring by using async.parallel to make multiple ongo requests at once.

Bonus fix: also check env.DISPLAY_UNITS if the units query string param isn't set

@bewest @ELUTE @jimsiff

@jasoncalabrese jasoncalabrese use async.parallel to make multiple mongo queries at once and get rid…
… of the callback-hell; also use env.DISPLAY_UNITS if units aren't set on request
d08f5f7

Coverage Status

Coverage decreased (-1.18%) to 71.34% when pulling d08f5f7 on wip/last-cal into 1e27704 on dev.

@jasoncalabrese jasoncalabrese fixed mocks used in pebble test and them bugs found by tests
2dc7536

Coverage Status

Coverage increased (+0.25%) to 72.77% when pulling 2dc7536 on wip/last-cal into 1e27704 on dev.

ELUTE and others added some commits Mar 12, 2015

@ELUTE ELUTE Update pebble.js
6357212
@jasoncalabrese jasoncalabrese uncomment testing hack that shouldn't have been committed 051f49b
@jasoncalabrese jasoncalabrese Merge branch 'wip/last-cal' of github.com:nightscout/cgm-remote-monit…
…or into wip/last-cal
1e9ac9c
@jasoncalabrese jasoncalabrese removed .toFixed(0)'s and fixed tests
7b6f054

Coverage Status

Coverage increased (+0.37%) to 72.89% when pulling 6357212 on wip/last-cal into 1e27704 on dev.

Coverage Status

Coverage increased (+0.2%) to 72.73% when pulling 7b6f054 on wip/last-cal into 1e27704 on dev.

Coverage Status

Coverage increased (+0.2%) to 72.73% when pulling 7b6f054 on wip/last-cal into 1e27704 on dev.

jasoncalabrese added some commits Mar 13, 2015

@jasoncalabrese jasoncalabrese Merge branch 'dev' into wip/last-cal
896ae9e
@jasoncalabrese jasoncalabrese a little clean up
3162422

Coverage Status

Coverage increased (+0.21%) to 72.69% when pulling 896ae9e on wip/last-cal into ebcb49c on dev.

Coverage Status

Coverage increased (+0.21%) to 72.69% when pulling 3162422 on wip/last-cal into ebcb49c on dev.

Owner

jasoncalabrese commented Mar 13, 2015

@jimsiff, @ELUTE, I talked to @YYGIRL about some users are burning through data partially due to the extra cal data returned from /pebble. We merged in a fix (6357212) that selectively chooses the fields that are needed. The plan is to have some of those users that are most concerned about data usage to start using dev after this PR is merged. Then they can also help test before we release Enchilada to master.

Contributor

jimsiff commented Mar 13, 2015

JSON payload is reduced about 40% but TCP and HTTP protocol overhead drops the net savings to 20%. Gzip encoding may help some more.

Owner

jasoncalabrese commented Mar 13, 2015

thanks for testing @jimsiff did you also take a look at the main web monitor page, in addition to /pebble?

@jasoncalabrese jasoncalabrese added initial compression of everything so we can start testing and s…
…ee if there are any issues
b7fc6b9

Coverage Status

Coverage increased (+0.21%) to 72.69% when pulling b7fc6b9 on wip/last-cal into ebcb49c on dev.

Owner

jasoncalabrese commented Mar 14, 2015

I just added gzip compression to everything, with that we're down to 255 bytes (455 with http overhead)

@jasoncalabrese jasoncalabrese fixed bug that caused BG color not to change on new data
206a8fd

Coverage Status

Coverage increased (+0.21%) to 72.69% when pulling 206a8fd on wip/last-cal into ebcb49c on dev.

@jasoncalabrese jasoncalabrese make sure the socket.io.js file that is sent to the client gets gzipp…
…ed, etc
bcd3fa0

Coverage Status

Coverage increased (+0.21%) to 72.69% when pulling bcd3fa0 on wip/last-cal into ebcb49c on dev.

@jasoncalabrese jasoncalabrese make bad data easier to find and prevent errors
a1f963a

Coverage Status

Coverage increased (+0.21%) to 72.69% when pulling a1f963a on wip/last-cal into ebcb49c on dev.

@jasoncalabrese jasoncalabrese group bad data warnings
b2782fc

@jasoncalabrese jasoncalabrese added a commit that referenced this pull request Mar 14, 2015

@jasoncalabrese jasoncalabrese Merge pull request #476 from nightscout/wip/last-cal
Always return the last Cal entry (don't worry about how old it might be)
77f0fdc

@jasoncalabrese jasoncalabrese merged commit 77f0fdc into dev Mar 14, 2015

2 checks passed

continuous-integration/codeship Build succeeded
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

jasoncalabrese deleted the wip/last-cal branch Mar 15, 2015

@jasoncalabrese jasoncalabrese modified the milestone: enchilada Mar 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment