0

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?

liv2hak
  • 12,597
  • 41
  • 127
  • 231
  • 1
    Might be worth reviewing [What do 'real', 'user' and 'sys' mean in the output of time(1)?](http://stackoverflow.com/questions/556405/what-do-real-user-and-sys-mean-in-the-output-of-time1) – jedwards Mar 15 '15 at 21:56
  • @jedwards - If all of my function calls are blocking calls, can the scheduler use the processor time for other processes? – liv2hak Mar 15 '15 at 22:08
  • @liv2hak No. That's pretty much the definition of a blocking call. – Carsten Mar 15 '15 at 23:01

0 Answers0