def getMetricFromPath(filePath):
 data_dir = (os.path.normpath(settings.LOCAL_DATA_DIR) + os.sep)
 metric_name = filePath.replace(data_dir, '')
 metric_name = metric_name.replace('.wsp', '')
 metric_name = metric_name.replace('/', '.')
 return metric_name

def getMetricFromPath ( filePath ) : data_dir = ( os . path . normpath ( settings . LOCAL_DATA_DIR ) + os . sep ) metric_name = filePath . replace ( data_dir , '' ) metric_name = metric_name . replace ( '.wsp' , '' ) metric_name = metric_name . replace ( '/' , '.' ) return metric_name
this method takes the full file path of a whisper file an converts it to a gaphite metric name parameters: filepath - full file path to a whisper file returns a string representing the metric name .