Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for SetNowSeconds (0.17 sec)

  1. tensorflow/c/experimental/filesystem/plugins/gcs/expiring_lru_cache_test.cc

          1, 0, [&env]() { return env->NowSeconds(); });
      env->SetNowSeconds(1);
      // Verify that replacement of an existing element works, and updates the
      // timestamp of the entry.
      cache.Insert(key, 41);
      env->SetNowSeconds(2);
      cache.Insert(key, 42);
      // 1 second after the most recent insertion, the entry is still valid.
      env->SetNowSeconds(3);
      int value = 0;
      EXPECT_TRUE(cache.Lookup(key, &value));
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 09 19:31:22 GMT 2020
    - 7.1K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

      // greater than 2).
      for (int i = 1; i <= 10; i++) {
        env->SetNowSeconds(i + 1);
        TF_EXPECT_OK(ReadCache(&cache1, "", 0, 1, &out));
        EXPECT_EQ(calls, 1 + i / 3);
      }
      // Now create a cache with max staleness of 0, and verify that it also works
      // as expected.
      calls = 0;
      env->SetNowSeconds(0);
      tf_gcs_filesystem::RamFileBlockCache cache2(
          8, 16, 0 /* max staleness */, fetcher,
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:57 GMT 2021
    - 23.2K bytes
    - Viewed (0)
Back to top