MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / SetConfig

Method SetConfig

tensorflow/core/platform/cloud/gcs_throttle.cc:43–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void GcsThrottle::SetConfig(GcsThrottleConfig config) {
44 mutex_lock l(mu_);
45 config_ = config;
46 available_tokens_ = config.initial_tokens;
47 last_updated_secs_ = env_time_->NowSeconds();
48}
49
50void GcsThrottle::UpdateState() {
51 // TODO(b/72643279): Switch to a monotonic clock.

Callers 2

GcsFileSystemMethod · 0.80
GcsThrottleTestMethod · 0.80

Calls 1

NowSecondsMethod · 0.45

Tested by 1

GcsThrottleTestMethod · 0.64