I have Titan (with embedded cassandra running on my system). I am accessing Titan Graph database using Bulbs package from my python program.
With the above setup I run the following python application to create a very simple graph.
from bulbs.titan import Graph
g = Graph()
switch = g.vertices.create(name="switch")
device = g.vertices.create(name="device")
g.edges.create(switch, "connected to", device)
If I measure the time taken to execute the above python application from linux command using time
command as
time python graph.py
The value I get are show below.
real 0m1.654s
user 0m0.039s
sys 0m0.017s
The wall clock time for the creation of the vertices and edges is 1.654 seconds. The time spent on user part of the program is 0.039 seconds. The time spent on kernel part is 0.017 seconds. These two components adds up to 0.056 seconds. How do I account for the rest of the time which is slightly more than 1 second. Is the thread sleeping during this time? Meaning the processor can be scheduled for another process? Or Is the processor polling? How do I know this?