<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Measure per-thread cpu time inside an enclave in Intel Confidential Computing</title>
    <link>https://community.intel.com/t5/Intel-Confidential-Computing/Measure-per-thread-cpu-time-inside-an-enclave/m-p/1239406#M4186</link>
    <description>&lt;P&gt;Hello.&lt;BR /&gt;&lt;BR /&gt;I would like to measure the per-thread cpu time of a part of my program inside the enclave. If I create two ocalls, ocall_start_time and ocall_stop_time, which take the current per-thread CPU time using getrusage(RUSAGE_THREAD, &amp;amp;start) and getrusage(RUSAGE_THREAD, &amp;amp;stop). At the beginning of the interesting part I call ocall_start_time and at the end of the part I call ocall_stop_time. After obtaining the two values, I compute the difference between start and stop. Is the CPU time spend inside the enclave included in the result? If not, is there any other possibility to measure the per-thread CPU time spend inside an enclave?&lt;/P&gt;
&lt;P&gt;Regards, Benedikt&lt;/P&gt;</description>
    <pubDate>Mon, 21 Dec 2020 15:58:12 GMT</pubDate>
    <dc:creator>Kopf__Benedikt</dc:creator>
    <dc:date>2020-12-21T15:58:12Z</dc:date>
    <item>
      <title>Measure per-thread cpu time inside an enclave</title>
      <link>https://community.intel.com/t5/Intel-Confidential-Computing/Measure-per-thread-cpu-time-inside-an-enclave/m-p/1239406#M4186</link>
      <description>&lt;P&gt;Hello.&lt;BR /&gt;&lt;BR /&gt;I would like to measure the per-thread cpu time of a part of my program inside the enclave. If I create two ocalls, ocall_start_time and ocall_stop_time, which take the current per-thread CPU time using getrusage(RUSAGE_THREAD, &amp;amp;start) and getrusage(RUSAGE_THREAD, &amp;amp;stop). At the beginning of the interesting part I call ocall_start_time and at the end of the part I call ocall_stop_time. After obtaining the two values, I compute the difference between start and stop. Is the CPU time spend inside the enclave included in the result? If not, is there any other possibility to measure the per-thread CPU time spend inside an enclave?&lt;/P&gt;
&lt;P&gt;Regards, Benedikt&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 15:58:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Confidential-Computing/Measure-per-thread-cpu-time-inside-an-enclave/m-p/1239406#M4186</guid>
      <dc:creator>Kopf__Benedikt</dc:creator>
      <dc:date>2020-12-21T15:58:12Z</dc:date>
    </item>
    <item>
      <title>Re:Measure per-thread cpu time inside an enclave</title>
      <link>https://community.intel.com/t5/Intel-Confidential-Computing/Measure-per-thread-cpu-time-inside-an-enclave/m-p/1243152#M4194</link>
      <description>&lt;P&gt;Hello Kopf_Benedikt,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Yes, using getrusage in the manner you described will give you the amount of user time spent in the enclave between the two calls.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Jesus G.&lt;/P&gt;&lt;P&gt;Intel Customer Support&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 04 Jan 2021 19:30:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Confidential-Computing/Measure-per-thread-cpu-time-inside-an-enclave/m-p/1243152#M4194</guid>
      <dc:creator>JesusG_Intel</dc:creator>
      <dc:date>2021-01-04T19:30:16Z</dc:date>
    </item>
  </channel>
</rss>

