summaryrefslogtreecommitdiffstats
path: root/rteval/modules
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>
* Added new measurement module, sysstatDavid Sommerseth2013-06-172-1/+158
| | | | | | | | | | | | 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-151-10/+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-141-0/+25
| | | | | | | | 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>
* 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>
* Copyright updatesDavid Sommerseth2013-01-187-32/+33
| | | | | | | | | - 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-181-26/+27
| | | | | | | | 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-181-4/+25
| | | | | | | 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>
* 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>
* cyclictest: Ensure that the self.__interval is always setDavid Sommerseth2013-01-081-2/+1
| | | | 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>
* Fixed silly typo in cyclictest reportDavid Sommerseth2012-12-201-1/+1
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Fix HWLatDetect exceptions when hwlatdetect could not be loadedDavid Sommerseth2012-12-191-6/+10
| | | | | | | | 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>
* 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>
* 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-191-1/+1
| | | | | | | | 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>
* Process better error issues with the module threads when stoppingDavid Sommerseth2012-12-171-2/+5
| | | | | | | Instead of throwing an exception which could lead to a soft-lockup, rather catch it and report it and complete the shutdown properly. Signed-off-by: David Sommerseth <davids@redhat.com>
* Split up rteval.py into a pure measurement module and the command line toolDavid Sommerseth2012-12-176-14/+14
| | | | | | | | | | | This cleans up rteval further by making the RtEval class a pure measurement feature which receives all the needed setup and controls loads and measurment modules, in addition to the final reporting. The command line and config parsing is kept inside the command line tool, where it will set up everything before passing it all to the RtEval calss. Signed-off-by: David Sommerseth <davids@redhat.com>
* Add ModuleContainer methods for accessing particular module objectsDavid Sommerseth2012-12-071-0/+18
| | | | | | | | Forgot to commit some needed methods with the last commit. This provides a more direct access to particular module objects and information about imported modules. Signed-off-by: David Sommerseth <davids@redhat.com>
* Rework the Unleash()/isAlive() logic to support running measurement threads ↵David Sommerseth2012-12-072-13/+45
| | | | | | serialised Signed-off-by: David Sommerseth <davids@redhat.com>
* Make the rtevalModulePrototype::_WorkloadAlive() method publicDavid Sommerseth2012-12-075-11/+11
| | | | | | Added a few minor log line adjustments too Signed-off-by: David Sommerseth <davids@redhat.com>
* Don't wait for a module to complete if it didn't start runningDavid Sommerseth2012-12-071-0/+3
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* hwlatdetect: A few more tweaks to make it runDavid Sommerseth2012-12-051-4/+2
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* Update hwlatdetect module to the new rtevalModulePrototype APIDavid Sommerseth2012-12-051-40/+86
| | | | Signed-off-by: David Sommerseth <davids@redhat.com>
* add 'distance' parameter to cyclictestClark Williams2012-12-051-1/+2
| | | | | | | Add the 'distance' parameter to affect the -d option for cyclictest and default it to 25 microseconds. Signed-off-by: Clark Williams <williams@redhat.com>
* fix incorrect variable name in hackbench.pyClark Williams2012-12-051-2/+2
| | | | | | | Add another '_' to the stdout and stderr logging file handles to match usage. Signed-off-by: Clark Williams <williams@redhat.com>
* First cut at rewriting cyclictest to become a dynamic loadable measurement ↵David Sommerseth2012-12-051-125/+166
| | | | | | | | | | module This is a massive re-write of the original cyclictest, as the old code base was not prepared for being a dynamic module. And it makes use of the new rtevalModulesPrototype() API. Signed-off-by: David Sommerseth <davids@redhat.com>
* Make MeasurementModules() objects iteratableDavid Sommerseth2012-12-051-0/+20
| | | | | | | When iterating an MeasurementModules() object, it will loop through and return registered MeasurementProfile() objects. Signed-off-by: David Sommerseth <davids@redhat.com>
* Extend the MeasurementProfile() class with an isAlive() methodDavid Sommerseth2012-12-052-0/+21
| | | | | | | | | This will return True if one or more of the modules which has been started do run. If the MeasurementProfile is for parallel running tasks, it expects all modules to be running. Otherwise it will return True if one of the modules are running. Signed-off-by: David Sommerseth <davids@redhat.com>
* Don't check if the module is alive at the Start(), it's too early nowDavid Sommerseth2012-12-051-2/+0
| | | | | | | Checking if the modules are alive needs to happen after it has been unleashed. Signed-off-by: David Sommerseth <davids@redhat.com>
* Adopted kcompile and hackbench modules to use the new API from ↵David Sommerseth2012-12-052-110/+131
| | | | | | | | rtevalModulePrototype These modules also need some more clean-up when we get further. Signed-off-by: David Sommerseth <davids@redhat.com>
* Adopted the LoadThread() and CommandLineLoad() classes to use the new ↵David Sommerseth2012-12-051-61/+17
| | | | | | | | | rtevalModulePrototype Just basic adoptation to make things work again. These LoadThread() based classes needs some more cleaning up later on. Signed-off-by: David Sommerseth <davids@redhat.com>
* Added a rtevalModulePrototype() classDavid Sommerseth2012-12-051-4/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | This class defines the needed methods for both rteval load and measurement modules. It also implements the needed run logic, so the modules just need to implement those code pieces unique for the module. The needed methods to implement are: _WorkloadSetup() - Prepares for building/compiling additional code _WorkloadBuild() - Does the building/compiling. This method needs to call self._setReady() when it is done. _WorkloadPrepare() - Final preparations before the workload is kicked off _WorkloadTask() - Is called in a loop until the rteval duration has expired. This should kick off the core workload. _WorkloadAlive() - Implements the needed check to see that the workload is running _WorkloadCleanup() - Called after rteval have stopped the modules' workload and should save the needed information for the final report back to rteval MakeReport() - This method generates the report and returns it as a libxml2.xmlNode object. This patch also adopts the RtEvalModules() class to depend on the API of rtevalModulePrototype(). Signed-off-by: David Sommerseth <davids@redhat.com>
* Added initial module framework for measurement modulesDavid Sommerseth2012-12-041-0/+133
| | | | | | | | | | This patch adds the needed code to import and categorise the measurement modules into measurement profiles so that they can be run profile by profile. The profile defines if they should be run separately or in parallel, and with or without load modules. Signed-off-by: David Sommerseth <davids@redhat.com>