Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 39 for newCounter (0.31 sec)

  1. pkg/monitoring/counter.go

    	baseMetric
    	c api.Float64Counter
    	// precomputedAddOption is just a precomputation to avoid allocations on each record call
    	precomputedAddOption []api.AddOption
    }
    
    var _ Metric = &counter{}
    
    func newCounter(o options) *counter {
    	c, err := meter().Float64Counter(o.name,
    		api.WithDescription(o.description),
    		api.WithUnit(string(o.unit)))
    	if err != nil {
    		log.Fatalf("failed to create counter: %v", err)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  2. pkg/registry/core/service/ipallocator/controller/metrics.go

    		},
    		[]string{"type"},
    	)
    	// clusterIPRepairReconcileErrors indicates the number of times the repair loop has failed to repair
    	// the errors it detected.
    	clusterIPRepairReconcileErrors = metrics.NewCounter(
    		&metrics.CounterOpts{
    			Namespace:      namespace,
    			Subsystem:      subsystem,
    			Name:           "reconcile_errors_total",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 30 15:46:06 UTC 2023
    - 2K bytes
    - Viewed (0)
  3. src/cmd/go/internal/help/help.go

    import (
    	"bufio"
    	"fmt"
    	"io"
    	"os"
    	"strings"
    	"text/template"
    	"unicode"
    	"unicode/utf8"
    
    	"cmd/go/internal/base"
    	"cmd/internal/telemetry"
    )
    
    var counterErrorsHelpUnknownTopic = telemetry.NewCounter("go/errors:help-unknown-topic")
    
    // Help implements the 'help' command.
    func Help(w io.Writer, args []string) {
    	// 'go help documentation' generates doc.go.
    	if len(args) == 1 && args[0] == "documentation" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  4. src/cmd/go/internal/toolchain/switch.go

    	fmt.Fprintf(os.Stderr, "go: %v requires go >= %v; switching to %v\n", s.TooNew.What, s.TooNew.GoVersion, tv)
    	counterSwitchExec.Inc()
    	Exec(tv)
    	panic("unreachable")
    }
    
    var counterSwitchExec = telemetry.NewCounter("go/toolchain/switch-exec")
    
    // SwitchOrFatal attempts a toolchain switch based on the information in err
    // and otherwise falls back to base.Fatal(err).
    func SwitchOrFatal(ctx context.Context, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 7K bytes
    - Viewed (0)
  5. pkg/monitoring/monitoring.go

    		Name:        name,
    		Type:        "Sum",
    		Description: description,
    	})
    	o, dm := createOptions(name, description, opts...)
    	if dm != nil {
    		return dm
    	}
    	return newCounter(o)
    }
    
    // NewGauge creates a new Gauge Metric. That means that data collected by the new
    // Metric will export only the last recorded value.
    func NewGauge(name, description string, opts ...Options) Metric {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 24 03:31:28 UTC 2023
    - 9.5K bytes
    - Viewed (0)
  6. pkg/kubelet/winstats/network_stats_test.go

    }
    
    func TestNetworkGetDataFailures(t *testing.T) {
    	netCounter := newFakedNetworkCounters(true)
    
    	_, err := netCounter.getData()
    	expectedMsg := "Expected getDataList error."
    	if err == nil || err.Error() != expectedMsg {
    		t.Fatalf("expected error message `%s` but got `%v`", expectedMsg, err)
    	}
    
    	_, err = netCounter.getData()
    	netCounter.packetsReceivedPerSecondCounter.(*fakePerfCounterImpl).raiseError = false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 13 12:08:15 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  7. src/go/types/pointer.go

    // license that can be found in the LICENSE file.
    
    package types
    
    // A Pointer represents a pointer type.
    type Pointer struct {
    	base Type // element type
    }
    
    // NewPointer returns a new pointer type for the given element (base) type.
    func NewPointer(elem Type) *Pointer { return &Pointer{base: elem} }
    
    // Elem returns the element type for the given pointer p.
    func (p *Pointer) Elem() Type { return p.base }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 761 bytes
    - Viewed (0)
  8. pkg/kubelet/volumemanager/metrics/metrics_test.go

    	if err != nil {
    		t.Fatalf("AddPodToVolume failed. Expected: <no error> Actual: <%v>", err)
    	}
    
    	mounter, err := fakePlugin.NewMounter(volumeSpec, pod, volume.VolumeOptions{})
    	if err != nil {
    		t.Fatalf("NewMounter failed. Expected: <no error> Actual: <%v>", err)
    	}
    
    	mapper, err := fakePlugin.NewBlockVolumeMapper(volumeSpec, pod, volume.VolumeOptions{})
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 00:37:30 UTC 2023
    - 4K bytes
    - Viewed (0)
  9. src/go/types/typestring_test.go

    	for _, test := range []struct {
    		typ  Type
    		this *Package
    		want string
    	}{
    		{nil, nil, "<nil>"},
    		{pT, nil, "p.T"},
    		{pT, p, "T"},
    		{pT, q, "p.T"},
    		{NewPointer(pT), p, "*T"},
    		{NewPointer(pT), q, "*p.T"},
    	} {
    		qualifier := func(pkg *Package) string {
    			if pkg != test.this {
    				return pkg.Name()
    			}
    			return ""
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 28 17:58:07 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  10. pkg/volume/noop_expandable_plugin.go

    	return true
    }
    
    func (n *noopExpandableVolumePluginInstance) RequiresRemount(spec *Spec) bool {
    	return false
    }
    
    func (n *noopExpandableVolumePluginInstance) NewMounter(spec *Spec, podRef *v1.Pod, opts VolumeOptions) (Mounter, error) {
    	return nil, nil
    }
    
    func (n *noopExpandableVolumePluginInstance) NewUnmounter(name string, podUID types.UID) (Unmounter, error) {
    	return nil, nil
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top