def _FindInfiniteScrollStoryClasses(platform): # Sort the classes by their names so that their order is stable and # deterministic. for unused_cls_name, cls in sorted(discover.DiscoverClassesInModule( module=sys.modules[__name__], base_class=_InfiniteScrollStory, index_by_class_name=True).iteritems()): if platform in cls.SUPPORTED_PLATFORMS: yield cls
def IterAllStoryClasses(): # Sort the classes by their names so that their order is stable and # deterministic. for unused_cls_name, cls in sorted( discover.DiscoverClassesInModule( module=sys.modules[__name__], base_class=_SinglePageStory, index_by_class_name=True).iteritems()): yield cls
def GetSystemHealthBenchmarksToSmokeTest(): sh_benchmark_classes = discover.DiscoverClassesInModule( system_health, perf_benchmark.PerfBenchmark, index_by_class_name=True).values() return list(b for b in sh_benchmark_classes if b.Name().startswith('system_health.memory'))