here's the python test script i was using to find bugs in tracker. it
starts sending random stuff at the end just to make sure tracker never
segfaults or anything. however, sometimes it doesn't even get that
far. it seems that tracker has some bugs with maybe a race condition
and dbus? for me, the client will stall at some random point in the
test, but tracker keeps on running (ie it's not sending a reply). you
guys should try this script and see if it works for you....
Samuel Cormier-Iijima
#!/usr/bin/python
import dbus
print 'connecting to tracker...'
bus = dbus.SessionBus()
proxy = bus.get_object('org.freedesktop.Tracker',
'/org/freedesktop/tracker')
iface = dbus.Interface(proxy, 'org.freedesktop.Tracker')
print 'tracker version: ', iface.GetVersion()
services = iface.GetServices(True)
print 'tracker services:'
for service, info in services.iteritems():
print ' %s (%s): %s' % (service, info[0], info[1])
stats = iface.GetStats()
print 'tracker stats:'
for service, stat in stats.iteritems():
print ' %s: (%s)' % (service, stat[0])
ifacef = dbus.Interface(proxy, 'org.freedesktop.Tracker.Files')
ifacem = dbus.Interface(proxy, 'org.freedesktop.Tracker.Metadata')
files = ifacef.GetByServiceType(-1, 'Files', 0, 10)
for file in files:
print '%s: name is %s' % (file, ifacem.Get('Files', file, ['file.name'])[0])
files = ifacef.GetByServiceType(-1, 'Music', 0, 10)
for file in files:
metadata = ifacem.Get('Music', file, ['audio.artist', 'audio.title', 'audio.album'])
print '%s:'
print ' artist:', metadata[0]
print ' title: ', metadata[1]
print ' album: ', metadata[2]
# stress test
ifacef.GetByServiceType(-1, 'fheltk', -5, 300)
ifacef.GetByServiceType(-1, 'Music', 5000, 2)
ifacef.GetByServiceType(314, 'Files', 0, 10000)
ifacem.GetWriteableTypes('*')
ifacem.GetWriteableTypes('audio')
ifacem.GetWriteableTypes('email')
ifacem.GetRegisteredClasses()
_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list