Description of problem: I would like to have some counter of connections to nitrate. how many attempts of connections/queries did some script ... Steps to Reproduce: 1. DEBUG=1 python scripts-using-python-nitrate.py Actual results: none Expected results: <number> connections to xmlrpc.<fqdn_of_nitrate> Additional info: to have lower db usage of nitrate
This feature is already implemented: $ nitrate >>> print Nitrate() Nitrate server: https://tcms.engineering.redhat.com/xmlrpc/ Total requests handled: 0 >>> case = TestCase(1234) >>> print case TC#1234 - Thunderbird: Writing new mail >>> print Nitrate() Nitrate server: https://tcms.engineering.redhat.com/xmlrpc/ Total requests handled: 1 >>> print case TC#1234 - Thunderbird: Writing new mail >>> print Nitrate() Nitrate server: https://tcms.engineering.redhat.com/xmlrpc/ Total requests handled: 1 >>> case = TestCase(2345) >>> print case TC#2345 - Thunderbird: Reading mail >>> print Nitrate() Nitrate server: https://tcms.engineering.redhat.com/xmlrpc/ Total requests handled: 2 You can access the attribute from any Nitrate object, for example: Nitrate._requests case._requests However, I see this is not documented anywhere. I will keep the bug open to fix this. Do you think a public (without underscore) attribute "requests" would be a good solution here?
I see, I tried and it works. I thing it can be unchanged (_requests). As its for debugging only
Documented how to get a short Nitrate summary: https://github.com/psss/python-nitrate/commit/e8093c6
python-nitrate-0.9-0.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/python-nitrate-0.9-0.el6
python-nitrate-0.9-0.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/python-nitrate-0.9-0.fc18
python-nitrate-0.9-0.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/python-nitrate-0.9-0.fc16
python-nitrate-0.9-0.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/python-nitrate-0.9-0.fc17
python-nitrate-0.9-0.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-13721/python-nitrate-0.9-0.el6
python-nitrate-0.9-0.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
python-nitrate-0.9-0.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
python-nitrate-0.9-0.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
python-nitrate-0.9-0.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.