Home
last modified time | relevance | path

Searched refs:cache (Results 1 – 25 of 60) sorted by relevance

123

/tools/security/fuzzing/orphans/hashlink/
Dhashlink_lrucache_fuzzer.rs50 let mut cache = LruCache::new(info.capacity.into()); localVariable
54 cache.insert(key, value);
57 cache.remove(&key);
60 cache.contains_key(&key);
63 cache.get(&key);
66 cache.entry(key).or_insert(value);
69 std::hint::black_box(cache.iter().count());
72 std::hint::black_box(cache.drain().count());
75 cache.clear();
78 cache.peek(&key);
[all …]
/tools/asuite/adevice/src/
Dfingerprint.rs69 pub fn from_path(file_path: &Path, cache: &Cache) -> Result<Self> { in from_path()
77 Ok(FileMetadata::from_file(file_path, &metadata, cache)?) in from_path()
101 pub fn from_file(file_path: &Path, metadata: &fs::Metadata, cache: &Cache) -> Result<Self> { in from_file()
108 let (digest, cache_key) = get_or_compute_digest(file_path, metadata, cache)?; in from_file()
202 let cache = Cache::read().unwrap_or_default(); in fingerprint_partitions() localVariable
217 FileMetadata::from_path(&file_path, &cache).unwrap(), in fingerprint_partitions()
221 cache.write(&results)?; in fingerprint_partitions()
260 cache: &Cache, in get_or_compute_digest()
262 let cache_key = cache.cache_key(file_path, metadata)?; in get_or_compute_digest()
264 if let Some(cached_digest) = cache.get(&cache_key) { in get_or_compute_digest()
[all …]
/tools/asuite/atest/tools/
Dindexing_unittest.py71 with open(indices.classes_idx, 'rb') as cache:
72 _cache = pickle.load(cache)
75 with open(indices.packages_idx, 'rb') as cache:
76 _cache = pickle.load(cache)
79 with open(indices.fqcn_idx, 'rb') as cache:
80 _cache = pickle.load(cache)
85 with open(indices.cc_classes_idx, 'rb') as cache:
86 _cache = pickle.load(cache)
/tools/apkzlib/src/test/java/com/android/tools/build/apkzlib/utils/
DCachedFileContentsTest.java40 Object cache = new Object(); in createFileAndCheckWithNoChanges() local
43 cachedFile.closed(cache); in createFileAndCheckWithNoChanges()
46 assertSame(cache, cachedFile.getCache()); in createFileAndCheckWithNoChanges()
54 Object cache = new Object(); in createFileAndCheckChanges() local
57 cachedFile.closed(cache); in createFileAndCheckChanges()
70 Object cache = new Object(); in createFileUpdateAndCheckChanges() local
73 cachedFile.closed(cache); in createFileUpdateAndCheckChanges()
76 cachedFile.closed(cache); in createFileUpdateAndCheckChanges()
79 assertSame(cache, cachedFile.getCache()); in createFileUpdateAndCheckChanges()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/utils/
DCachedFileContents.java80 private T cache; field in CachedFileContents
100 public void closed(@Nullable T cache) { in closed() argument
101 this.cache = cache; in closed()
134 cache = null; in isValid()
149 return cache; in getCache()
/tools/tradefederation/core/src/com/android/tradefed/build/
DFileDownloadCacheFactory.java55 FileDownloadCache cache = mCacheObjectMap.get(cacheDir.getAbsolutePath()); in getCache() local
56 if (cache == null) { in getCache()
57 cache = new FileDownloadCache(cacheDir); in getCache()
58 mCacheObjectMap.put(cacheDir.getAbsolutePath(), cache); in getCache() local
60 return cache; in getCache()
/tools/tradefederation/core/src/com/android/tradefed/build/cache/
DPartialZipDownloadCache.java16 package com.android.tradefed.build.cache;
22 import com.google.common.cache.CacheBuilder;
23 import com.google.common.cache.CacheLoader;
24 import com.google.common.cache.LoadingCache;
25 import com.google.common.cache.RemovalListener;
26 import com.google.common.cache.RemovalNotification;
/tools/asuite/atest/
Datest_utils_unittest.py610 with open(portal_xml, 'w') as cache:
611 cache.write(content_portal)
612 with open(target_xml, 'w') as cache:
613 cache.write(content_manifest)
621 with open(portal_xml, 'w') as cache:
622 cache.write('<manifest></manifest>')
624 with open(default_xml, 'w') as cache:
625 cache.write(content_manifest)
631 with open(portal_xml, 'w') as cache:
632 cache.write(content_manifest)
[all …]
Datest_utils.py1086 with open(jsonfile, 'r', encoding='utf-8') as cache:
1087 return json.load(cache)
1728 with open(full_path, 'r', encoding='utf-8') as cache:
1729 for line in cache.readlines():
1840 with open(build_file, 'r', encoding='utf-8') as cache:
1841 data = cache.readlines()
1926 with open(result_html, 'w', encoding='utf-8') as cache:
1927 cache.write('<!DOCTYPE html><html><body>')
1930 cache.write(f'<h1>{"atest " + result.get("args")}</h1>')
1932 cache.write(f'<h2>{timestamp}</h2>')
[all …]
Dmodule_info.py446 with open(self.module_index, 'rb') as cache:
448 suite_to_modules = pickle.load(cache, encoding='utf-8')
450 suite_to_modules = pickle.load(cache)
1567 with tempfile.NamedTemporaryFile(delete=False) as cache:
1569 pickle.dump(contents, cache, protocol=2)
1570 shutil.move(cache.name, index_path)
1573 atest_utils.print_and_log_error('Failed in dumping %s', cache)
1574 os.remove(cache.name)
/tools/tradefederation/core/src/com/android/tradefed/util/image/
DDeviceImageTracker.java22 import com.google.common.cache.CacheBuilder;
23 import com.google.common.cache.CacheLoader;
24 import com.google.common.cache.LoadingCache;
25 import com.google.common.cache.RemovalListener;
26 import com.google.common.cache.RemovalNotification;
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/util/
DStringCache.kt24 private val cache: MutableMap<DataSlice, String> = HashMap(1_000) constant in trebuchet.util.StringCache
27 var ret = cache[slice] in stringFor()
30 cache.putIfAbsent(slice.compact(), ret) in stringFor()
/tools/asuite/atest/unittest_data/cache_root/
DREADME.md1 Theses cache files are generated by atest. To regenerate them:
3 78ea54ef315f5613f7c11dd1a87f10c7.cache -> `m atest && atest-dev -c --host hello_world_test`
5 cd66f9f5ad63b42d0d77a9334de6bb73.cache -> Open test_finders/test_info.py, and in the constructor of…
/tools/tradefederation/core/common_util/com/android/tradefed/cache/remote/
DRemoteCacheClient.java17 package com.android.tradefed.cache.remote;
25 import com.android.tradefed.cache.DigestCalculator;
26 import com.android.tradefed.cache.ExecutableAction;
27 import com.android.tradefed.cache.ExecutableActionResult;
28 import com.android.tradefed.cache.ICacheClient;
/tools/tradefederation/core/src/com/android/tradefed/util/
DGCSFileDownloader.java30 import com.google.common.cache.CacheBuilder;
31 import com.google.common.cache.CacheLoader;
32 import com.google.common.cache.LoadingCache;
232 Boolean cache = mFreshnessCache.getIfPresent(remotePath); in isFresh() local
233 if (cache != null && Boolean.TRUE.equals(cache)) { in isFresh()
/tools/tradefederation/core/javatests/com/android/tradefed/cache/remote/
DRemoteCacheClientTest.java17 package com.android.tradefed.cache.remote;
28 import com.android.tradefed.cache.DigestCalculator;
29 import com.android.tradefed.cache.ExecutableAction;
30 import com.android.tradefed.cache.ExecutableActionResult;
DByteStreamDownloaderTest.java17 package com.android.tradefed.cache.remote;
24 import com.android.tradefed.cache.DigestCalculator;
/tools/tradefederation/core/src/com/android/tradefed/build/gcs/
DGCSDownloaderHelper.java82 FileDownloadCache cache = in deleteCacheEntry() local
85 cache.deleteCacheEntry(remoteFilePath); in deleteCacheEntry()
/tools/tradefederation/core/src/com/android/tradefed/cluster/
DClusterBuildProvider.java103 final ConcurrentHashMap<String, File> cache = sDownloadCache.get(); in getBuild() local
132 File cachedFile = retrieveFile(resource.getUrl(), cache, downloader, resourceFile); in getBuild()
165 ConcurrentHashMap<String, File> cache, in retrieveFile() argument
168 return cache.computeIfAbsent( in retrieveFile()
/tools/trebuchet/trebuchet/startup-analyzer/
DREADME.md135 … /data/dalvik-cache/arm/system@framework@org.apache.http.legacy.impl.jar@classes.dex @ 0.028 ms
137 … /data/dalvik-cache/arm/system@framework@com.google.android.maps.jar@classes.dex @ 0.026 ms
139 …/data/dalvik-cache/arm/data@app@com.facebook.katana-Hu0CRasfgvX30RlV_mJxBA==@base.apk@classes.dex …
141 …/data/dalvik-cache/arm/data@app@com.facebook.katana-Hu0CRasfgvX30RlV_mJxBA==@split_codegenerator.a…
/tools/tradefederation/core/javatests/com/android/tradefed/build/
DFileDownloadCacheFuncTest.java284 FileDownloadCache cache = new FileDownloadCache(cacheRoot); in testConstructor_createCache() local
285 assertNotNull(cache.getCachedFile(REMOTE_PATH)); in testConstructor_createCache()
286 assertNotNull(cache.getCachedFile("aa/anotherpath")); in testConstructor_createCache()
287 assertEquals(REMOTE_PATH, cache.getOldestEntry()); in testConstructor_createCache()
/tools/asuite/atest/integration_tests/
Dsnapshot.py249 self.cache = self._load_cache()
254 if cache_key in self.cache:
255 return self.cache[cache_key]
262 self.cache[cache_key] = content_hash
276 json.dump(self.cache, f)
/tools/asuite/atest/bazel/resources/
Dbazelrc11 # Enforce consistent action environment variables to improve remote cache hit
24 # Enable the remote cache so that action results can be shared across machines,
/tools/tradefederation/core/javatests/com/android/tradefed/util/
DRunUtilTest.java33 import com.android.tradefed.cache.DigestCalculator;
34 import com.android.tradefed.cache.ExecutableAction;
35 import com.android.tradefed.cache.ExecutableActionResult;
36 import com.android.tradefed.cache.ICacheClient;
/tools/netsim/
D.gitignore8 .cache

123