lpereira / hardinfo

System profiler and benchmark tool for Linux systems
http://hardinfo.org
GNU General Public License v2.0
765 stars 131 forks source link

Inconsistent CPU cache capacity units #654

Open hamishmb opened 2 years ago

hamishmb commented 2 years ago

Originally reported by https://github.com/coffeecrisp

OS: Kubuntu 22.04 Version: 0.6-alpha

Under Devices, Processor section, the cache is written as 6x 32 KB (192 KB) etc. This is not consistent with the rest (of the GUI?) Under KDE, there is a file ./config/kdeglobals

Add this line [Locale] BinaryUnitDialect=0 and it displays RAM the EIC way (1024 B = 1 kiB)

[Locale] BinaryUnitDialect=1 and it displays RAM the JEDEC way (1024 B = 1 KB)

[Locale] BinaryUnitDialect=2 and it displays RAM the metric way (1024 B = 1.024 kB)

hamishmb commented 2 years ago

What is this inconsistent with? KDE?

coffeecrisp commented 2 years ago

HardInfo is inconsistent with itself.

For example, when on the left side, Computer is selected, the right side shows a bunch of information. For the RAM, it displays 24563668 KiB.

When on the left side, Summary is selected, the right side shows memory 24563 MB instead of MiB. I guess it is doing a divide by 1000 in this case. Maybe it should do a divide by 1024 and display MiB. Might as well display in GiB as well.

When on the left side, Devices -> Processor is selected on the right side, CPU caches are reported in JEDEC mode. 32 KB, 192 KB, etc.

When on the left side, Devices -> Memory is selected It shows it all in EIC bibimode (not sure what it is called). (KiB)

If you do choose to make it consistent, I also suggest what I suggest to all programmers: Make your programs highly configurable. Don’t be like Microsoft. Don’t be like Apple.

Maybe add an item in the menu: Options -> Configure Options... and let user choose between the 3 memory reporting systems.

hamishmb commented 2 years ago

Thanks for clarifying :)

coffeecrisp commented 2 years ago

Do you need any help with this?

hamishmb commented 2 years ago

Probably not, but the problem is that I don't currently have any time to work on the bug - if you want to fix it please go ahead :)

coffeecrisp commented 2 years ago

I can’t figure it out. How can I download the source code or pull the source code?

hamishmb commented 2 years ago

Assuming you're on a Unix-like OS (or using Cygwin or WSL on Windows), you should be able to paste this in a shell to get the code:

git clone https://github.com/lpereira/hardinfo.git

coffeecrisp commented 1 year ago

I was busy with some other projects for a while. I have begun writing functions for this. It would be “free” functions, C style functions.

Do you use? strcpy strcat int64_t (This use for working with very large numbers bc I want the code to handle up to exabyte) fcvt (This is to convert double numbers to text format)

There will be the ability to control number of decimals after the dot (3.45835 or 3.458 or 3.46 or 3) The ability to control digit grouping (6239145235 or 6,239,145,235)

Do you know GTK well? Would you be able to make a dialog box to let the user choose what he wants? Also, can we save the program state to a Config.ini file? Do you already do this?

coffeecrisp commented 1 year ago

Hello hamishmb, I hope you are still around.

hamishmb commented 1 year ago

Hmm, I was apparently not notified of that reply. I'm still around, but unfortunately not very familiar with either GTK or C/C++ at this point, though I aim to change that.

@lpereira might be able to answer your question better than me.

coffeecrisp commented 1 year ago

Can you put him in touch with me?

lpereira commented 1 year ago

It's her, not "him".

I'd rather not have options and choose a unit and be consistent throughout. I would appreciate a patch that does this (a function that does this already exists but it's not consistently used).

On Mon, Apr 3, 2023, at 7:13 PM, coffeecrisp wrote:

Can you put him in touch with me?

— Reply to this email directly, view it on GitHub https://github.com/lpereira/hardinfo/issues/654#issuecomment-1495241247, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADVGN54Z3ZBW24HKJFJ2DW7N7VDANCNFSM55WAKCTQ. You are receiving this because you were mentioned.Message ID: @.***>

coffeecrisp commented 1 year ago

Hello lpereira, I don’t know how open source projects work. If it is your project and you are against this feature, then that is the way it goes.

Is there anything I can do for this project?

lpereira commented 1 year ago

I'm not against HardInfo being more consistent with itself, I just don't want to add options. A patch to make this happen would be easier than what has been suggested in this issue so far: going through all the places in the code that shows an amount of space and ensure that the appropriate function is called to show the right unit.

On Mon, Apr 3, 2023, at 8:07 PM, coffeecrisp wrote:

Hello lpereira, I don’t know how open source projects work. If it is your project and you are against this feature, then that is the way it goes.

Is there anything I can do for this project?

— Reply to this email directly, view it on GitHub https://github.com/lpereira/hardinfo/issues/654#issuecomment-1495280396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADVGKKL62K6KJYKVDB3FLW7OF7JANCNFSM55WAKCTQ. You are receiving this because you were mentioned.Message ID: @.***>