Skip to content

Commit 0c1af8d

Browse files
zxhdazediscordianfish
authored andcommitted
add test
Signed-off-by: Xuhui Zhu <[email protected]>
1 parent 89a21a9 commit 0c1af8d

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

collector/fixtures/e2e-output.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,10 @@ node_hwmon_fan_target_rpm{chip="nct6779",sensor="fan2"} 27000
893893
# HELP node_hwmon_fan_tolerance Hardware monitor fan element tolerance
894894
# TYPE node_hwmon_fan_tolerance gauge
895895
node_hwmon_fan_tolerance{chip="nct6779",sensor="fan2"} 0
896+
# HELP node_hwmon_freq_freq_mhz Hardware monitor for GPU frequency in MHz
897+
# TYPE node_hwmon_freq_freq_mhz gauge
898+
node_hwmon_freq_freq_mhz{chip="hwmon4",sensor="mclk"} 300
899+
node_hwmon_freq_freq_mhz{chip="hwmon4",sensor="sclk"} 214
896900
# HELP node_hwmon_in_alarm Hardware sensor alarm status (in)
897901
# TYPE node_hwmon_in_alarm gauge
898902
node_hwmon_in_alarm{chip="nct6779",sensor="in0"} 0
@@ -1006,8 +1010,10 @@ node_hwmon_pwm_weight_temp_step_tol{chip="nct6779",sensor="pwm1"} 0
10061010
# TYPE node_hwmon_sensor_label gauge
10071011
node_hwmon_sensor_label{chip="hwmon4",label="foosensor",sensor="temp1"} 1
10081012
node_hwmon_sensor_label{chip="hwmon4",label="foosensor",sensor="temp2"} 1
1009-
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Left side ",sensor="fan1"} 1
1010-
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Right side ",sensor="fan2"} 1
1013+
node_hwmon_sensor_label{chip="hwmon4",label="mclk",sensor="freq2"} 1
1014+
node_hwmon_sensor_label{chip="hwmon4",label="sclk",sensor="freq1"} 1
1015+
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Left side",sensor="fan1"} 1
1016+
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Right side",sensor="fan2"} 1
10111017
node_hwmon_sensor_label{chip="platform_coretemp_0",label="Core 0",sensor="temp2"} 1
10121018
node_hwmon_sensor_label{chip="platform_coretemp_0",label="Core 1",sensor="temp3"} 1
10131019
node_hwmon_sensor_label{chip="platform_coretemp_0",label="Core 2",sensor="temp4"} 1

collector/fixtures/sys.ttar

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,26 @@ Lines: 1
437437
100000
438438
Mode: 644
439439
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
440+
Path: sys/class/hwmon/hwmon4/freq1_input
441+
Lines: 1
442+
214000000
443+
Mode: 644
444+
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
445+
Path: sys/class/hwmon/hwmon4/freq1_label
446+
Lines: 1
447+
sclk
448+
Mode: 644
449+
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
450+
Path: sys/class/hwmon/hwmon4/freq2_input
451+
Lines: 1
452+
300000000
453+
Mode: 644
454+
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
455+
Path: sys/class/hwmon/hwmon4/freq2_label
456+
Lines: 1
457+
mclk
458+
Mode: 644
459+
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
440460
Path: sys/class/hwmon/hwmon5
441461
SymlinkTo: ../../devices/platform/bogus.0/hwmon/hwmon5/
442462
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -1337,7 +1357,7 @@ Mode: 444
13371357
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
13381358
Path: sys/class/nvme/nvme0/model
13391359
Lines: 1
1340-
Samsung SSD 970 PRO 512GB
1360+
Samsung SSD 970 PRO 512GB
13411361
Mode: 444
13421362
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
13431363
Path: sys/class/nvme/nvme0/serial
@@ -2750,7 +2770,7 @@ Mode: 644
27502770
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
27512771
Path: sys/devices/platform/applesmc.768/fan1_label
27522772
Lines: 1
2753-
Left side
2773+
Left side
27542774
Mode: 644
27552775
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
27562776
Path: sys/devices/platform/applesmc.768/fan1_manual
@@ -2784,7 +2804,7 @@ Mode: 644
27842804
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
27852805
Path: sys/devices/platform/applesmc.768/fan2_label
27862806
Lines: 1
2787-
Right side
2807+
Right side
27882808
Mode: 644
27892809
# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
27902810
Path: sys/devices/platform/applesmc.768/fan2_manual

0 commit comments

Comments
 (0)