mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 22:06:15 +00:00
Adjust profiling to new lyx2lyx call
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27155 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c014f26820
commit
bbb9075e51
@ -22,7 +22,7 @@ import optparse
|
|||||||
import sys
|
import sys
|
||||||
import LyX
|
import LyX
|
||||||
|
|
||||||
if __name__ == "__main__":
|
def main():
|
||||||
args = {}
|
args = {}
|
||||||
args["usage"] = "usage: %prog [options] [file]"
|
args["usage"] = "usage: %prog [options] [file]"
|
||||||
|
|
||||||
@ -78,3 +78,6 @@ Copyright (C) 2007 José Matos and Dekel Tsur""" % LyX.version__
|
|||||||
doc.write()
|
doc.write()
|
||||||
|
|
||||||
sys.exit(doc.status)
|
sys.exit(doc.status)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
@ -35,11 +35,10 @@ Example:
|
|||||||
./profiling.py -ou.lyx ../doc/UserGuide.lyx
|
./profiling.py -ou.lyx ../doc/UserGuide.lyx
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def main(argv):
|
def main():
|
||||||
# This will only work with python >= 2.2, the version where this module was added
|
# This will only work with python >= 2.2, the version where this module was added
|
||||||
prof = hotshot.Profile("lyx2lyx.prof") # Use temporary file, here?
|
prof = hotshot.Profile("lyx2lyx.prof") # Use temporary file, here?
|
||||||
benchtime = prof.runcall(
|
benchtime = prof.runcall(lyx2lyx.main)
|
||||||
lambda : lyx2lyx.main(argv))
|
|
||||||
prof.close()
|
prof.close()
|
||||||
|
|
||||||
# After the tests, show the profile analysis.
|
# After the tests, show the profile analysis.
|
||||||
@ -52,4 +51,4 @@ def main(argv):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main(sys.argv)
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user