@@ -43,6 +43,87 @@ private HotKeysResult(in RawResult result)
4343 case tracking_active . Hash when tracking_active . Is ( hash , value ) :
4444 TrackingActive = value . GetBoolean ( ) ;
4545 break ;
46+ case sample_ratio . Hash when sample_ratio . Is ( hash , value ) && value . TryGetInt64 ( out var i64 ) :
47+ SampleRatio = i64 ;
48+ break ;
49+ case selected_slots . Hash when selected_slots . Is ( hash , value ) & value . Resp2TypeArray is ResultType . Array :
50+ var len = value . ItemsCount ;
51+ if ( len == 0 ) continue ;
52+
53+ var items = value . GetItems ( ) . GetEnumerator ( ) ;
54+ var slots = new SlotRange [ len ] ;
55+ for ( int i = 0 ; i < len && items . MoveNext ( ) ; i ++ )
56+ {
57+ ref readonly RawResult pair = ref items . Current ;
58+ if ( pair . Resp2TypeArray is ResultType . Array
59+ && pair . ItemsCount == 2
60+ && pair [ 0 ] . TryGetInt64 ( out var from )
61+ && pair [ 1 ] . TryGetInt64 ( out var to ) )
62+ {
63+ slots [ i ] = new ( ( int ) from , ( int ) to ) ;
64+ }
65+ }
66+ SelectedSlots = slots ;
67+ break ;
68+ case all_commands_all_slots_us . Hash when all_commands_all_slots_us . Is ( hash , value ) && value . TryGetInt64 ( out var i64 ) :
69+ TotalCpuTimeMilliseconds = i64 ;
70+ break ;
71+ case net_bytes_all_commands_all_slots . Hash when net_bytes_all_commands_all_slots . Is ( hash , value ) && value . TryGetInt64 ( out var i64 ) :
72+ TotalNetworkBytes = i64 ;
73+ break ;
74+ case collection_start_time_unix_ms . Hash when collection_start_time_unix_ms . Is ( hash , value ) && value . TryGetInt64 ( out var i64 ) :
75+ CollectionStartTimeUnixMilliseconds = i64 ;
76+ break ;
77+ case collection_duration_ms . Hash when collection_duration_ms . Is ( hash , value ) && value . TryGetInt64 ( out var i64 ) :
78+ CollectionDurationMilliseconds = i64 ;
79+ break ;
80+ case total_cpu_time_sys_ms . Hash when total_cpu_time_sys_ms . Is ( hash , value ) && value . TryGetInt64 ( out var i64 ) :
81+ TotalCpuTimeSystemMilliseconds = i64 ;
82+ break ;
83+ case total_cpu_time_user_ms . Hash when total_cpu_time_user_ms . Is ( hash , value ) && value . TryGetInt64 ( out var i64 ) :
84+ TotalCpuTimeUserMilliseconds = i64 ;
85+ break ;
86+ case total_net_bytes . Hash when total_net_bytes . Is ( hash , value ) && value . TryGetInt64 ( out var i64 ) :
87+ TotalNetworkBytes2 = i64 ;
88+ break ;
89+ case by_cpu_time_us . Hash when by_cpu_time_us . Is ( hash , value ) & value . Resp2TypeArray is ResultType . Array :
90+ len = value . ItemsCount ;
91+ if ( len == 0 ) continue ;
92+
93+ var cpuTime = new MetricKeyCpu [ len ] ;
94+ items = value . GetItems ( ) . GetEnumerator ( ) ;
95+ for ( int i = 0 ; i < len && items . MoveNext ( ) ; i ++ )
96+ {
97+ ref readonly RawResult pair = ref items . Current ;
98+ if ( pair . Resp2TypeArray is ResultType . Array
99+ && pair . ItemsCount == 2
100+ && pair [ 1 ] . TryGetInt64 ( out var cpu ) )
101+ {
102+ cpuTime [ i ] = new ( pair [ 0 ] . AsRedisKey ( ) , cpu ) ;
103+ }
104+ }
105+
106+ CpuByKey = cpuTime ;
107+ break ;
108+ case by_net_bytes . Hash when by_net_bytes . Is ( hash , value ) & value . Resp2TypeArray is ResultType . Array :
109+ len = value . ItemsCount ;
110+ if ( len == 0 ) continue ;
111+
112+ var netBytes = new MetricKeyBytes [ len ] ;
113+ items = value . GetItems ( ) . GetEnumerator ( ) ;
114+ for ( int i = 0 ; i < len && items . MoveNext ( ) ; i ++ )
115+ {
116+ ref readonly RawResult pair = ref items . Current ;
117+ if ( pair . Resp2TypeArray is ResultType . Array
118+ && pair . ItemsCount == 2
119+ && pair [ 1 ] . TryGetInt64 ( out var bytes ) )
120+ {
121+ netBytes [ i ] = new ( pair [ 0 ] . AsRedisKey ( ) , bytes ) ;
122+ }
123+ }
124+
125+ NetworkBytesByKey = netBytes ;
126+ break ;
46127 }
47128 }
48129 }
@@ -51,6 +132,18 @@ private HotKeysResult(in RawResult result)
51132#pragma warning disable SA1134 , SA1300
52133 // ReSharper disable InconsistentNaming
53134 [ FastHash ] internal static partial class tracking_active { }
135+ [ FastHash ] internal static partial class sample_ratio { }
136+ [ FastHash ] internal static partial class selected_slots { }
137+ [ FastHash ] internal static partial class all_commands_all_slots_us { }
138+ [ FastHash ] internal static partial class net_bytes_all_commands_all_slots { }
139+ [ FastHash ] internal static partial class collection_start_time_unix_ms { }
140+ [ FastHash ] internal static partial class collection_duration_ms { }
141+ [ FastHash ] internal static partial class total_cpu_time_user_ms { }
142+ [ FastHash ] internal static partial class total_cpu_time_sys_ms { }
143+ [ FastHash ] internal static partial class total_net_bytes { }
144+ [ FastHash ] internal static partial class by_cpu_time_us { }
145+ [ FastHash ] internal static partial class by_net_bytes { }
146+
54147 // ReSharper restore InconsistentNaming
55148#pragma warning restore SA1134 , SA1300
56149}
0 commit comments