A partire dal 27 marzo 2025, ti consigliamo di utilizzare android-latest-release
anziché aosp-main
per compilare e contribuire ad AOSP. Per ulteriori informazioni, vedi Modifiche ad AOSP.
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
CpuThrottlingWaiter
public
class
CpuThrottlingWaiter
extends BaseTargetPreparer
Un ITargetPreparer
che attende fino a quando la frequenza massima su tutti i core non viene ripristinata al livello più alto disponibile
Riepilogo
Metodi protetti |
|
getCpuMaxFreqs(ITestDevice device)
Legge le informazioni in /sys/devices/system/cpu per determinare i core disponibili e le frequenze massime possibili per ciascun core
|
Costruttori pubblici
CpuThrottlingWaiter
public CpuThrottlingWaiter ()
Metodi pubblici
public void setUp (TestInformation testInfo)
Parametri |
testInfo |
TestInformation |
Metodi protetti
getCpuMaxFreqs
protected getCpuMaxFreqs (ITestDevice device)
Legge le informazioni in /sys/devices/system/cpu per determinare i core disponibili e le frequenze massime possibili per ciascun core
Parametri |
device |
ITestDevice : dispositivo in test |
Ritorni |
|
un ERROR(/Map) con i percorsi a sysfs cpuinfo come chiave e la frequenza massima corrispondente come valore |
I campioni di contenuti e codice in questa pagina sono soggetti alle licenze descritte nella Licenza per i contenuti. Java e OpenJDK sono marchi o marchi registrati di Oracle e/o delle sue società consociate.
Ultimo aggiornamento 2025-07-27 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-27 UTC."],[],[],null,["# CpuThrottlingWaiter\n===================\n\n\n`\npublic\n\n\nclass\nCpuThrottlingWaiter\n`\n\n\n`\n\n\n`\n\n`\n\nextends `[BaseTargetPreparer](../../../../../../reference/tradefed/com/android/tradefed/targetprep/BaseTargetPreparer.html)`\n\n\n`\n\n`\n\n\n`\n\n|---|---|-----------------------------------------------------|\n| java.lang.Object |||\n| ↳ | [com.android.tradefed.targetprep.BaseTargetPreparer](../../../../../../reference/tradefed/com/android/tradefed/targetprep/BaseTargetPreparer.html) ||\n| | ↳ | com.android.tradefed.targetprep.CpuThrottlingWaiter |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAn [ITargetPreparer](../../../../../../reference/tradefed/com/android/tradefed/targetprep/ITargetPreparer.html) that waits until max frequency on all cores are restored to highest\nlevel available\n\nSummary\n-------\n\n| ### Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[CpuThrottlingWaiter](../../../../../../reference/tradefed/com/android/tradefed/targetprep/CpuThrottlingWaiter.html#CpuThrottlingWaiter())`() ` |\n\n| ### Public methods ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[setUp](../../../../../../reference/tradefed/com/android/tradefed/targetprep/CpuThrottlingWaiter.html#setUp(com.android.tradefed.invoker.TestInformation))`(`[TestInformation](../../../../../../reference/tradefed/com/android/tradefed/invoker/TestInformation.html)` testInfo) ` |\n\n| ### Protected methods ||\n|-----|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` ` | ` `[getCpuMaxFreqs](../../../../../../reference/tradefed/com/android/tradefed/targetprep/CpuThrottlingWaiter.html#getCpuMaxFreqs(com.android.tradefed.device.ITestDevice))`(`[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device) ` Reads info under /sys/devices/system/cpu to determine cores available, and max frequencies possible for each core |\n\nPublic constructors\n-------------------\n\n### CpuThrottlingWaiter\n\n```\npublic CpuThrottlingWaiter ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### setUp\n\n```\npublic void setUp (TestInformation testInfo)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------------------|\n| `testInfo` | `TestInformation` \u003cbr /\u003e |\n\n| Throws ||\n|----------------------------------------------------------------------------------------------------------------------------------|---|\n| [BuildError](../../../../../../reference/tradefed/com/android/tradefed/targetprep/BuildError.html) | |\n| [DeviceNotAvailableException](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |\n| [TargetSetupError](../../../../../../reference/tradefed/com/android/tradefed/targetprep/TargetSetupError.html) | |\n\nProtected methods\n-----------------\n\n### getCpuMaxFreqs\n\n```\nprotected getCpuMaxFreqs (../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html device)\n```\n\nReads info under /sys/devices/system/cpu to determine cores available, and max frequencies\npossible for each core\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-----------------------------------------|\n| `device` | `ITestDevice`: device under test \u003cbr /\u003e |\n\n| Returns ||\n|---|-------------------------------------------------------------------------------------------------------------------------|\n| | a [ERROR(/Map)](../../../../../../) with paths to sysfs cpuinfo as key, and corresponding max frequency as value \u003cbr /\u003e |\n\n| Throws ||\n|----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|\n| | com.android.tradefed.device.DeviceNotAvailableException |\n| [DeviceNotAvailableException](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |"]]