Bug 247293

Summary: benchmarks/unixbench: enable parallel benchmarking
Product: Ports & Packages Reporter: Yuichiro NAITO <naito.yuichiro>
Component: Individual Port(s)Assignee: Luca Pizzamiglio <pizzamig>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: buildisok
Priority: --- Flags: pizzamig: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
unixbench-mp.patch
none
unixbench.log none

Description Yuichiro NAITO 2020-06-16 01:55:44 UTC
Created attachment 215596 [details]
unixbench-mp.patch

I'd like to use unixbench not only for performance measuring but also to create CPU load for multiprocessor in a convenient way.

The attached `unixbench-mp.patch' fixes to create CPU information structure.
`Run` scripts determines if multi processor benchmark should be run from it.

Of course, the structure highly depends on Linux systems.
We can't fill complete same data but at least number of CPUS, CPU model, and CPU architecture can be filled.
They are enough to execute multiprocessor benchmark.

So please apply the patch to Ports tree.
Comment 1 Automation User 2020-07-01 00:18:18 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/161802943
Comment 2 Yuichiro NAITO 2020-07-01 00:22:27 UTC
Created attachment 216079 [details]
unixbench.log
Comment 3 Yuichiro NAITO 2020-07-01 00:23:25 UTC
The maintainer doesn't respond to me.
Does anybody check and commit `unixbench-mp.patch`?
It will show parallel benchmarck result like `unixbench.log`.
Comment 4 Luca Pizzamiglio freebsd_committer freebsd_triage 2020-07-04 13:00:19 UTC
Hi. Sorry for the delay, I was quite busy with personal stuff.

I can work on it and commit it.
Comment 5 Luca Pizzamiglio freebsd_committer freebsd_triage 2020-07-04 13:13:21 UTC
However, to create CPU load, I can also suggest stress-ng (also available on FreeBSD)
It's a program that stress different subsystem.
This command will create load for all the available CPUs
stress-ng --cpu 0
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-07-04 14:49:25 UTC
A commit references this bug:

Author: pizzamig
Date: Sat Jul  4 14:48:33 UTC 2020
New revision: 541217
URL: https://svnweb.freebsd.org/changeset/ports/541217

Log:
  benchmarks/unixbench: Add support to parallel execution

  Add support to get the number of CPUs on FreeBSD.
  Bump PORTREVISION.

  PR:		247293
  Submitted by:	Yuichiro NAITO <naito.yuichiro@gmail.com>

Changes:
  head/benchmarks/unixbench/Makefile
  head/benchmarks/unixbench/files/patch-Run
Comment 7 Luca Pizzamiglio freebsd_committer freebsd_triage 2020-07-04 14:57:58 UTC
Committed!

I bumped the portrevision to force the re-build of the package and the update.

Thanks
Comment 8 Yuichiro NAITO 2020-07-06 00:35:20 UTC
(In reply to Luca Pizzamiglio from comment #7)
I could confirm your commit.
Tkank you!