Module: MobyBehaviour::QT::Gpu
- Includes:
- Behaviour
- Defined in:
- lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/cute_gpu.rb
Overview
description
behaviour
QtGpu
requires
testability-driver-qt-sut-plugin
input_type
*
sut_type
QT
sut_version
*
objects
*
Instance Method Summary collapse
-
#start_gpu_measurement ⇒ Object
description Start collecting GPU usage per second data for the app.
-
#stop_gpu_measurement ⇒ Object
description Stop collecting GPU usage data for the object.
Methods included from Behaviour
Instance Method Details
#start_gpu_measurement ⇒ Object
description
Start collecting GPU usage per second data for the app.
returns
NilClass
description: -
example: -
exceptions
ArgumentError
description: In case the given parameters are not valid.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/cute_gpu.rb', line 59 def start_gpu_measurement begin log_gpu_mem(:interval => 1, :filePath => '/tmp') rescue Exception $logger.behaviour "FAIL;Failed start_gpu_mem_measurement.;#{ identity };start_gpu_mem_measurement;" raise end $logger.behaviour "PASS;Operation start_gpu_mem_measurement executed successfully.;#{ identity };start_gpu_mem_measurement;" nil end |
#stop_gpu_measurement ⇒ Object
description
Stop collecting GPU usage data for the object.
returns
Array
description: An Array of GPU entries. Each entry is a hash table that contains the value and time stamp {value => 42.00, usedMem => 42.00, freeMem => 12.34, totalMem => 43.21, processPrivateMem => 32.14, processSharedMem => 23.41 time_stamp => 06:49:42.259}
example: [{value => 42.0, usedMem => 42.0, freeMem => 123.0, totalMem => 256.0, processPrivateMem => 12.0, processSharedMem => 32.0, time_stamp => 06:49:42.259}, {value => 32.0, usedMem => 42.0, freeMem => 123.0, totalMem => 256.0, processPrivateMem => 12.0, processSharedMem => 32.0, time_stamp => 06:49:43.259}]
exceptions
ArgumentError
description: In case the given parameters are not valid.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/testability-driver-plugins/testability-driver-qt-sut-plugin/behaviours/cute_gpu.rb', line 90 def stop_gpu_measurement begin results = parse_results_gpu( stop_gpu_log() ) rescue Exception $logger.behaviour "FAIL;Failed stop_gpu_measurement.;#{ identity };stop_gpu_measurement;" raise end $logger.behaviour "PASS;Operation stop_gpu_measurement executed successfully.;#{ identity };stop_gpu_measurement;" results end |