1 --- libdbusmenu-16.04.0/tools/dbusmenu-bench.orig 2016-02-27 19:58:43.000000000 +0100
2 +++ libdbusmenu-16.04.0/tools/dbusmenu-bench 2023-11-23 20:17:44.777329961 +0100
5 def dump_properties(properties, prepend=""):
6 for key, value in properties.items():
7 - print "%s- %s: %s" % (prepend, key, value)
8 + print ("%s- %s: %s" % (prepend, key, value))
11 def run_test_sequence(menu, dump=False):
13 revision, layout = menu.GetLayout(dbus.Int32(0))
14 times["GetLayout"] = chrono.elapsed()
16 - print "revision:", revision
19 + print ("revision:", revision)
24 tree = ET.fromstring(layout)
26 children = menu.GetChildren(dbus.Int32(root_id), property_names)
27 times["GetChildren"] = chrono.elapsed()
31 for child in children:
32 id, properties = child
34 + print ("- %d:" % id)
35 dump_properties(properties, prepend=" ")
38 properties = menu.GetProperties(dbus.Int32(child_id), property_names)
39 times["GetProperties"] = chrono.elapsed()
42 + print ("properties:")
43 dump_properties(properties)
48 def print_probe(prefix, name, value, timestamp):
49 value = int(value * 1000000)
50 - print "%(prefix)s.%(name)s:%(value)d@%(timestamp)d" % locals()
51 + print ("%(prefix)s.%(name)s:%(value)d@%(timestamp)d" % locals())
54 parser = OptionParser(usage = "%prog [options]")