Bug#1031027: libprometheus-cpp-core1.0: Library is built w/o optimization enabled

2023-02-11 Thread Maksim Dmitrichenko
Hi, Gregor.

This is strange. I've backported two packages (mimalloc and prometheus-cpp)
to ubuntu bionic. After that I've noticed a huge performance degradation
compared to local builds in /usr/local. After that I investigated the issue
and found out that both packages do not specify CMAKE_BUILD_TYPE during
build and after I've added it into debian/rules the performance was
restored.

Well, maybe debhelper in bookworm has other defaults then it has in ubuntu.
Sorry if I'm wrong.

сб, 11 февр. 2023 г. в 00:12, Gregor Jasny :

> Hello,
>
> On 10.02.23 16:44, Max Dmitrichenko wrote:
> > The CMakeList.txt of the library doesn't contain default
> CMAKE_BUILD_TYPE to be set to Release. Neither this variable is not set in
> debian/rules file. So the resulting library is build with no optimization
> enabled which hits performance by factor of around 2x.
>
>
> Setting CMAKE_BUILD_TYPE to None and using the distribution default
> C(XX)FLAGS is what debhelper defaults to [1].
>
> In the prometheus-cpp build logs [2] I can see that the "-O2"
> optimization flags get applied.
>
> How did you measure the performance degradation?
>
> Thanks,
> Gregor
>
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701233#27
> [2]
>
> https://buildd.debian.org/status/fetch.php?pkg=prometheus-cpp=amd64=1.0.1-1=1653219882=0
>
>
>

-- 
With best regards
  Maksim Dmitrichenko


Bug#1031027: libprometheus-cpp-core1.0: Library is built w/o optimization enabled

2023-02-10 Thread Gregor Jasny

Hello,

On 10.02.23 16:44, Max Dmitrichenko wrote:

The CMakeList.txt of the library doesn't contain default CMAKE_BUILD_TYPE to be 
set to Release. Neither this variable is not set in debian/rules file. So the 
resulting library is build with no optimization enabled which hits performance 
by factor of around 2x.



Setting CMAKE_BUILD_TYPE to None and using the distribution default 
C(XX)FLAGS is what debhelper defaults to [1].


In the prometheus-cpp build logs [2] I can see that the "-O2" 
optimization flags get applied.


How did you measure the performance degradation?

Thanks,
Gregor

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=701233#27
[2] 
https://buildd.debian.org/status/fetch.php?pkg=prometheus-cpp=amd64=1.0.1-1=1653219882=0




Bug#1031027: libprometheus-cpp-core1.0: Library is built w/o optimization enabled

2023-02-10 Thread Max Dmitrichenko
Package: libprometheus-cpp-core1.0
Version: 1.0.0-1
Severity: important
X-Debbugs-Cc: dmitr...@gmail.com

The CMakeList.txt of the library doesn't contain default CMAKE_BUILD_TYPE to be 
set to Release. Neither this variable is not set in debian/rules file. So the 
resulting library is build with no optimization enabled which hits performance 
by factor of around 2x.


-- System Information:
Debian Release: 11.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable-debug'), (500, 'proposed-updates-debug'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-21-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_CRAP, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libprometheus-cpp-core1.0 depends on:
ii  libc6   2.31-13+deb11u5
ii  libgcc-s1   10.2.1-6
ii  libstdc++6  10.2.1-6

libprometheus-cpp-core1.0 recommends no packages.

libprometheus-cpp-core1.0 suggests no packages.

-- no debconf information