Skip to content

Commit

Permalink
Merge pull request #8 from alysondeives/gnrd
Browse files Browse the repository at this point in the history
Enable C1/C6 State Residency and Bus Clock speed to GraniteRapids-D
  • Loading branch information
pperycz authored Nov 14, 2024
2 parents 5279ae9 + d0a8873 commit 20ff7a1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ The following processor properties are required by the library:
| 0x8F | Intel Sapphire Rapids X || | ||
| 0xCF | Intel Emerald Rapids X || | ||
| 0xAD | Intel Granite Rapids X || | | |
| 0xAE | Intel Granite Rapids D || | | |
| 0x8A | Intel Lakefield || || |
| 0x97 | Intel AlderLake || |||
| 0x9A | Intel AlderLake-L || |||
Expand Down
1 change: 1 addition & 0 deletions metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func isC1C6BaseTempSupported(cpuModel int) bool {
cpumodel.INTEL_FAM6_SAPPHIRERAPIDS_X,
cpumodel.INTEL_FAM6_EMERALDRAPIDS_X,
cpumodel.INTEL_FAM6_GRANITERAPIDS_X,
cpumodel.INTEL_FAM6_GRANITERAPIDS_D,
cpumodel.INTEL_FAM6_LAKEFIELD,
cpumodel.INTEL_FAM6_ALDERLAKE,
cpumodel.INTEL_FAM6_ALDERLAKE_L,
Expand Down
1 change: 1 addition & 0 deletions metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ var (
0x8F, // INTEL_FAM6_SAPPHIRERAPIDS_X
0xCF, // INTEL_FAM6_EMERALDRAPIDS_X
0xAD, // INTEL_FAM6_GRANITERAPIDS_X
0xAE, // INTEL_FAM6_GRANITERAPIDS_D
0x8A, // INTEL_FAM6_LAKEFIELD
0x97, // INTEL_FAM6_ALDERLAKE
0x9A, // INTEL_FAM6_ALDERLAKE_L
Expand Down
1 change: 1 addition & 0 deletions power.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ func (pt *PowerTelemetry) getBusClock(model int) (float64, error) {
cpumodel.INTEL_FAM6_SAPPHIRERAPIDS_X,
cpumodel.INTEL_FAM6_EMERALDRAPIDS_X,
cpumodel.INTEL_FAM6_GRANITERAPIDS_X,
cpumodel.INTEL_FAM6_GRANITERAPIDS_D,
cpumodel.INTEL_FAM6_LAKEFIELD,
cpumodel.INTEL_FAM6_ALDERLAKE,
cpumodel.INTEL_FAM6_ALDERLAKE_L,
Expand Down
3 changes: 2 additions & 1 deletion power_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ func TestGetBusClock(t *testing.T) {
0x8F, // INTEL_FAM6_SAPPHIRERAPIDS_X
0xCF, // INTEL_FAM6_EMERALDRAPIDS_X
0xAD, // INTEL_FAM6_GRANITERAPIDS_X
0xAE, // INTEL_FAM6_GRANITERAPIDS_D
0x8A, // INTEL_FAM6_LAKEFIELD
0x97, // INTEL_FAM6_ALDERLAKE
0x9A, // INTEL_FAM6_ALDERLAKE_L
Expand Down Expand Up @@ -829,7 +830,7 @@ func TestGetCPUTemperature(t *testing.T) {
t.Run("ModelNotSupported", func(t *testing.T) {
cpuID := 0
// CPU temp metric not supported by this model.
cpuModel := cpumodel.INTEL_FAM6_GRANITERAPIDS_D
cpuModel := cpumodel.INTEL_FAM6_CORE_YONAH

tempExp := uint64(0)

Expand Down

0 comments on commit 20ff7a1

Please sign in to comment.