summaryrefslogtreecommitdiffstats
path: root/rteval
Commit message (Collapse)AuthorAgeFilesLines
* Add some input data validation when parsing the output histogram from cyclictestwork/v2.0David Sommerseth2014-01-221-0/+8
| | | | | | | Backport of commit e0ca74e9c9f7f83a9db08d062b5ca8bdf05ff748 from v1.3x Signed-off-by: Clark Williams <clark.williams@gmail.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Fix --onlyload and reportdir being set to NoneDavid Sommerseth2013-11-081-1/+1
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Added new measurement module, sysstatDavid Sommerseth2013-06-174-3/+176
| | | | | | | | | | | | This module runs in parallel with cyclictest and will every minute use sysstat/sadc to collect all available system statistics. These statistics is both added as a single file to the tarball and embedded into the summary.xml. Also changed the polling time which checks if measurement and load modules are alive from every second to every minute. Signed-off-by: David Sommerseth <davids@redhat.com>
* cyclictest: Added trace-cmd extract when breaktrace aborts exectionDavid Sommerseth2013-05-021-0/+10
| | | | | | | | This adds a dependency of the trace-cmd package as well, but it will improve the ability to better understand what happened when this the threshold broke. Signed-off-by: David Sommerseth <davids@redhat.com>
* cyclictest: Don't bother reporting 'variance'David Sommerseth2013-04-152-15/+2
| | | | | | | | | | | | | | | | | | | | | The data used to do the mathematical reporting is based on histogram data, where the calculated variance will be rather pointless to gather. Imagine you have 3 samples in the historgram in the 2000µs slot, even if you have quite a lot of data with the average measurements around 50µs, the calculated "variance" for that time slot will be (1950^2)*3. Even though the final variance calculation will divide on number of samples gathered, it will take an enormous amount of samples within a the lower time slots to make this value interesting. So rather, don't report or save the calculated variance. However, the standard deviation is based on the variance, that value is far more sane due to the needed square root function on the final variance value. So it gives a far more sane and interesting value. The applied math in the cyclictest module should be fine itself, it's just the variance value that isn't much interesting on this kind of data source. Signed-off-by: David Sommerseth <davids@redhat.com>
* Don't report any buckets where no samples have been collectedDavid Sommerseth2013-03-151-0/+3
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Added timestamps tracking when each module starts and stopsDavid Sommerseth2013-03-142-0/+33
| | | | | | | | Currently ignoring load modules in general, as the <loads/> tags isn't easily extended. Not convinced it makes any sense to track these time stamps on load modules anyway. Signed-off-by: David Sommerseth <davids@redhat.com>
* Migrated from libxslt to lxmlDavid Sommerseth2013-03-132-22/+60
| | | | | | | To avoid depending on libxslt-python, use the more standard Python lxml module for XSLT processing. Signed-off-by: David Sommerseth <davids@redhat.com>
* hackbench: Adjusted the clean-up after running the load runs have completedDavid Sommerseth2013-01-311-3/+6
| | | | | | Ensure that hackbench really is stopped before continuing further. Signed-off-by: David Sommerseth <davids@redhat.com>
* hackbench: Wait for hackbench to completeDavid Sommerseth2013-01-311-0/+2
| | | | | | | | | | | As the rtevalModulePrototype::run() method will call Hackbench::_WorkloadTask() every second without ensuring hackbench is running first - wait for hackbench to complete before returning from _WorkloadTask(). This approach was chosen here as Hackbench is normally a shortliving process anyway. Signed-off-by: David Sommerseth <davids@redhat.com>
* cyclictest: Clean-up more object internal variablesDavid Sommerseth2013-01-291-68/+68
| | | | | | | Also resolvs some potential naming conflicts with the 'id' and 'type' variables. Signed-off-by: David Sommerseth <davids@redhat.com>
* Preparing rteval 2.1David Sommerseth2013-01-181-1/+1
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Copyright updatesDavid Sommerseth2013-01-1824-123/+117
| | | | | | | | | - Updated the GPLv2 license text to match the latest GPLv2 from FSF - Updated all FSF addresses in all copyright notices in source files - Updated copyright years for all contributors to include 2013 - Removed all #!/usr/bin/python lines in files which does not need it Signed-off-by: David Sommerseth <davids@redhat.com>
* cyclictest: Only log and show statistic data when samples are collectedDavid Sommerseth2013-01-182-63/+66
| | | | | | | | Avoids saving misinformation in the report, by just reporting the latency statistics when samples have been collected. In addition also avoid displaying these empty fields in the summary report. Signed-off-by: David Sommerseth <davids@redhat.com>
* cyclictest: Make the unit test work againDavid Sommerseth2013-01-181-3/+30
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* cyclictest: Report if breaktrace was triggeredDavid Sommerseth2013-01-182-4/+47
| | | | | | | Adds a note in the summary report if breaktrace was triggered with some info related to that. Signed-off-by: David Sommerseth <davids@redhat.com>
* cyclictest: Use a tempfile buffer for cyclictest's stdout dataDavid Sommerseth2013-01-181-5/+13
| | | | | | | | | | | | | | Using subprocess.PIPE doesn't allow cyclictest to completely exit before the pipe is emptied. When using cyclictest with --breaktrace, rteval will then not see that cyclictest isn't measuring and will wait until the complete measurement duration has completed instead of doing an earlier exit. By using tempfile.SpooledTemporaryFile(), subprocess have a valid file descriptor it can write the stdout data too. This makes also cyclictest exit instantly when it needs to. Signed-off-by: David Sommerseth <davids@redhat.com>
* cyclictest: Removed --cyclictest-distance optionDavid Sommerseth2013-01-171-5/+0
| | | | | | | As rteval depends on cyclictest running in histogram mode, the distance argument doesn't make sense as cyclictest enforces it to 0. Signed-off-by: David Sommerseth <davids@redhat.com>
* cyclictest: Added --cyclictest-breaktrace featureDavid Sommerseth2013-01-171-3/+40
| | | | | | | | This enables the --breaktrace feature in the cyclictest tool, but rteval will also collect the trace data and put it in the resulting tarball. Signed-off-by: David Sommerseth <davids@redhat.com>
* Made some log lines clearerDavid Sommerseth2013-01-171-3/+3
| | | | | | | Modules doesn't start running instantly, but they start preparing to be kicked off. Signed-off-by: David Sommerseth <davids@redhat.com>
* Preparing rteval-2.0.1David Sommerseth2013-01-171-1/+1
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Add a 30 seconds sleep before unleashing the measurement threadsDavid Sommerseth2013-01-171-0/+2
| | | | | | | | | | | This is to help the system to settle down before kicking off the realtime measurement workload. Otherwise some abnormal latency spikes might be logged, which would be false alarms. Considering that the a measurement run should run for several hours, this time-shifting for 30 seconds shouldn't really change the overall results. Signed-off-by: David Sommerseth <davids@redhat.com>
* Fixed a few log messages in load modulesDavid Sommerseth2013-01-152-3/+3
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Reworked the run logic for modules - allow them to flag they won't runDavid Sommerseth2013-01-153-33/+50
| | | | | | | | | | If a module sets the self._donotrun flag to True, the module logic will take care of not running this module at all. This also sorts out some issues when hackbench is not run, where some of the log file descriptors are not found when cleaning up in the end. Signed-off-by: David Sommerseth <davids@redhat.com>
* hwlatdetect: Add some more useful debug infoDavid Sommerseth2013-01-141-0/+6
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Fix up type casting in the core module codeDavid Sommerseth2013-01-141-4/+4
| | | | | | | If rteval is used as a library, it would easily throw an exception due to the wrong data type. This patch makes it a bit more flexible. Signed-off-by: David Sommerseth <davids@redhat.com>
* Put the rteval version into a separate importable fileDavid Sommerseth2013-01-102-2/+27
| | | | | | | | | | | | This is to avoid having massive build requirements just to retrieve the rteval version. The version string is also still available via the rteval module as well, to avoid other external implementations to fail with this change. But that variable is basically just a "re-export" of the value found in rteval/version.py Signed-off-by: David Sommerseth <davids@redhat.com>
* Changes the default_config to allow running rteval from git/extracted ↵Raphaël Beamonte2013-01-103-13/+35
| | | | | | | | | | | | | directory without options This commit introduce a new method default_config_search to search, for each file needed in the configuration, the better default place. This place can be the rteval file directory, the rteval file directory appended with the 'rteval' directory, the ~/.rteval directory of the user, the /etc/rteval directory, or the /usr/share/rteval directory. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* cyclictest: Ensure that the self.__interval is always setDavid Sommerseth2013-01-081-2/+1
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Make rtevaReport::_XMLreport() publicly availableDavid Sommerseth2013-01-042-3/+2
| | | | | | This also renames the _XMLreport() method to GetXMLreport() Signed-off-by: David Sommerseth <davids@redhat.com>
* Move the configuration defaults from rteval-cmd and into the rtevalConfig moduleDavid Sommerseth2013-01-041-0/+25
| | | | | | | This is to make it easier to apply default values when importing the rteval module from other places than rteval-cmd. Signed-off-by: David Sommerseth <davids@redhat.com>
* Corrects an error message which was duplicate of the following raiseRaphaël Beamonte2013-01-041-2/+1
| | | | | Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Corrects RuntimeError behavior using a new rtevalRuntimeError for modulesRaphaël Beamonte2013-01-042-9/+35
| | | | | | | | | | | Previously, when a module was raising a RuntimeError, parent threads weren't using it to stop the execution of the program. As RuntimeError are frequently fatal for what we want to set for the execution of rteval, this patches proposes to use a new rtevalRuntimeError which will set a flag on a module when raised to allow its parent to raise a RuntimeError to the main thread. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Adds is_alive() before join() to remove a RuntimeError raise when Ctrl-C on ↵Raphaël Beamonte2013-01-041-1/+2
| | | | | | | module error Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Replace concatened paths with a call to os.path.joinRaphaël Beamonte2013-01-042-2/+2
| | | | | Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Let's get ready for the v2.0 releaseDavid Sommerseth2012-12-211-1/+1
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Postpone loading of the rteval.SystemInfo moduleDavid Sommerseth2012-12-211-1/+2
| | | | | | | This is to avoid an annoying DMI warning if the RtEval() class is not going to be used. Signed-off-by: David Sommerseth <davids@redhat.com>
* Fixed silly typo in cyclictest reportDavid Sommerseth2012-12-201-1/+1
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Use proper time unit in the hwlatdetect summary reportDavid Sommerseth2012-12-201-3/+3
| | | | | | Just a type, used 'ms' instead of 'us' Signed-off-by: David Sommerseth <davids@redhat.com>
* Fix HWLatDetect exceptions when hwlatdetect could not be loadedDavid Sommerseth2012-12-192-8/+17
| | | | | | | | Added proper breakpoints when the hwlatdetect module did not load, to ensure rteval can complete without any errors. Also added a warning note in the summary report if this module failed to run. Signed-off-by: David Sommerseth <davids@redhat.com>
* Fix minor issues to make HWLatDetect module runDavid Sommerseth2012-12-191-4/+4
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Fix that not all measurement modules where loadedDavid Sommerseth2012-12-191-2/+1
| | | | | | The iterator loop exited one too early, so one module was always missing. Signed-off-by: David Sommerseth <davids@redhat.com>
* Instead of passing the config class a few places, save it in __init__()David Sommerseth2012-12-193-15/+16
| | | | | | | This cleans up the API a little bit, and lets the configuration access become a bit easier in the load and measurement classes. Signed-off-by: David Sommerseth <davids@redhat.com>
* Tackle if trying to set a configuration value not found in the config fileDavid Sommerseth2012-12-191-1/+8
| | | | | | | | If a section was missing in the config file when being set from the command line, an exception would occur. In these cases, create the section "on-the-fly" in the configuration object. Signed-off-by: David Sommerseth <davids@redhat.com>
* Use default values from config file when setting up modules' option parserDavid Sommerseth2012-12-192-6/+22
| | | | | | | Try to grab the values from the config file instead of the defaults from the module, if it is present. Signed-off-by: David Sommerseth <davids@redhat.com>
* Put all default values for modules into the modules itselfDavid Sommerseth2012-12-193-2/+4
| | | | | | | | Removed all the module defaults from rteval-cmd and updated the modules' default values to the same values. Now module defaults are only managed inside the module. Signed-off-by: David Sommerseth <davids@redhat.com>
* Update config with values from the command lineDavid Sommerseth2012-12-192-1/+15
| | | | | | | | Now all the command line argument modifications will update the configuration object. Command line arguments will override any default or configuration variables. Signed-off-by: David Sommerseth <davids@redhat.com>
* Add module options for the currently available modulesDavid Sommerseth2012-12-184-0/+57
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Added infrastructure to add command line arguments from modulesDavid Sommerseth2012-12-183-10/+70
| | | | | | | | | | | | | | All rteval modules must now provide a ModuleParameters() function which returns a dictionary containing the option setup it expects. Each module will get a separate option group, and all its options will be prefixed with the module name. These option variables will be stored as well, prefixed with the module name. So if the a module 'dummy' configures an option 'value1', it will be stored as 'dummy_value1' in the option container. To set this option, you will need to use --dummy-value1 from the command line. Signed-off-by: David Sommerseth <davids@redhat.com>
* Merge signal handlers into a single functionDavid Sommerseth2012-12-181-10/+9
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>