- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 525 for COUNTER (0.17 sec)
-
src/cmd/vendor/golang.org/x/telemetry/counter/counter.go
// each time the corresponding event is observed. // // Although it is possible to use New to create // a Counter each time a particular event needs to be recorded, // that usage fails to amortize the construction cost over // multiple calls to Add, so it is more expensive and not recommended. type Counter = counter.Counter // A StackCounter is the in-memory knowledge about a stack counter.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 15 18:02:34 UTC 2024 - 4.2K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/telemetry/internal/counter/counter.go
return &Counter{name: name, file: &defaultFile} } // Inc adds 1 to the counter. func (c *Counter) Inc() { c.Add(1) } // Add adds n to the counter. n cannot be negative, as counts cannot decrease. func (c *Counter) Add(n int64) { debugPrintf("Add %q += %d", c.name, n) if n < 0 { panic("Counter.Add negative") } if n == 0 { return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 10.3K bytes - Viewed (0) -
pkg/monitoring/counter.go
api "go.opentelemetry.io/otel/metric" "istio.io/istio/pkg/log" ) type counter struct { 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),
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 17 20:25:52 UTC 2023 - 1.7K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental_reader_test.cc
void IncrementCounter0(TFE_MonitoringCounter0* counter, int64_t delta = 1); void IncrementCounter1(TFE_MonitoringCounter1* counter, const char* label, int64_t delta = 1); TEST(CAPI, MonitoringCellReader0) { auto counter_name = "test/counter0"; auto* counter = CreateCounter0(counter_name); auto* reader = TFE_MonitoringNewCounterReader(counter_name); IncrementCounter0(counter);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 20 03:14:47 UTC 2023 - 2.9K bytes - Viewed (0) -
src/cmd/internal/telemetry/telemetry.go
}) } // Inc increments the counter with the given name. func Inc(name string) { counter.Inc(name) } // NewCounter returns a counter with the given name. func NewCounter(name string) *counter.Counter { return counter.New(name) } // NewStackCounter returns a new stack counter with the given name and depth. func NewStackCounter(name string, depth int) *counter.StackCounter { return counter.NewStack(name, depth)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:47:30 UTC 2024 - 3.6K bytes - Viewed (0) -
tests/test_dependency_cache.py
app = FastAPI() counter_holder = {"counter": 0} async def dep_counter(): counter_holder["counter"] += 1 return counter_holder["counter"] async def super_dep(count: int = Depends(dep_counter)): return count @app.get("/counter/") async def get_counter(count: int = Depends(dep_counter)): return {"counter": count} @app.get("/sub-counter/") async def get_sub_counter(
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Tue Aug 23 13:30:24 UTC 2022 - 2.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/promise/counting_test.go
goGetAndExpect(t, clock, counter, wr, gots, aval) } func TestCountingWriteOnceCancel(t *testing.T) { oldTime := time.Now() cval := &oldTime clock, counter := testeventclock.NewFake(oldTime, 0, nil) ctx, cancel := context.WithCancel(context.Background()) var lock sync.Mutex wr := NewCountingWriteOnce(counter, &lock, nil, ctx.Done(), cval) gots := make(chan interface{}, 1) goGetExpectNotYet(t, clock, counter, wr, gots, "cancel")
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 10 14:37:53 UTC 2021 - 4.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CountingInputStreamTest.java
assertEquals(-1, counter.read(new byte[30])); assertEquals(20, counter.getCount()); } @SuppressWarnings("CheckReturnValue") // calling read() to skip a byte public void testMark() throws Exception { assertTrue(counter.markSupported()); assertEquals(10, counter.read(new byte[10])); assertEquals(10, counter.getCount()); counter.mark(5); counter.read();
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CountingOutputStreamTest.java
counter.write(data, 0, 5); written += 5; assertEquals(written, out.size()); assertEquals(written, counter.getCount()); counter.write(data, 2, 5); written += 5; assertEquals(written, out.size()); assertEquals(written, counter.getCount()); // Test that illegal arguments do not affect count
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 1.9K bytes - Viewed (0) -
pkg/scheduler/metrics/metric_recorder_test.go
"testing" ) var _ MetricRecorder = &fakePodsRecorder{} type fakePodsRecorder struct { counter int64 } func (r *fakePodsRecorder) Inc() { atomic.AddInt64(&r.counter, 1) } func (r *fakePodsRecorder) Dec() { atomic.AddInt64(&r.counter, -1) } func (r *fakePodsRecorder) Clear() { atomic.StoreInt64(&r.counter, 0) } func TestInc(t *testing.T) { fakeRecorder := fakePodsRecorder{}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 09 00:51:07 UTC 2019 - 2.2K bytes - Viewed (0)