Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 483 for COUNTER (0.6 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  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. platforms/software/testing-base/src/testFixtures/groovy/org/gradle/api/internal/tasks/testing/report/HtmlTestResultsFixture.groovy

            assert testDiv != null
            def counter = testDiv.select("div.counter")
            assert counter != null
            assert counter.text() == tests as String
        }
    
        void assertHasFailures(int tests) {
            def testDiv = content.select("div#failures")
            assert testDiv != null
            def counter = testDiv.select("div.counter")
            assert counter != null
            assert counter.text() == tests as String
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 20:52:40 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  10. pkg/proxy/util/nfacct/nfacct_linux_test.go

    				// validate response
    				if tc.err != nil {
    					assert.Nil(t, counter)
    					assert.ErrorContains(t, err, tc.err.Error())
    				} else {
    					assert.NotNil(t, counter)
    					assert.NoError(t, err)
    					assert.Equal(t, tc.counter.Name, counter.Name)
    					assert.Equal(t, tc.counter.Packets, counter.Packets)
    					assert.Equal(t, tc.counter.Bytes, counter.Bytes)
    				}
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 06:47:50 UTC 2024
    - 18.8K bytes
    - Viewed (0)
Back to top