โหมดประสิทธิภาพคงที่
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เปิดตัว: Android 11 (API ระดับ 30)
อุปกรณ์ Android สามารถเปลี่ยนนาฬิกาแบบไดนามิกได้ตามการทำงานของระบบ ช่วงเวลานี้
พฤติกรรมนี้ดีต่อการประหยัดพลังงานระหว่างการใช้งาน แต่อาจทำให้ใช้งานยาก
ข้อมูลประสิทธิภาพที่เชื่อถือได้ ถ้าคุณกำลังพยายามหาความเร็วรหัส
Fragment อาจเรียกใช้เพื่อป้องกันการถดถอย หรือหากการเพิ่มประสิทธิภาพทำซ้ำได้
ผลลัพธ์อาจเชื่อถือไม่ได้หากไม่ได้รับการทดสอบที่ความเร็วนาฬิกาคงที่ ด้วย
เมื่อมีเวลาคงที่ คุณสามารถทำการทดสอบ A/B ได้อย่างแม่นยำโดยไม่ต้องเปลี่ยนแปลง
ก็ถือเป็นปัจจัยหนึ่ง
โหมดประสิทธิภาพคงที่จะกำหนดนาฬิกา CPU และ GPU โดยมีขอบเขตบนและล่าง
โหมดนี้จะไม่ปิดใช้ลักษณะการทํางานแบบไดนามิกอื่นๆ เช่น
มากมาย
คุณเปิดใช้โหมดประสิทธิภาพคงที่ได้ด้วยคำสั่ง adb ต่อไปนี้
adb shell cmd power set-fixed-performance-mode-enabled [true|false]
อุปกรณ์ที่ทํางานในโหมดประสิทธิภาพคงที่จะยังคงมีความร้อนสูงเกินไปเนื่องจาก
โหมดนี้จะไม่ทำให้อุปกรณ์อยู่ในสถานะที่สามารถรักษาความร้อนได้ เนื่องจาก
เราขอแนะนำวิธีการต่อไปนี้สำหรับการเรียกใช้การเปรียบเทียบ
- รอให้อุปกรณ์กลับสู่สถานะที่สามารถรักษาความร้อนได้ก่อนเริ่ม
การวิ่ง
- ตรวจสอบสถานะความร้อนของอุปกรณ์ระหว่างการทดสอบเพื่อแยกความแตกต่างของ
ผลกระทบระหว่างรหัสการเปรียบเทียบและเหตุการณ์ความร้อน
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# Fixed Performance Mode\n\n**Released**: Android 11 (API level 30)\n\nAndroid devices can change clocking dynamically based on the system load. This\nbehavior is good for power savings during use, but can make it difficult to get\nreliable performance data. If you are trying to determine how fast a code\nfragment can run for regression prevention, or if an optimization is repeatable,\nyour results won't be reliable if they aren't tested at fixed clock speeds. With\nfixed clocks, you can do accurate A/B testing of performance without changes in\nthe CPU frequency being a factor.\n\nFixed-performance mode sets CPU and GPU clocks with an upper and lower bound.\nThis mode does not disable other dynamic performance behaviors, such as core\nselection.\n\nYou can enable fixed-performance mode with the following adb command: \n\n adb shell cmd power set-fixed-performance-mode-enabled [true|false]\n\nA device that is running in fixed-performance mode can still overheat because\nthe mode doesn't put the device into a thermally-sustainable state. Because of\nthis, we recommend the following for benchmark runs:\n\n- Wait for the device to return to a thermally-sustainable state before starting the run.\n- Monitor the thermal state of the device during testing to differentiate the impact between the benchmark code and thermal events."]]