16319: Count Utimes stats.
[arvados.git] / services / keepstore / unix_volume.go
index 7af058ae57727123bc56ae135174fa3851748264..5026e2d32558e085886ba119cf0b664bfbc58473 100644 (file)
@@ -304,6 +304,8 @@ func (v *UnixVolume) WriteBlock(ctx context.Context, loc string, rdr io.Reader)
        // avoid this by setting the output file's timestamps
        // explicitly, using a higher resolution clock.
        ts := time.Now()
+       v.os.stats.TickOps("utimes")
+       v.os.stats.Tick(&v.os.stats.UtimesOps)
        if err = os.Chtimes(tmpfile.Name(), ts, ts); err != nil {
                err = fmt.Errorf("error setting timestamps on %s: %s", tmpfile.Name(), err)
                v.os.Remove(tmpfile.Name())