mongodb-labs / edda

A log visualizer for MongoDB - This Repository is NOT a supported MongoDB product
232 stars 28 forks source link

Track who is syncing from whom #7

Closed kchodorow closed 12 years ago

kchodorow commented 12 years ago

Look for "replset syncing to" messages

kaushal commented 12 years ago

I think it is complete. I do all the checks in criteria.

kchodorow commented 12 years ago

You didn't make the changes I requested here: https://github.com/kchodorow/logl/commit/0b94152b2ee0bbaa8b3bf82fe064fea3ba2bf234#commitcomment-1449563. criteria() is still just checking for [rsSync]: https://github.com/kchodorow/logl/blob/master/logl/modules/rsSync.py#L15

kaushal commented 12 years ago

My change wasn't committed properly. It is fixed and will be pushed shortly.

On Wed, Jun 13, 2012 at 10:46 AM, Kristina < reply@reply.github.com

wrote:

You didn't make the changes I requested here: https://github.com/kchodorow/logl/commit/0b94152b2ee0bbaa8b3bf82fe064fea3ba2bf234#commitcomment-1449563. criteria() is still just checking for [rsSync]: https://github.com/kchodorow/logl/blob/master/logl/modules/rsSync.py#L15


Reply to this email directly or view it on GitHub: https://github.com/kchodorow/logl/issues/7#issuecomment-6303040

kaushal commented 12 years ago

It should be up now.

On Wed, Jun 13, 2012 at 10:53 AM, Kaushal Parikh kaushal.parikh@10gen.comwrote:

My change wasn't committed properly. It is fixed and will be pushed shortly.

On Wed, Jun 13, 2012 at 10:46 AM, Kristina < reply@reply.github.com

wrote:

You didn't make the changes I requested here: https://github.com/kchodorow/logl/commit/0b94152b2ee0bbaa8b3bf82fe064fea3ba2bf234#commitcomment-1449563. criteria() is still just checking for [rsSync]: https://github.com/kchodorow/logl/blob/master/logl/modules/rsSync.py#L15


Reply to this email directly or view it on GitHub: https://github.com/kchodorow/logl/issues/7#issuecomment-6303040

kchodorow commented 12 years ago

Cool! However, there's are some strings it won't return the correct results for. Can you make a file test_rsSync.py in the test directory and write some tests for this function, see if you can find the cases it doesn't yet work for?

kchodorow commented 12 years ago

Realized I should go into more detail as you guys probably haven't written many tests before.

In test_rssync.py, make one function per function in rssync.py, so you'd start with something like:

import logl.modules.rsSync

def test_criteria():
    pass

def test_process():
    pass

def test_syncingDiff():
    pass

Now fill in each one with some calls to the function:

def test_criteria():
    assert logl.modules.rsSync.criteria("some sample log string") == 1
    assert logl.modules.rsSync.criteria("another log string") == -1
    # and so on

Run nosetests from the top-level directory (not test/) regularly to make sure everything's working as expected.