Merge lp:~wenchien/checkbox/3d_benchmark into lp:checkbox

Proposed by Jesse Sung
Status: Rejected
Rejected by: Daniel Manrique
Proposed branch: lp:~wenchien/checkbox/3d_benchmark
Merge into: lp:checkbox
Diff against target: 62 lines (+39/-0)
3 files modified
data/whitelists/default.whitelist (+1/-0)
jobs/graphics.txt.in (+11/-0)
scripts/3d_benchmark (+27/-0)
To merge this branch: bzr merge lp:~wenchien/checkbox/3d_benchmark
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Disapprove
Sylvain Pineau (community) Needs Fixing
Brendan Donegan Pending
Review via email: mp+139404@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Rex Tsai (chihchun) wrote :

The glxgears should be always running and be focused, no need to do `wmctrl -a glxgears'. IMHO.
We can also kill the process by Popen.kill, don't need to pull dependence of xmacro as well.

lp:~wenchien/checkbox/3d_benchmark updated
1836. By Jesse Sung

Give the focus to glxgears before sleep

Revision history for this message
Jesse Sung (wenchien) wrote :

Commit 1836 do the 'wmctrl -a glxgears' before sleep to make sure glxgears get the focus no matter it is already focused or not.

Popen.kill can't be used to terminate glxgears, or the script will not be able to get the output of glxgears...

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Thanks for contributing to checkbox.

Note that glxgears is not a benchmark. It doesn't matter if it renders at 3000, 5000 or 15000 fps - the only thing it can do, is show whether 3d acceleration is working.

graphics/glxgears already exists in graphics.txt, not in the benchmark section for the above reason.

You could improve the existing test with the 'get focus' addition though but please forget the FPS_THRESHOLD.

review: Needs Fixing
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I second Sylvain, glxgears is a crappy benchmark. If that's the point of this patch then we can just kill it right now. Look at LAVA or phoronix for some bechmarks that do make sense.

review: Disapprove
Revision history for this message
Daniel Manrique (roadmr) wrote :

Hello,

Apologies, but as previous comments have mentioned, glxgears is not recommended as a benchmark, this is documented in many places, a couple of which are:

https://wiki.archlinux.org/index.php/Benchmarking#glxgears_.28and_why_not_to_use_this_as_a_benchmark.29

http://wiki.cchtml.com/index.php/Glxgears_is_not_a_Benchmark

Checkbox has two existing 3d benchmarks: glmark (with a glmark-es variant) and globs. Both are more thorough than glxgears, however both are really easy for any modern GPU (i.e. even a built-in Intel GPU can blaze through these benchmarks).

Unfortunately the phoronix/unigine combo seems to be the best available benchmark, but it has licensing and installation issues that make it a bit cumbersome to use.

Regardless, since glxgears has little value as a benchmark, I have to reject this proposal, however if you need benchmarking I suggest you use one of the existing tests.

Thanks for your contribution and again, apologies for being unable to accept this in checkbox.

Unmerged revisions

1836. By Jesse Sung

Give the focus to glxgears before sleep

1835. By Jesse Sung

Add a 3D benchmark test

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/whitelists/default.whitelist'
--- data/whitelists/default.whitelist 2012-10-23 21:52:31 +0000
+++ data/whitelists/default.whitelist 2012-12-12 09:20:26 +0000
@@ -64,6 +64,7 @@
64graphics/minimum_resolution64graphics/minimum_resolution
65graphics/driver_version65graphics/driver_version
66graphics/VESA_drivers_not_in_use66graphics/VESA_drivers_not_in_use
67graphics/3d_benchmark
67__input__68__input__
68input/keyboard69input/keyboard
69input/mouse70input/mouse
7071
=== modified file 'jobs/graphics.txt.in'
--- jobs/graphics.txt.in 2012-12-07 17:00:38 +0000
+++ jobs/graphics.txt.in 2012-12-12 09:20:26 +0000
@@ -210,3 +210,14 @@
210depends: graphics/screenshot_fullscreen_video210depends: graphics/screenshot_fullscreen_video
211command: base64 ${CHECKBOX_DATA}/screenshot_fullscreen_video.jpg211command: base64 ${CHECKBOX_DATA}/screenshot_fullscreen_video.jpg
212_description: Attaches the screenshot captured in graphics/screenshot_fullscreen_video.212_description: Attaches the screenshot captured in graphics/screenshot_fullscreen_video.
213
214plugin: shell
215name: graphics/3d_benchmark
216requires:
217 package.name == 'mesa-utils'
218 package.name == 'wmctrl'
219 package.name == 'xmacro'
220 package.name == 'x11-utils'
221command: 3d_benchmark
222_description: make sure glxgears has at least 60 FPS
223
213224
=== added file 'scripts/3d_benchmark'
--- scripts/3d_benchmark 1970-01-01 00:00:00 +0000
+++ scripts/3d_benchmark 2012-12-12 09:20:26 +0000
@@ -0,0 +1,27 @@
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3
4import threading
5import time
6import re
7import sys
8
9from subprocess import Popen, PIPE, check_output, call
10
11FPS_THRESHOLD = 59
12PASSED = 0
13FAILED = -1
14
15proc = Popen('glxgears', stdout = PIPE, stderr = PIPE)
16call('wmctrl -a glxgears', shell = True, stdout = None, stderr = None)
17time.sleep(8)
18call('echo "KeyStrPress Escape" | xmacroplay ":0" > /dev/null 2>&1',
19 shell = True, stdout = None, stderr = None)
20pout, perr = proc.communicate()
21print(pout)
22fps = float(re.search('= (.*) FPS', str(pout)).group(1))
23if fps < FPS_THRESHOLD:
24 sys.exit(FAILED)
25else:
26 sys.exit(PASSED)
27

Subscribers

People subscribed via source and target branches