hardinfo icon indicating copy to clipboard operation
hardinfo copied to clipboard

Inconsistent CPU cache capacity units

Open hamishmb opened this issue 1 year ago • 14 comments

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 avatar Aug 05 '22 13:08 hamishmb

What is this inconsistent with? KDE?

hamishmb avatar Aug 05 '22 13:08 hamishmb

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.

coffeecrisp avatar Aug 05 '22 23:08 coffeecrisp

Thanks for clarifying :)

hamishmb avatar Aug 16 '22 18:08 hamishmb

Do you need any help with this?

coffeecrisp avatar Aug 31 '22 04:08 coffeecrisp

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 :)

hamishmb avatar Aug 31 '22 07:08 hamishmb

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

coffeecrisp avatar Sep 14 '22 01:09 coffeecrisp

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

hamishmb avatar Sep 14 '22 09:09 hamishmb

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 avatar Jan 31 '23 20:01 coffeecrisp

Hello hamishmb, I hope you are still around.

coffeecrisp avatar Apr 02 '23 20:04 coffeecrisp

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.

hamishmb avatar Apr 03 '23 09:04 hamishmb

Can you put him in touch with me?

coffeecrisp avatar Apr 04 '23 02:04 coffeecrisp

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: @.***>

lpereira avatar Apr 04 '23 02:04 lpereira

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?

coffeecrisp avatar Apr 04 '23 03:04 coffeecrisp

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: @.***>

lpereira avatar Apr 04 '23 03:04 lpereira