github.com/goplus/igop@v0.25.0/pkg/runtime/metrics/go121_export.go (about)

     1  // export by github.com/goplus/igop/cmd/qexp
     2  
     3  //go:build go1.21
     4  // +build go1.21
     5  
     6  package metrics
     7  
     8  import (
     9  	q "runtime/metrics"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/igop"
    15  )
    16  
    17  func init() {
    18  	igop.RegisterPackage(&igop.Package{
    19  		Name: "metrics",
    20  		Path: "runtime/metrics",
    21  		Deps: map[string]string{
    22  			"internal/godebugs": "godebugs",
    23  			"math":              "math",
    24  			"runtime":           "runtime",
    25  			"unsafe":            "unsafe",
    26  		},
    27  		Interfaces: map[string]reflect.Type{},
    28  		NamedTypes: map[string]reflect.Type{
    29  			"Description":      reflect.TypeOf((*q.Description)(nil)).Elem(),
    30  			"Float64Histogram": reflect.TypeOf((*q.Float64Histogram)(nil)).Elem(),
    31  			"Sample":           reflect.TypeOf((*q.Sample)(nil)).Elem(),
    32  			"Value":            reflect.TypeOf((*q.Value)(nil)).Elem(),
    33  			"ValueKind":        reflect.TypeOf((*q.ValueKind)(nil)).Elem(),
    34  		},
    35  		AliasTypes: map[string]reflect.Type{},
    36  		Vars:       map[string]reflect.Value{},
    37  		Funcs: map[string]reflect.Value{
    38  			"All":  reflect.ValueOf(q.All),
    39  			"Read": reflect.ValueOf(q.Read),
    40  		},
    41  		TypedConsts: map[string]igop.TypedConst{
    42  			"KindBad":              {reflect.TypeOf(q.KindBad), constant.MakeInt64(int64(q.KindBad))},
    43  			"KindFloat64":          {reflect.TypeOf(q.KindFloat64), constant.MakeInt64(int64(q.KindFloat64))},
    44  			"KindFloat64Histogram": {reflect.TypeOf(q.KindFloat64Histogram), constant.MakeInt64(int64(q.KindFloat64Histogram))},
    45  			"KindUint64":           {reflect.TypeOf(q.KindUint64), constant.MakeInt64(int64(q.KindUint64))},
    46  		},
    47  		UntypedConsts: map[string]igop.UntypedConst{},
    48  	})
    49  }