github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/bench/microbenchmarks/nstlvl/drop_caches_darwin.go (about)

     1  // Package nstlvl is intended to measure impact (or lack of thereof) of POSIX directory nesting on random read performance.
     2  /*
     3   * Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
     4   */
     5  package nstlvl
     6  
     7  import (
     8  	"os/exec"
     9  
    10  	"github.com/NVIDIA/aistore/cmn/cos"
    11  )
    12  
    13  func DropCaches() {
    14  	cmd := exec.Command("purge")
    15  	_, err := cmd.Output()
    16  	cos.AssertNoErr(err)
    17  }