| /external/webrtc/common_video/ |
| D | video_frame_buffer_pool_unittest.cc | 4 * Use of this source code is governed by a BSD-style license 19 #include "test/gtest.h" 23 TEST(TestVideoFrameBufferPool, SimpleFrameReuse) { in TEST() function 24 VideoFrameBufferPool pool; in TEST() local 25 auto buffer = pool.CreateI420Buffer(16, 16); in TEST() 26 EXPECT_EQ(16, buffer->width()); in TEST() 27 EXPECT_EQ(16, buffer->height()); in TEST() 28 // Extract non-refcounted pointers for testing. in TEST() 29 const uint8_t* y_ptr = buffer->DataY(); in TEST() 30 const uint8_t* u_ptr = buffer->DataU(); in TEST() [all …]
|
| /external/rust/crates/futures-executor/tests/ |
| D | local_pool.rs | 18 fn poll(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<()> { in poll() 23 fn pending() -> Pending { in pending() 27 #[test] 32 let mut pool = LocalPool::new(); in run_until_single_future() localVariable 36 pool.run_until(fut); in run_until_single_future() 42 #[test] 44 let mut pool = LocalPool::new(); in run_until_ignores_spawned() localVariable 45 let spawn = pool.spawner(); in run_until_ignores_spawned() 47 pool.run_until(lazy(|_| ())); in run_until_ignores_spawned() 50 #[test] [all …]
|
| /external/cronet/third_party/protobuf/python/google/protobuf/internal/ |
| D | descriptor_pool_test.py | 1 # Protocol Buffers - Google's data interchange format 3 # https://developers.google.com/protocol-buffers/ 68 file_desc1 = self.pool.FindFileByName(name1) 75 file_desc2 = self.pool.FindFileByName(name2) 83 self.pool.FindFileByName('Does not exist') 86 file_desc1 = self.pool.FindFileContainingSymbol( 94 file_desc2 = self.pool.FindFileContainingSymbol( 103 file_desc3 = self.pool.FindFileContainingSymbol( 110 file_desc4 = self.pool.FindFileContainingSymbol( 116 file_desc5 = self.pool.FindFileContainingSymbol( [all …]
|
| /external/protobuf/python/google/protobuf/internal/ |
| D | descriptor_pool_test.py | 1 # Protocol Buffers - Google's data interchange format 3 # https://developers.google.com/protocol-buffers/ 68 file_desc1 = self.pool.FindFileByName(name1) 75 file_desc2 = self.pool.FindFileByName(name2) 83 self.pool.FindFileByName('Does not exist') 86 file_desc1 = self.pool.FindFileContainingSymbol( 94 file_desc2 = self.pool.FindFileContainingSymbol( 103 file_desc3 = self.pool.FindFileContainingSymbol( 110 file_desc4 = self.pool.FindFileContainingSymbol( 116 file_desc5 = self.pool.FindFileContainingSymbol( [all …]
|
| /external/rust/crates/sharded-slab/src/tests/ |
| D | loom_pool.rs | 2 use crate::{clear::Clear, sync::alloc, Pack, Pool}; 32 fn eq(&self, other: &State) -> bool { in eq() 41 fn eq(&self, other: &DontDropMe) -> bool { in eq() 47 fn new(id: usize) -> (Arc<State>, Self) { in new() 59 test_println!("-> DontDropMe drop: dropping data {:?}", self.0.id); in drop() 66 test_println!("-> DontDropMe clear: clearing data {:?}", self.0.id); in clear() 71 #[test] 74 let pool: Pool<DontDropMe> = Pool::new(); in dont_drop() localVariable 76 test_println!("-> dont_drop: Inserting into pool {}", item1.id); in dont_drop() 77 let idx = pool in dont_drop() [all …]
|
| /external/angle/infra/specs/ |
| D | angle.json | 4 "android-arm64-exp-pixel6": { 8 "--use-angle=vulkan", 9 "-v", 10 "--shard-timeout=500" 23 "pool": "chromium.tests.gpu" string 26 "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", 29 "test": "angle_deqp_egl_tests", string 35 "--use-angle=vulkan", 36 "-v", 37 "--shard-timeout=500" [all …]
|
| /external/tensorflow/tensorflow/core/common_runtime/gpu/ |
| D | pool_allocator_test.cc | 7 http://www.apache.org/licenses/LICENSE-2.0 23 #include "tensorflow/core/platform/test.h" 27 TEST(PoolAllocatorTest, ZeroSizeBuffers) { in TEST() function 31 PoolAllocator pool( in TEST() local 34 platform->GetExecutor(se::StreamExecutorConfig(/*ordinal=*/0)) in TEST() 37 new NoopRounder, "pool"); in TEST() 39 EXPECT_EQ(nullptr, pool.AllocateRaw(4 /*alignment*/, 0 /*num_bytes*/)); in TEST() 40 pool.DeallocateRaw(nullptr); // Should not crash. in TEST() 41 EXPECT_EQ(0, pool.get_from_pool_count()); in TEST() 42 EXPECT_EQ(0, pool.put_count()); in TEST() [all …]
|
| /external/rust/crates/threadpool/src/ |
| D | lib.rs | 2 // file at the top-level directory of this distribution and at 3 // http://rust-lang.org/COPYRIGHT. 5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 11 //! A thread pool used to execute functions in parallel. 13 //! Spawns a specified number of worker threads and replenishes the pool if any worker threads 28 //! let pool = ThreadPool::new(n_workers); 33 //! pool.execute(move|| { 34 //! tx.send(1).expect("channel will be there waiting for the pool"); [all …]
|
| /external/autotest/server/site_tests/hardware_StorageQualCheckSetup/ |
| D | hardware_StorageQualCheckSetup.py | 3 # Use of this source code is governed by a BSD-style license that can be 9 from autotest_lib.server import test 12 class hardware_StorageQualCheckSetup(test.test): 16 At least one pool (the default "no pool" counts as a pool) 18 one DUT in the pool. 20 per pool 22 The test will verify this set up, for the pool that is selected on the 23 RunSuite page (by getting the pool of the DUT running the test). If this 24 test passes, we have confidence that this individual pool is a valid setup 39 if 'pool:' in label: [all …]
|
| /external/crosvm/resources/src/ |
| D | address_allocator.rs | 2 // Use of this source code is governed by a BSD-style license that can be 18 /// An human-readable tag String must also be provided for debugging / reference. 34 /// Can return an error if `pool` is empty or if alignment isn't a power of two. 36 /// * `pool` - The address range to allocate from. 37 /// * `min_align` - The minimum size of an address region to align to, defaults to four. 38 /// * `preferred_align` - The preferred alignment of an address region, used if possible. 43 pool: AddressRange, in new() 46 ) -> Result<Self> { in new() 47 Self::new_from_list(vec![pool], min_align, preferred_align) in new() 53 /// * `pools` - The list of pools to initialize the allocator with. [all …]
|
| /external/python/cpython2/Doc/includes/ |
| D | mp_pool.py | 2 # A test of `multiprocessing.Pool` class 4 # Copyright (c) 2006-2008, R Oudkerk 14 # Functions used by test code 36 return 1.0 / (x-5.0) 45 # Test code 48 def test(): function 52 # Create pool 56 print 'Creating pool with %d processes\n' % PROCESSES 57 pool = multiprocessing.Pool(PROCESSES) 58 print 'pool = %s' % pool [all …]
|
| /external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
| D | ConnectionPoolTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 28 import org.junit.Test; 47 @Test public void connectionsEvictedWhenIdleLongEnough() throws Exception { in connectionsEvictedWhenIdleLongEnough() 48 ConnectionPool pool = new ConnectionPool(Integer.MAX_VALUE, 100L, TimeUnit.NANOSECONDS); in connectionsEvictedWhenIdleLongEnough() local 49 pool.setCleanupRunnableForTest(emptyRunnable); in connectionsEvictedWhenIdleLongEnough() 51 RealConnection c1 = newConnection(pool, routeA1, 50L); in connectionsEvictedWhenIdleLongEnough() 53 // Running at time 50, the pool returns that nothing can be evicted until time 150. in connectionsEvictedWhenIdleLongEnough() 54 assertEquals(100L, pool.cleanup(50L)); in connectionsEvictedWhenIdleLongEnough() 55 assertEquals(1, pool.getConnectionCount()); in connectionsEvictedWhenIdleLongEnough() 58 // Running at time 60, the pool returns that nothing can be evicted until time 150. in connectionsEvictedWhenIdleLongEnough() [all …]
|
| /external/rust/crates/rayon-core/src/thread_pool/ |
| D | test.rs | 1 #![cfg(test)] 9 #[test] 18 #[test] 24 // once we exit this block, thread-pool will be dropped in workers_stop() 35 // once thread-pool is dropped, registry should terminate, which in workers_stop() 42 join(|| join_a_lot(n - 1), || join_a_lot(n - 1)); in join_a_lot() 46 #[test] 54 // once we exit this block, thread-pool will be dropped in sleeper_stop() 58 // Give time for at least some of the thread pool to fall asleep. in sleeper_stop() 62 // once thread-pool is dropped, registry should terminate, which in sleeper_stop() [all …]
|
| /external/federated-compute/fcp/base/ |
| D | scheduler_test.cc | 8 * http://www.apache.org/licenses/LICENSE-2.0 33 // This is sound because the test methods do not return before the thread 34 // pool has become idle (pool->WaitUntilIdle()). 37 TEST(ThreadPool, TasksAreExecuted) { in TEST() function 38 auto pool = CreateThreadPoolScheduler(2); in TEST() local 42 pool->Schedule([&b1]() { b1 = true; }); in TEST() 43 pool->Schedule([&b2]() { b2 = true; }); in TEST() 45 pool->WaitUntilIdle(); in TEST() 51 // Tests whether the pool uses actually multiple threads to execute tasks. 52 // The test goal is achieved by blocking in one task until another task [all …]
|
| /external/volley/core/src/test/java/com/android/volley/toolbox/ |
| D | PoolingByteArrayOutputStreamTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 23 import org.junit.Test; 26 @Test 28 ByteArrayPool pool = new ByteArrayPool(32768); in pooledOneBuffer() local 29 writeOneBuffer(pool); in pooledOneBuffer() 30 writeOneBuffer(pool); in pooledOneBuffer() 31 writeOneBuffer(pool); in pooledOneBuffer() 34 @Test 36 ByteArrayPool pool = new ByteArrayPool(32768); in pooledIndividualWrites() local 37 writeBytesIndividually(pool); in pooledIndividualWrites() [all …]
|
| D | ByteArrayPoolTest.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 23 import org.junit.Test; 26 @Test 28 ByteArrayPool pool = new ByteArrayPool(32); in reusesBuffer() local 30 byte[] buf1 = pool.getBuf(16); in reusesBuffer() 31 byte[] buf2 = pool.getBuf(16); in reusesBuffer() 33 pool.returnBuf(buf1); in reusesBuffer() 34 pool.returnBuf(buf2); in reusesBuffer() 36 byte[] buf3 = pool.getBuf(16); in reusesBuffer() 37 byte[] buf4 = pool.getBuf(16); in reusesBuffer() [all …]
|
| /external/python/cpython3/Doc/includes/ |
| D | mp_pool.py | 7 # Functions used by test code 29 return 1.0 / (x - 5.0) 38 # Test code 41 def test(): function 43 print('Creating pool with %d processes\n' % PROCESSES) 45 with multiprocessing.Pool(PROCESSES) as pool: 53 results = [pool.apply_async(calculate, t) for t in TASKS] 54 imap_it = pool.imap(calculatestar, TASKS) 55 imap_unordered_it = pool.imap_unordered(calculatestar, TASKS) 57 print('Ordered results using pool.apply_async():') [all …]
|
| /external/rust/crates/tokio/src/fs/file/ |
| D | tests.rs | 12 #[test] 24 assert_eq!(0, pool::len()); in open_read() 27 assert_eq!(1, pool::len()); in open_read() 29 pool::run_one(); in open_read() 38 #[test] 53 assert_eq!(pool::len(), 1); in read_twice_before_dispatch() 54 pool::run_one(); in read_twice_before_dispatch() 62 #[test] 78 pool::run_one(); in read_with_smaller_buf() 95 assert_eq!(0, pool::len()); in read_with_smaller_buf() [all …]
|
| /external/cronet/base/android/junit/src/org/chromium/base/ |
| D | DiscardableReferencePoolTest.java | 2 // Use of this source code is governed by a BSD-style license that can be 8 import org.junit.Test; 13 import org.chromium.base.test.BaseRobolectricTestRunner; 22 * Tests that draining the pool clears references and allows objects to be garbage collected. 24 @Test 26 DiscardableReferencePool pool = new DiscardableReferencePool(); in testDrain() local 31 DiscardableReference<Object> discardableReference = pool.put(object); in testDrain() 34 // Drop reference to the object itself, to allow it to be garbage-collected. in testDrain() 37 pool.drain(); in testDrain() 43 // null (it could be if a GC has happened since the pool was drained). It should be in testDrain() [all …]
|
| /external/rust/crates/grpcio-sys/grpc/tools/run_tests/performance/templates/ |
| D | loadtest_template_basic_all_languages.yaml | 1 # Template generated from load test configurations by loadtest_template.py. 5 # used to generate load test configurations by selecting clients and servers for 7 # test configurations or load test configuration templates. Load test 17 - build: 19 - bash 20 - /build_scripts/build_qps_worker.sh 25 pool: ${client_pool} 27 - args: 28 - -c 29 - | [all …]
|
| /external/grpc-grpc/tools/run_tests/performance/templates/ |
| D | loadtest_template_basic_all_languages.yaml | 1 # Template generated from load test configurations by loadtest_template.py. 5 # used to generate load test configurations by selecting clients and servers for 7 # test configurations or load test configuration templates. Load test 17 - build: 19 - bash 20 - /build_scripts/build_qps_worker.sh 25 pool: ${client_pool} 27 - args: 28 - -c 29 - | [all …]
|
| /external/webrtc/infra/specs/ |
| D | client.webrtc.perf.json | 9 "--remove", 10 "--android", 11 "--adb-path", 12 "../../third_party/android_sdk/public/platform-tools/adb", 13 "--isolated-script-test-perf-output=${ISOLATED_OUTDIR}/perftest-output.pb" 17 "--test-suite", 35 "pool": "WebRTC-perf" string 41 "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" 43 "test": "low_bandwidth_audio_perf_test", string 48 "--isolated-script-test-perf-output=${ISOLATED_OUTDIR}/perftest-output.pb", [all …]
|
| /external/rust/crates/tokio/src/runtime/tests/ |
| D | loom_multi_thread_alt.rs | 8 /// Use `LOOM_MAX_PREEMPTIONS=1` to do a "quick" run as a smoke test. 37 pub(super) fn new(value: T) -> Self { in new() 44 pub(super) fn take(&self) -> Option<T> { in take() 66 fn new(sender: oneshot::Sender<T>) -> Self { in new() 81 #[test] 84 let pool = mk_pool(1); in racy_shutdown() localVariable 88 … // a worker that still has tasks in its local queue gets sent to the blocking pool (due to in racy_shutdown() 89 // block_in_place). the blocking pool is shut down, so drops the worker. the worker's in racy_shutdown() 93 // and then immediately drop the pool. in racy_shutdown() 95 pool.spawn(track(async { in racy_shutdown() [all …]
|
| D | loom_multi_thread.rs | 8 /// Use `LOOM_MAX_PREEMPTIONS=1` to do a "quick" run as a smoke test. 37 pub(super) fn new(value: T) -> Self { in new() 44 pub(super) fn take(&self) -> Option<T> { in take() 66 fn new(sender: oneshot::Sender<T>) -> Self { in new() 81 #[test] 84 let pool = mk_pool(1); in racy_shutdown() localVariable 88 … // a worker that still has tasks in its local queue gets sent to the blocking pool (due to in racy_shutdown() 89 // block_in_place). the blocking pool is shut down, so drops the worker. the worker's in racy_shutdown() 93 // and then immediately drop the pool. in racy_shutdown() 95 pool.spawn(track(async { in racy_shutdown() [all …]
|
| /external/perfetto/src/trace_processor/db/column/ |
| D | string_storage_unittest.cc | 8 * http://www.apache.org/licenses/LICENSE-2.0 30 #include "test/gtest_and_gmock.h" 41 TEST(StringStorage, SearchOneElement) { in TEST() function 45 StringPool pool; in TEST() local 47 ids.push_back(pool.InternString(base::StringView(string))); in TEST() 51 StringStorage storage(&pool, &ids); in TEST() 54 ASSERT_EQ(chain->SingleSearch(FilterOp::kEq, SqlValue::String("pierogi"), 4), in TEST() 56 ASSERT_EQ(chain->SingleSearch(FilterOp::kEq, SqlValue::String("pierogi"), 3), in TEST() 59 ASSERT_EQ(chain->SingleSearch(FilterOp::kNe, SqlValue::String("foo"), 0), in TEST() 61 ASSERT_EQ(chain->SingleSearch(FilterOp::kNe, SqlValue::String("pierogi"), 0), in TEST() [all …]
|