1

I'm using time/1 to measure cpu time in YAP prolog and I'm getting for example

514.000 CPU in 0.022 seconds (2336363% CPU) yes

What I'd like to ask is what is the interpretation of these numbers? Does 514.000 represents CPU secs? What is "0.022 seconds" and the CPU percentage that follows?

Thank you

false
  • 10,264
  • 13
  • 101
  • 209
nkatz
  • 77
  • 5
  • 1
    This is somehow a bug. Please show the entire transscript including the version number. – false Apr 23 '13 at 15:45
  • Thank you for the reply. Well the actual goal in time/1 calls problog for probabilistic inference and is quite lengthy,so I don't think it is possible to reproduce here. However the same format appears in simple queries: – nkatz Apr 23 '13 at 16:33
  • % Restoring file /usr/local/lib/Yap/startup.yss YAP 6.2.3 (x86_64-linux): Tue Apr 16 22:22:50 EEST 2013 ?- time(writeln('test')). test % 0.000 CPU in 0.000 seconds (Inf% CPU) yes – nkatz Apr 23 '13 at 16:34
  • `% Restoring file /usr/local/lib/Yap/startup.yss` `YAP 6.2.3 (x86_64-linux): Tue Apr 16 22:22:50 EEST 2013` `?- time(writeln('test')).` `test` `% 0.000 CPU in 0.000 seconds (Inf% CPU)' `yes` – nkatz Apr 23 '13 at 16:43
  • sorry for multiple posting I'm not quite familiar with formatting options in stackoverflow comments – nkatz Apr 23 '13 at 16:46
  • That must be an error of the specific version. What do you get for: `time(length(_,10000000)).` ? – false Apr 23 '13 at 17:13
  • Current version is 6.3.4 – false Apr 23 '13 at 17:13
  • For the length query I get `% 1.940 CPU in 2.041 seconds ( 95% CPU)` – nkatz Apr 23 '13 at 17:20
  • I installed the current stable version from git and compiled from sources. 6.2.3 is the current stable version if I am not mistaken, 6.3.4 is a development version. – nkatz Apr 23 '13 at 17:27
  • Are you doing something with threads ; or in parallel ? – false Apr 23 '13 at 17:33
  • This could be the case. I'll check the code again. Thank you – nkatz Apr 23 '13 at 17:41

0 Answers0