mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 01:07:01 +00:00
Add profiling for ASR generation.
This commit is contained in:
@@ -432,13 +432,14 @@ class OnlPackage(object):
|
||||
command = command + "--after-remove %s " % OnlPackageAfterRemoveScript(self.pkg['init'], dir=workdir).name
|
||||
|
||||
if self.pkg.get('asr', True):
|
||||
# Generate the ASR documentation for this package.
|
||||
sys.path.append("%s/sm/infra/tools" % os.getenv('ONL'))
|
||||
import asr
|
||||
asro = asr.AimSyslogReference()
|
||||
asro.extract(workdir)
|
||||
asro.format(os.path.join(docpath, asr.AimSyslogReference.ASR_NAME), 'json')
|
||||
|
||||
with onlu.Profiler() as profiler:
|
||||
# Generate the ASR documentation for this package.
|
||||
sys.path.append("%s/sm/infra/tools" % os.getenv('ONL'))
|
||||
import asr
|
||||
asro = asr.AimSyslogReference()
|
||||
asro.extract(workdir)
|
||||
asro.format(os.path.join(docpath, asr.AimSyslogReference.ASR_NAME), 'json')
|
||||
profiler.log("ASR generation for %(name)s" % self.pkg)
|
||||
############################################################
|
||||
|
||||
if logger.level < logging.INFO:
|
||||
@@ -1234,14 +1235,15 @@ if __name__ == '__main__':
|
||||
if ops.list_all:
|
||||
print pm
|
||||
|
||||
if ops.pmake:
|
||||
pm.pmake()
|
||||
|
||||
|
||||
pm.filter(subdir = ops.subdir, arches=ops.arches)
|
||||
|
||||
if ops.list:
|
||||
print pm
|
||||
|
||||
if ops.pmake:
|
||||
pm.pmake()
|
||||
|
||||
if ops.pkg_info:
|
||||
print pm.pkg_info()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user