## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.6.0 # Need profiler available %bcond_with check # https://github.com/hodgesds/perf-utils %global goipath github.com/hodgesds/perf-utils Version: 0.5.1 %gometa %global common_description %{expand: This package is a go library for interacting with the perf subsystem in Linux. I had trouble finding a golang perf library so I decided to write this by using the linux’s perf as a reference. This library allows you to do things like see how many CPU instructions a function takes (roughly), profile a process for various hardware events, and other interesting things. Note that because the go scheduler can schedule a goroutine across many OS threads it becomes rather difficult to get an exact profile of an invididual goroutine. However, a few tricks can be used; first a call to runtime.LockOSThread to lock the current goroutine to an OS thread. Second a call to unix.SchedSetaffinity, with a CPU set mask set. Note that if the pid argument is set 0 the calling thread is used (the thread that was just locked). Before using this library you should probably read the perf_event_open man page which this library uses heavily. See this kernel guide for a tutorial how to use perf and some of the limitations.} %global golicenses LICENSE %global godocs README.md Name: %{goname} Release: %autorelease Summary: Perf Utilities for Go License: MIT URL: %{gourl} Source0: %{gosource} BuildRequires: golang(golang.org/x/sys/unix) %if %{with check} # Tests BuildRequires: golang(github.com/stretchr/testify/require) %endif %description %{common_description} %gopkg %prep %goprep %install %gopkginstall %if %{with check} %check %gocheck %endif %gopkgfiles %changelog * Thu Jan 19 2023 Fedora Release Engineering 0.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Jul 21 2022 Fedora Release Engineering 0.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jan 20 2022 Fedora Release Engineering 0.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jan 14 2022 Robert-André Mauchin 0.5.1-1 - Update to 0.5.1 Close: rhbz#2003873 * Thu Jul 22 2021 Fedora Release Engineering - 0.2.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Feb 17 22:51:34 CET 2021 Robert-André Mauchin - 0.2.5-1 - Initial package