You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: runtime_stats.go
    path of file: ./repos/atlantis/server/scheduled
    
    the code of the file until where you have to start completion: package scheduled

import (
	"runtime"

	tally "github.com/uber-go/tally/v4"
)

type RuntimeStatCollector struct {
	runtimeMetrics runtimeMetrics
}

type runtimeMetrics struct {
	cpuGoroutines tally.Gauge
	cpuCgoCalls   tally.Gauge

	memoryAlloc   tally.Gauge
	memoryTotal   tally.Gauge
	memorySys     tally.Gauge
	memoryLookups tally.Gauge
	memoryMalloc  tally.Gauge
	memoryFrees   tally.Gauge

	memoryHeapAlloc    tally.Gauge
	memoryHeapSys      tally.Gauge
	memoryHeapIdle     tally.Gauge
	memoryHeapInuse    tally.Gauge
	memoryHeapReleased tally.Gauge
	memoryHeapObjects  tally.Gauge

	memoryStackInuse       tally.Gauge
	memoryStackSys         tally.Gauge
	memoryStackMSpanInuse  tally.Gauge
	memoryStackMSpanSys    tally.Gauge
	memoryStackMCacheInuse tally.Gauge
	memoryStackMCacheSys   tally.Gauge

	memoryOtherSys tally.Gauge

	memoryGCSys        tally.Gauge
	memoryGCNext       tally.Gauge
	memoryGCLast       tally.Gauge
	memoryGCPauseTotal tally.Gauge
	memoryGCCount      tally.Gauge
}

func NewRuntimeStats(scope tally.Scope) *RuntimeStatCollector {
	runtimeScope := scope.SubScope("runtime")
	cpuScope := runtimeScope.SubScope("cpu")
	memoryScope := runtimeScope.SubScope("memory")
	heapScope := memoryScope.SubScope("heap")
	stackScope := memoryScope.SubScope("stack")
	gcScope := memoryScope.SubScope("gc")
	runtimeMetrics := runtimeMetrics{
		// cpu
		cpuGoroutines: cpuScope.Gauge("goroutines"),
		cpuCgoCalls:   cpuScope.Gauge("cgo_calls"),
		// memory
		memoryAlloc:   memoryScope.Gauge("alloc"),
		memoryTotal:   memoryScope.Gauge("total"),
		memorySys:     memorySc
    
func NewRuntimeStats(scope tally.Scope) *RuntimeStatCollector {
	runtimeScope := scope.SubScope("runtime")
	cpuScope := runtimeScope.SubScope("cpu")
	memoryScope := runtimeScope.SubScope("memory")
	heapScope := memoryScope.SubScope("heap")
	stackScope := memoryScope.SubScope("stack")
	gcScope := memoryScope.SubScope("gc")
	runtimeMetrics := runtimeMetrics{
		// cpu
		cpuGoroutines: cpuScope.Gauge("goroutines"),
		cpuCgoCalls:   cpuScope.Gauge("cgo_calls"),
		// memory
		memoryAlloc:   memoryScope.Gauge("alloc"),
		memoryTotal:   memoryScope.Gauge("total"),
		memorySys:     memoryScope.Gauge("sys"),
		memoryLookups: memoryScope.Gauge("lookups"),
		memoryMalloc:  memoryScope.Gauge("malloc"),
		memoryFrees:   memoryScope.Gauge("frees"),
		// heap
		memoryHeapAlloc:    heapScope.Gauge("alloc"),
		memoryHeapSys:      heapScope.Gauge("sys"),
		memoryHeapIdle:     heapScope.Gauge("idle"),
		memoryHeapInuse:    heapScope.Gauge("inuse"),
		memoryHeapReleased: heapScope.Gauge("released"),
		memoryHeapObjects:  heapScope.Gauge("objects"),
		// stack
		memoryStackInuse:       stackScope.Gauge("inuse"),
		memoryStackSys:         stackScope.Gauge("sys"),
		memoryStackMSpanInuse:  stackScope.Gauge("mspan_inuse"),
		memoryStackMSpanSys:    stackScope.Gauge("sys"),
		memoryStackMCacheInuse: stackScope.Gauge("mcache_inuse"),
		memoryStackMCacheSys:   stackScope.Gauge("mcache_sys"),
		memoryOtherSys:         memoryScope.Gauge("othersys"),
		// GC
		memoryGCSys:        gcScope.Gauge("sys"),
		memoryGCNext:       gcScope.Gauge("next"),
		memoryGCLast:       gcScope.Gauge("last"),
		memoryGCPauseTotal: gcScope.Gauge("pause_total"),
		memoryGCCount:      gcScope.Gauge("count"),
	}

	return &RuntimeStatCollector{
		runtimeMetrics: runtimeMetrics,
	}
}