Esempio n. 1
0
def buildDependencyLoader():
  """Builds an instance of dependency loader"""
  from xpedite.dependencies.pluginLoader import loadObject
  loader = loadObject('dependencyLoader')
  if loader:
    return loader
  class DefaultDependencyLoader(object):
    """Default dependency loader implementation"""

    @staticmethod
    def load(*_):
      """Default nop load operation"""
      return True
  return DefaultDependencyLoader()
Esempio n. 2
0
def loadDriver(name=None):
    """
  Loads driver for the current profile session

  A driver implements interface for rendering profiling results

  :param name: Name of the Xpedite driver (Default value = None)

  """
    if name:
        from xpedite.dependencies.pluginLoader import loadObject
        driver = loadObject('driver')
        if driver:
            return driver
    return None
Esempio n. 3
0
def buildConfig():
    """Loads xpedite configurations """
    from xpedite.dependencies.pluginLoader import loadObject
    from xpedite.dependencies.config import Config
    config = loadObject('config', default={})
    return Config(config)