@@ -289,10 +289,10 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
289
289
}
290
290
// Start system runtime metrics collection
291
291
go func () {
292
- used := metrics .GetOrRegisterMeter ("system/memory/used" , metrics .DefaultRegistry )
293
- total := metrics .GetOrRegisterMeter ("system/memory/total" , metrics .DefaultRegistry )
294
- mallocs := metrics .GetOrRegisterMeter ("system/memory/mallocs" , metrics .DefaultRegistry )
292
+ allocs := metrics .GetOrRegisterMeter ("system/memory/allocs" , metrics .DefaultRegistry )
295
293
frees := metrics .GetOrRegisterMeter ("system/memory/frees" , metrics .DefaultRegistry )
294
+ inuse := metrics .GetOrRegisterMeter ("system/memory/inuse" , metrics .DefaultRegistry )
295
+ pauses := metrics .GetOrRegisterMeter ("system/memory/pauses" , metrics .DefaultRegistry )
296
296
297
297
stats := make ([]* runtime.MemStats , 2 )
298
298
for i := 0 ; i < len (stats ); i ++ {
@@ -301,10 +301,10 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
301
301
for i := 1 ; ; i ++ {
302
302
runtime .ReadMemStats (stats [i % 2 ])
303
303
304
- used .Mark (int64 (stats [i % 2 ].Alloc - stats [(i - 1 )% 2 ].Alloc ))
305
- total .Mark (int64 (stats [i % 2 ].TotalAlloc - stats [(i - 1 )% 2 ].TotalAlloc ))
306
- mallocs .Mark (int64 (stats [i % 2 ].Mallocs - stats [(i - 1 )% 2 ].Mallocs ))
304
+ allocs .Mark (int64 (stats [i % 2 ].Mallocs - stats [(i - 1 )% 2 ].Mallocs ))
307
305
frees .Mark (int64 (stats [i % 2 ].Frees - stats [(i - 1 )% 2 ].Frees ))
306
+ inuse .Mark (int64 (stats [i % 2 ].Alloc - stats [(i - 1 )% 2 ].Alloc ))
307
+ pauses .Mark (int64 (stats [i % 2 ].PauseTotalNs - stats [(i - 1 )% 2 ].PauseTotalNs ))
308
308
309
309
time .Sleep (3 * time .Second )
310
310
}
0 commit comments