public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] benchmarks/gem_wsim: Randomise random seed
@ 2019-05-16 18:58 Chris Wilson
  2019-05-16 19:37 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Chris Wilson @ 2019-05-16 18:58 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, Tvrtko Ursulin

To avoid hitting the same rut on each benchmark run, start with a new
random seed. To allow hitting the same rut again, let it be specified
by the user.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 benchmarks/gem_wsim.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index 48568ce40..cf2a44746 100644
--- a/benchmarks/gem_wsim.c
+++ b/benchmarks/gem_wsim.c
@@ -2282,8 +2282,9 @@ int main(int argc, char **argv)
 	igt_require(fd);
 
 	init_clocks();
+	srand(time(NULL));
 
-	while ((c = getopt(argc, argv, "hqv2RSHxGdc:n:r:w:W:a:t:b:p:")) != -1) {
+	while ((c = getopt(argc, argv, "hqv2RSHxGdc:n:r:w:W:a:t:b:p:s:")) != -1) {
 		switch (c) {
 		case 'W':
 			if (master_workload >= 0) {
@@ -2300,6 +2301,9 @@ int main(int argc, char **argv)
 		case 'p':
 			prio = atoi(optarg);
 			break;
+		case 's':
+			srand(atoi(optarg));
+			break;
 		case 'a':
 			if (append_workload_arg) {
 				if (verbose)
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-17 12:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-16 18:58 [igt-dev] [PATCH i-g-t] benchmarks/gem_wsim: Randomise random seed Chris Wilson
2019-05-16 19:37 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-05-17  1:50 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-05-17  8:28 ` [igt-dev] [Intel-gfx] [PATCH i-g-t] " Tvrtko Ursulin
2019-05-17  8:37   ` Chris Wilson
2019-05-17 10:32     ` Tvrtko Ursulin
2019-05-17 10:55 ` [igt-dev] " Ser, Simon
2019-05-17 12:59   ` [Intel-gfx] " Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox