github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/cmd/osmetric_string.go (about)

     1  // Code generated by "stringer -type=osMetric -trimprefix=osMetric os-instrumented.go"; DO NOT EDIT.
     2  
     3  package cmd
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[osMetricRemoveAll-0]
    12  	_ = x[osMetricMkdirAll-1]
    13  	_ = x[osMetricMkdir-2]
    14  	_ = x[osMetricRename-3]
    15  	_ = x[osMetricOpenFileW-4]
    16  	_ = x[osMetricOpenFileR-5]
    17  	_ = x[osMetricOpenFileWFd-6]
    18  	_ = x[osMetricOpenFileRFd-7]
    19  	_ = x[osMetricOpen-8]
    20  	_ = x[osMetricOpenFileDirectIO-9]
    21  	_ = x[osMetricLstat-10]
    22  	_ = x[osMetricRemove-11]
    23  	_ = x[osMetricStat-12]
    24  	_ = x[osMetricAccess-13]
    25  	_ = x[osMetricCreate-14]
    26  	_ = x[osMetricReadDirent-15]
    27  	_ = x[osMetricFdatasync-16]
    28  	_ = x[osMetricSync-17]
    29  	_ = x[osMetricLast-18]
    30  }
    31  
    32  const _osMetric_name = "RemoveAllMkdirAllMkdirRenameOpenFileWOpenFileROpenFileWFdOpenFileRFdOpenOpenFileDirectIOLstatRemoveStatAccessCreateReadDirentFdatasyncSyncLast"
    33  
    34  var _osMetric_index = [...]uint8{0, 9, 17, 22, 28, 37, 46, 57, 68, 72, 88, 93, 99, 103, 109, 115, 125, 134, 138, 142}
    35  
    36  func (i osMetric) String() string {
    37  	if i >= osMetric(len(_osMetric_index)-1) {
    38  		return "osMetric(" + strconv.FormatInt(int64(i), 10) + ")"
    39  	}
    40  	return _osMetric_name[_osMetric_index[i]:_osMetric_index[i+1]]
    41  }