<?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 Re: Import cProfile  to use in Custom generating command in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741967#M11859</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308580"&gt;@srinidh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe cProfile is included in the standard python distribution with Splunk Enterprise as 'profile.py' in /opt/splunk/lib/python3.9 (and python3.7)/profile.py&lt;/P&gt;&lt;P&gt;Try importing it using&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import profile as cProfile&lt;/LI-CODE&gt;&lt;P&gt;to see if this resolves for you and allows you to use it as you would expect?&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider adding karma to this or any other answer if it has helped.&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Will&lt;/P&gt;</description>
    <pubDate>Mon, 17 Mar 2025 13:27:20 GMT</pubDate>
    <dc:creator>livehybrid</dc:creator>
    <dc:date>2025-03-17T13:27:20Z</dc:date>
    <item>
      <title>Import cProfile  to use in Custom generating command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741960#M11857</link>
      <description>&lt;P&gt;I have to use cProfile for the profiling details for my custom generating command. I could not install cProfile in the Splunk python. SO could anybody help if they know how to install python lib in splunk and use it for custom command&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 12:15:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741960#M11857</guid>
      <dc:creator>srinidh</dc:creator>
      <dc:date>2025-03-17T12:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Import cProfile  to use in Custom generating command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741965#M11858</link>
      <description>&lt;P&gt;Include the library in the bin directory of the app that contains your custom command.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 12:41:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741965#M11858</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2025-03-17T12:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Import cProfile  to use in Custom generating command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741967#M11859</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308580"&gt;@srinidh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe cProfile is included in the standard python distribution with Splunk Enterprise as 'profile.py' in /opt/splunk/lib/python3.9 (and python3.7)/profile.py&lt;/P&gt;&lt;P&gt;Try importing it using&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import profile as cProfile&lt;/LI-CODE&gt;&lt;P&gt;to see if this resolves for you and allows you to use it as you would expect?&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider adding karma to this or any other answer if it has helped.&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Will&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 13:27:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741967#M11859</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-03-17T13:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Import cProfile  to use in Custom generating command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741972#M11860</link>
      <description>&lt;P&gt;using&amp;nbsp;&lt;/P&gt;&lt;P&gt;import profile as cProfile&lt;/P&gt;&lt;P&gt;we can't use the cProfiles enable and disable as the profile module doesn't support. I require the profiling for a generating command so using this profile I had to configure profiling two times, one for profiling -&amp;nbsp;&lt;SPAN&gt;Convert generator to list for profiling&amp;nbsp;&lt;/SPAN&gt;and one for yielding generator objects to Splunk. So any idea?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 13:46:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741972#M11860</guid>
      <dc:creator>srinidh</dc:creator>
      <dc:date>2025-03-17T13:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Import cProfile  to use in Custom generating command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741974#M11861</link>
      <description>&lt;P&gt;I was getting&amp;nbsp;&lt;/P&gt;&lt;P&gt;ModuleNotFoundError: No module named '&lt;SPAN&gt;_ls&lt;/SPAN&gt;prof' if I do that.&lt;BR /&gt;How to include the cPython modules like these in Splunk&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 13:47:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/741974#M11861</guid>
      <dc:creator>srinidh</dc:creator>
      <dc:date>2025-03-17T13:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Import cProfile  to use in Custom generating command</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/742017#M11862</link>
      <description>&lt;P&gt;It's been a while since I've done this, but it may help to put the library in the app's bin/lib directory.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 17:10:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Import-cProfile-to-use-in-Custom-generating-command/m-p/742017#M11862</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2025-03-17T17:10:09Z</dc:date>
    </item>
  </channel>
</rss>

