当前位置: 首页>>代码示例>>Python>>正文


Python VDisk.calculate_delta方法代码示例

本文整理汇总了Python中ovs.dal.hybrids.vdisk.VDisk.calculate_delta方法的典型用法代码示例。如果您正苦于以下问题:Python VDisk.calculate_delta方法的具体用法?Python VDisk.calculate_delta怎么用?Python VDisk.calculate_delta使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ovs.dal.hybrids.vdisk.VDisk的用法示例。


在下文中一共展示了VDisk.calculate_delta方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _statistics

# 需要导入模块: from ovs.dal.hybrids.vdisk import VDisk [as 别名]
# 或者: from ovs.dal.hybrids.vdisk.VDisk import calculate_delta [as 别名]
 def _statistics(self, dynamic):
     """
     Aggregates the Statistics (IOPS, Bandwidth, ...) of the vDisks connected to the Storage Driver.
     """
     from ovs.dal.hybrids.vdisk import VDisk
     statistics = {}
     for key in StorageDriverClient.STAT_KEYS:
         statistics[key] = 0
         statistics['{0}_ps'.format(key)] = 0
     for key, value in self.fetch_statistics().iteritems():
         statistics[key] += value
     statistics['timestamp'] = time.time()
     VDisk.calculate_delta(self._key, dynamic, statistics)
     return statistics
开发者ID:DarumasLegs,项目名称:framework,代码行数:16,代码来源:storagedriver.py

示例2: _statistics

# 需要导入模块: from ovs.dal.hybrids.vdisk import VDisk [as 别名]
# 或者: from ovs.dal.hybrids.vdisk.VDisk import calculate_delta [as 别名]
 def _statistics(self, dynamic):
     """
     Aggregates the Statistics (IOPS, Bandwidth, ...) of each vDisk served by the vPool.
     """
     from ovs.dal.hybrids.vdisk import VDisk
     statistics = {}
     for key in StorageDriverClient.stat_keys:
         statistics[key] = 0
         statistics['{0}_ps'.format(key)] = 0
     for vdisk in self.vdisks:
         for key, value in vdisk.fetch_statistics().iteritems():
             statistics[key] += value
     statistics['timestamp'] = time.time()
     VDisk.calculate_delta(self._key, dynamic, statistics)
     return statistics
开发者ID:tcpcloud,项目名称:openvstorage,代码行数:17,代码来源:vpool.py

示例3: _statistics

# 需要导入模块: from ovs.dal.hybrids.vdisk import VDisk [as 别名]
# 或者: from ovs.dal.hybrids.vdisk.VDisk import calculate_delta [as 别名]
 def _statistics(self, dynamic):
     """
     Aggregates the Statistics (IOPS, Bandwidth, ...) of each vDisk of the vMachine.
     """
     from ovs.dal.hybrids.vdisk import VDisk
     statistics = {}
     for key in StorageDriverClient.STAT_KEYS:
         statistics[key] = 0
         statistics['{0}_ps'.format(key)] = 0
     for storagedriver in self.storagedrivers:
         for vdisk in storagedriver.vpool.vdisks:
             if vdisk.storagedriver_id == storagedriver.storagedriver_id:
                 for key, value in vdisk.fetch_statistics().iteritems():
                     statistics[key] += value
     statistics['timestamp'] = time.time()
     VDisk.calculate_delta(self._key, dynamic, statistics)
     return statistics
开发者ID:JasperLue,项目名称:openvstorage,代码行数:19,代码来源:storagerouter.py


注:本文中的ovs.dal.hybrids.vdisk.VDisk.calculate_delta方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。