blob: 8f4ff14c4bda9c3adf8dc0110f43f8a67324e15a [file] [log] [blame]
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
AUTHOR = "Chrome OS Team"
NAME = "video_PowerConsumption.hw_hangout.h264"
TIME = "MEDIUM"
TEST_CATEGORY = "Performance"
TEST_CLASS = "video"
SUITE = "performance"
TEST_TYPE = "server"
DEPENDENCIES = "rpm, power:battery, hw_video_acc_h264, hw_video_acc_enc_h264"
BUG_TEMPLATE = {
"labels": ["OS-Chrome", "Cr-OS-Kernel-Video"],
}
DOC = """
The test outputs the power consumption for running multiple encoders and
decoders simultaneously in a hangout like scenario.
"""
import logging
from autotest_lib.client.common_lib import error
# Used resources. They will be download in the beginning of the test.
resources = [
'crowd/crowd720-8f5d51b87ca7942133b76c9132438883.h264',
'crowd/crowd180-cc5181cfd20ad29a91c2406366c16eb8.h264',
'crowd/crowd720-3cfe7b096f765742b4aa79e55fe7c994.yuv',
'crowd/crowd360-e84aac15c05b9b19250f3fc97722e0f6.yuv',
'crowd/crowd180-6d71fa96da062037482619df31830a97.yuv']
# The videos to be decoded. Each entry consists of the following parts:
# [vidoe_name, width, height, frame_num, fragment_num, profile]
decode_videos = [['crowd720.h264', 1280, 720, 500, 502, 1]]
decode_videos += [['crowd180.h264', 320, 180, 500, 502, 1]] * 4
# The videos to be encoded.
# [video_name, width, height, profile, bit_rate]
encode_videos = [
['crowd720.yuv', 1280, 720, 1, 1200000],
['crowd360.yuv', 640, 360, 1, 500000],
['crowd180.yuv', 320, 180, 1, 100000]]
def _run_client_test(machine):
"""Runs client test with battery actively discharging."""
client = hosts.create_host(machine)
if not client.has_power():
raise error.TestError("This test requires RPM support.")
client.power_off()
try:
client_at = autotest.Autotest(client)
client_at.run_test("video_HangoutHardwarePerf",
resources=resources, decode_videos=decode_videos,
encode_videos=encode_videos, measurement='power')
finally:
client.power_on()
job.parallel_on_machines(_run_client_test, machines)