fastfetch-cli / fastfetch

An actively maintained, feature-rich and performance oriented, neofetch like system information tool.
MIT License
8.08k stars 349 forks source link

[FEAT] Detect cache amounts for CPUs. #992

Closed Get-Newsletters-Int closed 1 month ago

Get-Newsletters-Int commented 1 month ago

Wanted features:

Allow detection of L3, L2, and L1 cache amounts for CPUs.

Motivation:

Cache amounts are important, especially with processors like AMD Ryzen X3D.

Get-Newsletters-Int commented 1 month ago

Thanks! I tested it on my machine and it works well:

{
  "type": "CPUCache",
  "result": {
    "l1": [
      {
        "size": 32768,
        "num": 2,
        "lineSize": 64,
        "type": "data"
      },
      {
        "size": 32768,
        "num": 2,
        "lineSize": 64,
        "type": "instruction"
      }
    ],
    "l2": [
      {
        "size": 262144,
        "num": 2,
        "lineSize": 64,
        "type": "unified"
      }
    ],
    "l3": [
      {
        "size": 3145728,
        "num": 1,
        "lineSize": 64,
        "type": "unified"
      }
    ]
  }
}
/////////////////  /////////////////    CPU Cache (L1): 2x32.00 KiB (D), 2x32.00 KiB (I)
/////////////////  /////////////////    CPU Cache (L2): 2x256.00 KiB (U)
/////////////////  /////////////////    CPU Cache (L3): 3.00 MiB (U)
/////////////////  /////////////////
/////////////////  /////////////////
/////////////////  /////////////////
/////////////////  /////////////////
/////////////////  /////////////////

/////////////////  /////////////////
/////////////////  /////////////////
/////////////////  /////////////////
/////////////////  /////////////////
/////////////////  /////////////////
/////////////////  /////////////////
/////////////////  /////////////////
/////////////////  /////////////////
CarterLi commented 1 month ago

What's your CPU?

Get-Newsletters-Int commented 1 month ago

I tested it on Intel Core i3-380M.