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 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
1=== modified file 'data/whitelists/default.whitelist'
2--- data/whitelists/default.whitelist 2012-10-23 21:52:31 +0000
3+++ data/whitelists/default.whitelist 2012-12-12 09:20:26 +0000
4@@ -64,6 +64,7 @@
5 graphics/minimum_resolution
6 graphics/driver_version
7 graphics/VESA_drivers_not_in_use
8+graphics/3d_benchmark
9 __input__
10 input/keyboard
11 input/mouse
12
13=== modified file 'jobs/graphics.txt.in'
14--- jobs/graphics.txt.in 2012-12-07 17:00:38 +0000
15+++ jobs/graphics.txt.in 2012-12-12 09:20:26 +0000
16@@ -210,3 +210,14 @@
17 depends: graphics/screenshot_fullscreen_video
18 command: base64 ${CHECKBOX_DATA}/screenshot_fullscreen_video.jpg
19 _description: Attaches the screenshot captured in graphics/screenshot_fullscreen_video.
20+
21+plugin: shell
22+name: graphics/3d_benchmark
23+requires:
24+ package.name == 'mesa-utils'
25+ package.name == 'wmctrl'
26+ package.name == 'xmacro'
27+ package.name == 'x11-utils'
28+command: 3d_benchmark
29+_description: make sure glxgears has at least 60 FPS
30+
31
32=== added file 'scripts/3d_benchmark'
33--- scripts/3d_benchmark 1970-01-01 00:00:00 +0000
34+++ scripts/3d_benchmark 2012-12-12 09:20:26 +0000
35@@ -0,0 +1,27 @@
36+#!/usr/bin/env python3
37+# -*- coding: utf-8 -*-
38+
39+import threading
40+import time
41+import re
42+import sys
43+
44+from subprocess import Popen, PIPE, check_output, call
45+
46+FPS_THRESHOLD = 59
47+PASSED = 0
48+FAILED = -1
49+
50+proc = Popen('glxgears', stdout = PIPE, stderr = PIPE)
51+call('wmctrl -a glxgears', shell = True, stdout = None, stderr = None)
52+time.sleep(8)
53+call('echo "KeyStrPress Escape" | xmacroplay ":0" > /dev/null 2>&1',
54+ shell = True, stdout = None, stderr = None)
55+pout, perr = proc.communicate()
56+print(pout)
57+fps = float(re.search('= (.*) FPS', str(pout)).group(1))
58+if fps < FPS_THRESHOLD:
59+ sys.exit(FAILED)
60+else:
61+ sys.exit(PASSED)
62+

Subscribers

People subscribed via source and target branches