Commit Graph

22 Commits

Author SHA1 Message Date
ljhuang 609f4af8c8 Replace deprecated readfp method with read_file
The readfp method has been deprecated since version 3.2 [1].

[1] https://docs.python.org/3/library/configparser.html?highlight=deprecated#configparser.ConfigParser.readfp

Change-Id: I2c4c327297b74631d961850e735d5ddc69459e47
2022-07-22 17:20:19 +08:00
Martin Kopec 365ccb0471 Fix py39 compatibility
In python 3.9 base64.encodestring() and base64.decodestring(),
aliases deprecated since Python 3.1, are removed.
base64.encodebytes() and base64.decodebytes() should be used
instead:
https://docs.python.org/3/whatsnew/3.9.html

Change-Id: I7ac7133ff4e9f118dac3dbc179dfc89c932705bb
2021-06-02 14:11:45 +00:00
Zuul b09b100a6a Merge "Use unittest.mock instead of mock" 2020-09-29 21:25:26 +00:00
Hervé Beraud e3ab04a4f3 Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: I6bdf38b8b7e63ff8183f0aaccb566d2baa37df56
2020-06-11 10:08:00 +02:00
Andreas Jaeger 3c4adf44e1 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove now unused files babel.cfg and openstack-common.conf.
- Remove use of six library.
- Update to hacking 3.1.0
- Update pbr requirement

Change-Id: Ib4b9460f24cfaa216f0302b3b90ef73d808eb3e4
2020-06-09 11:54:39 +02:00
Andreas Jaeger 3d06be24dc Fix docs building
In preparation for python 3 support switch to newer sphinx version.
This requires openstackdocstheme.

Remove install_command, this is the default.
Update hacking version to be compatible with python 3, fix warnings
from new pep8.

Change-Id: Iab69ec59eb111571f784242c5ea5756c2a63e424
2020-02-03 22:13:58 +01:00
Manik Bindlish cbafae38c7 dict_object.keys() is not required for *in* operator
cleanup of .keys() from dict_object.keys() *in* operator

Change-Id: I48244786f5dc4cfc8e518322edb6d31dbf2336f6
2018-12-20 10:56:19 +00:00
DeepaJon 260408ce16 Removes unnecessary utf-8 encoding
This patches removes unnecessary utf-8 encoding in the
doc/source/conf.py
os_performance_tools/__init__.py
os_performance_tools/tests/base.py
os_performance_tools/tests/test_collect.py
os_performance_tools/tests/test_collectors_delta.py
os_performance_tools/tests/test_counters2statsd.py
os_performance_tools/tests/test_mysql.py
os_performance_tools/tests/test_queues.py

Change-Id: Ifa32ae370cd29c270413989903d0eda3b2b8238a
2017-01-11 18:04:01 +05:30
Andreas Jaeger 23e932886e Fix pep8 failure
Fix "./os_performance_tools/collectors/mysql.py:54:80: E501 line too long
(87 > 79 characters)"

This is done with reworking the comment to inline the URL.

Change-Id: Ic3b965cdc8d43fdf8621036a0819d2f7df13fb9c
2016-01-11 13:07:49 +01:00
Clint Byrum 9fa4ce73a2 Add documentation to each collector. 2015-11-24 00:07:32 -08:00
Clint Byrum 62627da9c9 Add byte counters for Innodb writes/reads
These counters were added in MySQL 5.6. I think.
2015-11-20 14:10:52 -08:00
Clint Byrum 1916c7fce7 Add --prefix to os-collect-counters
Sets it in __meta__ for use when feeding counters into statsd.
2015-11-12 14:34:35 -08:00
Clint Byrum 7dc93aa35f Process prefixes set in __meta__ counters 2015-11-12 14:24:47 -08:00
Clint Byrum 18a5dbc198 Add test for timing in meta
Also found a bug in the timing code that was exposed by random hash
seeding.
2015-11-12 11:24:12 -08:00
Clint Byrum 4ea517f53f Oops broken py34 again 2015-11-11 16:18:16 -08:00
Clint Byrum b6e9bc8cce Add timing and use pipelines
With so many values coming in a pipeline makes more sense.
2015-11-11 16:16:01 -08:00
Clint Byrum 1e97b12e5c Add __meta__ to output 2015-11-11 15:28:31 -08:00
Clint Byrum 3154a0f8a3 More py34 fixes 2015-11-11 15:28:20 -08:00
Clint Byrum 935f575672 Py34 fixes 2015-11-11 15:17:34 -08:00
Clint Byrum 359e6b8b5f Add --output arg
This will allow us to print out the subuni stream on stdout, but write
the json itself on a seperate file. This way you can save the delta
result before processing it.
2015-11-11 14:57:47 -08:00
Clint Byrum 1d0cf8a515 Provide for meta information in counters
This allows us to provide some timing data along with the counters.
2015-11-11 14:37:47 -08:00
Clint Byrum 4099c44e21 Rename to os-performance-tools
The name was too generic, and would have become a problem for import
into OpenStack's QA program. So focus it on performance tools.
2015-11-09 15:16:51 -08:00