Previously, a hardlink returned its target's MemorySize, which
overreported the size of a tree in which a collection or project was
reachable by multiple paths.
Since
3d5a798ef6f4bd3b1a771bacdf0acf70edf6c1f5 a hardlink returns a
MemorySize reflecting only the hardlink itself, so the MemorySize of
the hardlink targets (project/collection singletons) needs to be added
explicitly by customFilesystem.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
fs.forwardSlashNameSubstitution = repl
}
+func (fs *customFileSystem) MemorySize() int64 {
+ return fs.fileSystem.MemorySize() + fs.byIDRoot.MemorySize()
+}
+
// SiteFileSystem returns a FileSystem that maps collections and other
// Arvados objects onto a filesystem layout.
//
c.Check(summaries["request_duration_seconds/get/200"].SampleCount, check.Equals, "3")
c.Check(summaries["request_duration_seconds/get/404"].SampleCount, check.Equals, "1")
c.Check(summaries["time_to_status_seconds/get/404"].SampleCount, check.Equals, "1")
- c.Check(gauges["arvados_keepweb_sessions_cached_session_bytes//"].Value, check.Equals, float64(469))
+ c.Check(gauges["arvados_keepweb_sessions_cached_session_bytes//"].Value, check.Equals, float64(624))
// If the Host header indicates a collection, /metrics.json
// refers to a file in the collection -- the metrics handler