Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 300 for counter2 (0.11 sec)

  1. src/runtime/traceback_system_test.go

    		t.Errorf("got:\n%swant:\n%s", got, want)
    	}
    }
    
    // parseStackPCs parses the parent process's program counters for the
    // first running goroutine out of a GOTRACEBACK=system traceback,
    // adjusting them so that they are valid for the child process's text
    // segment.
    //
    // This function returns only program counter values, ensuring that
    // there is no possibility of strings from the crash report (which may
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        queue.addListener(listener, directExecutor());
    
        Multiset<Object> counters = ConcurrentHashMultiset.create();
        queue.enqueue(incrementingEvent(counters, listener, 1));
        queue.enqueue(incrementingEvent(counters, listener, 2));
        queue.enqueue(incrementingEvent(counters, listener, 3));
        queue.enqueue(incrementingEvent(counters, listener, 4));
        assertEquals(0, counters.size());
        queue.dispatch();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 8.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        queue.addListener(listener, directExecutor());
    
        Multiset<Object> counters = ConcurrentHashMultiset.create();
        queue.enqueue(incrementingEvent(counters, listener, 1));
        queue.enqueue(incrementingEvent(counters, listener, 2));
        queue.enqueue(incrementingEvent(counters, listener, 3));
        queue.enqueue(incrementingEvent(counters, listener, 4));
        assertEquals(0, counters.size());
        queue.dispatch();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 8.2K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. src/internal/godebug/godebug.go

    // String returns a printable form for the setting: name=value.
    func (s *Setting) String() string {
    	return s.Name() + "=" + s.Value()
    }
    
    // IncNonDefault increments the non-default behavior counter
    // associated with the given setting.
    // This counter is exposed in the runtime/metrics value
    // /godebug/non-default-behavior/<name>:events.
    //
    // Note that Value must be called at least once before IncNonDefault.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 14:19:39 UTC 2024
    - 9.4K bytes
    - Viewed (0)
Back to top