File: benchmark.py

package info (click to toggle)
zeitgeist 1.0.4-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,440 kB
  • sloc: python: 8,116; cpp: 3,006; ansic: 1,298; sql: 1,192; makefile: 951; javascript: 753; sh: 156
file content (14 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import dbus

BUS_NAME = "org.gnome.zeitgeist.Engine"
INTERFACE_NAME = "org.gnome.zeitgeist.Benchmark"
OBJECT_PATH = "/org/gnome/zeitgeist/benchmark"
 
bus = dbus.SessionBus()
benchmark_obj = bus.get_object(BUS_NAME, OBJECT_PATH)
benchmark_interface = dbus.Interface(benchmark_obj,
    dbus_interface = INTERFACE_NAME)

def find_events(time_frame, templates, storage_type, num_events, result_type):
    return benchmark_interface.FindEvents(time_frame, templates, storage_type, 
        num_events, result_type)