Bug 258699 - [new port] devel/go-perf: Go performance measurement, storage, and analysis tools
Summary: [new port] devel/go-perf: Go performance measurement, storage, and analysis t...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL: http://golang.org/x/perf
Keywords: feature, patch-ready
Depends on:
Blocks:
 
Reported: 2021-09-23 23:31 UTC by Robert Clausecker
Modified: 2021-09-25 18:14 UTC (History)
2 users (show)

See Also:


Attachments
devel/go-perf: Go performance measurement, storage, and analysis tools (7.59 KB, patch)
2021-09-23 23:31 UTC, Robert Clausecker
no flags Details | Diff
devel/go-perf: Go performance measurement, storage, and analysis tools (3.02 KB, patch)
2021-09-24 09:10 UTC, Robert Clausecker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2021-09-23 23:31:42 UTC
Created attachment 228142 [details]
devel/go-perf: Go performance measurement, storage, and analysis tools

This adds devel/go-perf as a new port.  A somewhat straightforward Go port.  I would have prefered to use GO_MODULE, but Uses=go requires DISTVERSION to be set to the verbatim module version in this case (it is not possible to set GO_MODVERSION manually as go.mk has = instead of ?= to assign to it) and as upstream has never tagged a release, the module version is 0.0.0-20210220033136-40a54f11e909 which pkg fails to generate a sensible PORTVERSION from.

dmgk is CC'ed to have a look at this.  Perhaps go.mk could have some better code allowing the user to set GO_MODVERSION with go.mk deriving PORTVERSION in a sensible and standard manner from it.  I volunteer to design a patch for that if desired.

To sidestep this issue, I've manually derived a suitable PORTVERSION and download the source from github (which holds a mirror of the official repository over on Google's site).

Tested with Poudriere on armv7 arm64 i386 amd64 FreeBSD 13.0-RELEASE.
Unit tests pass with flying colours.

***
Utilities to analyse and publish Go benchmark results.  The main use
case is to compare two series of benchmarks for minuscule performance
improvements.  Four programs are included:

 - benchstat is a command-line tool that computes and compares
   statistics about benchmarks

 - benchsave is a command-line tool for publishing benchmark results

 - localperfdata is a local version of the https://perfdata.golang.org/
   benchmark result storage system

 - localperf is a local version of the https://perf.golang.org/
   benchmark result analysis system.

WWW: https://golang.org/x/perf
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2021-09-24 09:10:45 UTC
Created attachment 228148 [details]
devel/go-perf: Go performance measurement, storage, and analysis tools

Replace patch with simplified patch using GO_MODULE.

Apparently you can do it this way (or so dmgk@ said).
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-09-25 18:13:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=25eae81f76f75fe1bc19c6cb0b37892fde54f2b1

commit 25eae81f76f75fe1bc19c6cb0b37892fde54f2b1
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2021-09-25 18:09:22 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2021-09-25 18:11:57 +0000

    devel/go-perf: + Go performance measurement, storage, and analysis tools.

    PR:             258699

 devel/Makefile                |  1 +
 devel/go-perf/Makefile (new)  | 23 +++++++++++++++++++++++
 devel/go-perf/distinfo (new)  |  5 +++++
 devel/go-perf/pkg-descr (new) | 16 ++++++++++++++++
 4 files changed, 45 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-09-25 18:13:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ef38176628ed85fd9f7ea9a2ca29bf39f520d0c6

commit ef38176628ed85fd9f7ea9a2ca29bf39f520d0c6
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2021-09-25 18:10:41 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2021-09-25 18:11:58 +0000

    devel/go-perf: Tidy up pkg-descr a bit.

    PR:             258699

 devel/go-perf/pkg-descr | 4 ----
 1 file changed, 4 deletions(-)
Comment 4 Gleb Popov freebsd_committer freebsd_triage 2021-09-25 18:14:09 UTC
Pushed in, thank you for your contribution.