/usr/share/kivy-examples/svg/benchmark.py is in python-kivy-examples 1.9.1-1build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | from kivy.core.window import Window
from kivy.graphics.svg import Svg
from time import time
import sys
import os
filename = sys.argv[1]
if "PROFILE" in os.environ:
import pstats
import cProfile
cProfile.runctx("Svg(filename)", globals(), locals(), "Profile.prof")
s = pstats.Stats("Profile.prof")
s.sort_stats("time").print_callers()
else:
print("Loading {}".format(filename))
start = time()
svg = Svg(filename)
end = time()
print("Loaded in {:.2f}s".format((end - start)))
|