https://github.com/damies13/robotframework-perfmon
Robot Framework wrapper for pyperfmon
https://github.com/damies13/robotframework-perfmon
Last synced: about 1 month ago
JSON representation
Robot Framework wrapper for pyperfmon
- Host: GitHub
- URL: https://github.com/damies13/robotframework-perfmon
- Owner: damies13
- License: gpl-3.0
- Created: 2022-04-16T22:42:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-24T14:27:58.000Z (about 2 years ago)
- Last Synced: 2025-02-28T10:52:36.962Z (about 2 months ago)
- Language: Python
- Size: 30.3 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-robotframework - PerfmonLibrary
README
# robotframework-perfmon
[](https://pypi.python.org/pypi/robotframework-perfmon/) [](https://pypistats.org/packages/robotframework-perfmon)
Robot Framework wrapper for pyperfmon, provides a simple way to collect windows performance monitor (perfmon) counter statistics from a windows machine, usually the AUT servers.
- [Installation](#installation)
- [Example Usage](#example-usage)
- [Keyword Documentation](#keyword-documentation)## Installation
```
pip install robotframework-perfmon
```## Example Usage
Simple example usage:
```robotframework
*** Settings ***
Library PerfmonLibrary*** Variables ***
${AUTServer} MyAUTServer*** Test Cases ***
Check Memory
${mempct}= Get Counter Memory\\% Committed Bytes In Use ${AUTServer}
Should Be True ${mempct[1]} < 80Check CPU
${cputotpct}= Get Counter Processor\\_Total\\% Processor Time ${AUTServer}
Should Be True ${cputotpct[1]} < 80```
## Keyword Documentation
|Keyword|Description|
|---|---|
| Connect To | Establishes a connection to a remote windows machine.
The most likely reasons for using this keyword are:
- You need to use different credentials to connect to the remote windows machine
- You want to avoid the connection time overhead on reading the first performance counter
All arguments are optional with the default values used if omitted
- `hostname` the windows machine to connect to. Default: localhost
- `username` the windows user to connect with, when specifying a domain you will need to escape the \\ as \\\\. Default: current logged in user.
- `password` the password for the specified windows user. If username no specified password is not used. Default: None
example usage:
``` Connect To hostname domnain\\username password ```
``` Connect To hostname ```
It is suggested to use this keyword in [Suite setup](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#toc-entry-260) |
| Get Counter | Get the performance monitor counter's value, the value is returned as a tuple of `('counterpath', value)`
`counterpath` argument is required, `hostname` argument is optional with the default value used if omitted
- `counterpath` the path to the windows performance counter, can be in either format
`\\` or
`\\\\`
- `hostname` the windows machine to connect to. Default: localhost |
| Get Objects | Get a list of available performance monitor counter objects
All arguments are optional with the default values used if omitted
- `hostname` the windows machine to connect to. Default: localhost |
| Get Counters | Get a list of available performance monitor counters for specified object
`object` argument is required, `hostname` argument is optional with the default value used if omitted
- `object` the object to get a list of windows performance counters for.
- `hostname` the windows machine to connect to. Default: localhost |