Class MetricUtils

  • public final class MetricUtils
    extends Object
    Utility class for metrics. TODO #372: This class should later be refactored into a separate metric package.
    • Field Detail


        public static final String SQLITE_DB_NAME
    • Method Detail

      • loadMetaData

        public static Boolean loadMetaData()
        Load the BiMaps (lightweight) Metadata from the DB.
        Whether or not the metadata has been successfully loaded from the DB.
      • metaDataLoaded

        public static Boolean metaDataLoaded()
      • stringifyIRDAGProperties

        public static Pair<String,​String> stringifyIRDAGProperties​(IRDAG irdag)
        Stringify execution properties of an IR DAG.
        irdag - IR DAG to observe.
        the pair of stringified execution properties. Left is for vertices, right is for edges.
      • getMethodFor

        public static Optional<Method> getMethodFor​(Class<? extends ExecutionProperty> clazz,
                                                    String name,
                                                    Class<?>... valueTypes)
        Utility method to getting an optional method called 'name' for the class.
        clazz - class to get the method of.
        name - the name of the method.
        valueTypes - the value types of the method.
        optional of the method. It returns Optional.empty() if the method could not be found.
      • keyAndValueToEP

        public static ExecutionProperty<? extends Serializable> keyAndValueToEP​(Integer epKeyIndex,
                                                                                Double split,
                                                                                Double tweak)
        Receives the pair of execution property and value classes, and returns the optimized value of the EP.
        epKeyIndex - the EP Key index to retrieve the new EP from.
        split - the split point.
        tweak - the direction in which to tweak the execution property value.
        The execution property constructed from the key index and the split value.