<?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: Comparing/Graphing two searches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634489#M220431</link>
    <description>&lt;P&gt;Thanks for the quick reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This appears to be partially working.&amp;nbsp; I'm only getting results for one of the tests.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pip9ball_3-1678837049333.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24306i0ED4F8FACE293C8D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pip9ball_3-1678837049333.png" alt="Pip9ball_3-1678837049333.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whereas my original search to generate the table is showing much more.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pip9ball_2-1678836987312.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24305i30096426DAA2D6E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pip9ball_2-1678836987312.png" alt="Pip9ball_2-1678836987312.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Sorry for marking it up so much, but there is some stuff I can't share.&amp;nbsp; Basically it should be comparing cyclesPerCpuSec on the same testPath name across the two version.&amp;nbsp; Perhaps it's because the fullpath in the testPath is non-unique?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to just extract and compare just the last element of the testPath?&amp;nbsp; This way the names will be the same.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2023 23:37:46 GMT</pubDate>
    <dc:creator>Pip9ball</dc:creator>
    <dc:date>2023-03-14T23:37:46Z</dc:date>
    <item>
      <title>How to compare/graph two searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634480#M220429</link>
      <description>&lt;P&gt;Hello All -&lt;/P&gt;
&lt;P&gt;I need to be able to compare/graph regression test results from two different models.&amp;nbsp; The search command to create a table for one of the searches is:&lt;/P&gt;
&lt;P&gt;index="frontEnd" source="regress_rpt" pipeline="my_pipe" version="23ww10b" dut="*"&amp;nbsp; (testlist="*") (testName="*") status="*" | table cyclesPerCpuSec wall_hz testPath rpt&lt;/P&gt;
&lt;P&gt;This returns a table with 6 rows (As there are 6 tests per version).&lt;/P&gt;
&lt;P&gt;Is there a way to compare the cyclesPerCpuSec of this search to a new search which has a different version?&lt;/P&gt;
&lt;P&gt;I.e.&lt;/P&gt;
&lt;P&gt;index="frontEnd" source="regress_rpt" pipeline="my_pipe" version="&lt;FONT face="arial black,avant garde"&gt;23ww10a&lt;/FONT&gt;" dut="*"&amp;nbsp; (testlist="*") (testName="*") status="*" | table cyclesPerCpuSec wall_hz testPath rpt&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Pip&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 17:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634480#M220429</guid>
      <dc:creator>Pip9ball</dc:creator>
      <dc:date>2023-03-15T17:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing/Graphing two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634482#M220430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254779"&gt;@Pip9ball&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Give this a go...&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;index="frontEnd" source="regress_rpt" pipeline="my_pipe" version IN("23ww10a", "23ww10b") dut="*"&amp;nbsp; (testlist="*") (testName="*") status="*" &lt;BR /&gt;| timechart max(cyclesPerCpuSec) AS cyclesPerCpuSec BY version&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 23:15:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634482#M220430</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-03-14T23:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing/Graphing two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634489#M220431</link>
      <description>&lt;P&gt;Thanks for the quick reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This appears to be partially working.&amp;nbsp; I'm only getting results for one of the tests.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pip9ball_3-1678837049333.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24306i0ED4F8FACE293C8D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pip9ball_3-1678837049333.png" alt="Pip9ball_3-1678837049333.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whereas my original search to generate the table is showing much more.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pip9ball_2-1678836987312.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24305i30096426DAA2D6E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Pip9ball_2-1678836987312.png" alt="Pip9ball_2-1678836987312.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Sorry for marking it up so much, but there is some stuff I can't share.&amp;nbsp; Basically it should be comparing cyclesPerCpuSec on the same testPath name across the two version.&amp;nbsp; Perhaps it's because the fullpath in the testPath is non-unique?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to just extract and compare just the last element of the testPath?&amp;nbsp; This way the names will be the same.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 23:37:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634489#M220431</guid>
      <dc:creator>Pip9ball</dc:creator>
      <dc:date>2023-03-14T23:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing/Graphing two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634496#M220433</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254779"&gt;@Pip9ball&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Yeah, you can strip the the last element out and use that to group over time&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;index="frontEnd" source="regress_rpt" pipeline="my_pipe" version IN("23ww10a", "23ww10b") dut="*"&amp;nbsp; (testlist="*") (testName="*") status="*" &lt;BR /&gt;| eval lastTestPathElement=replace(testPath, ".*/" ,"")&lt;BR /&gt;| eval grouping=version.":".lastTestPathElement&lt;BR /&gt;| timechart&lt;BR /&gt;     max(cyclesPerCpuSec) AS max:cyclesPerCpuSec&lt;BR /&gt;     avg(cyclesPerCpuSec) AS avg:cyclesPerCpuSec&lt;BR /&gt;  BY grouping&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;OR, if not interested in over time graph you can just chart the results&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;index="frontEnd" source="regress_rpt" pipeline="my_pipe" version IN("23ww10a", "23ww10b") dut="*"&amp;nbsp; (testlist="*") (testName="*") status="*" &lt;BR /&gt;| eval lastTestPathElement=replace(testPath, ".*/" ,"")&lt;BR /&gt;| chart&lt;BR /&gt;     max(cyclesPerCpuSec) AS max:cyclesPerCpuSec&lt;BR /&gt;     avg(cyclesPerCpuSec) AS avg:cyclesPerCpuSec&lt;BR /&gt;  BY version lastTestPathElement&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 01:36:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634496#M220433</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-03-15T01:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing/Graphing two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634620#M220475</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/158935"&gt;@yeahnah&lt;/a&gt;&amp;nbsp;- Thank you so much!&lt;/P&gt;&lt;P&gt;Is it possible to now perform some calculations on the results?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result of the search produces a table like:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;version&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;test1&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;test2&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;test3&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;test4&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;test5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;23ww10a&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;890.76&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;616.56&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;877.73&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;884.68&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;936.69&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;23ww10b&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;631.68&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;1400.73&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;659.00&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;741.34&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;742.44&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying to do is generate an alert if the test cyclesPerCpuSec increases by 10% from the latest version to the previous.&lt;/P&gt;&lt;P&gt;So is there a way to iterate over the table and do a comparison?&lt;/P&gt;&lt;P&gt;Thanks for all your help, Splunk is rather new to me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;-Phil&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 16:30:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634620#M220475</guid>
      <dc:creator>Pip9ball</dc:creator>
      <dc:date>2023-03-15T16:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing/Graphing two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634671#M220495</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254779"&gt;@Pip9ball&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Yes, the best way would be to transpose the output (switch columns and rows) and then diff the versions.&amp;nbsp; here's a run anywhere example using your result table example&lt;/P&gt;&lt;PRE&gt;| makeresults&lt;BR /&gt;| eval _raw="version test1 test2 test3 test4 test5&lt;BR /&gt;23ww10a 890.76 616.56 877.73 884.68 936.69&lt;BR /&gt;23ww10b 631.68 1400.73 659.00 741.34 742.44"&lt;BR /&gt;| multikv forceheader=1&lt;BR /&gt;| table version test*&lt;BR /&gt;``` ignore above - just creating dummy events ```&lt;BR /&gt;``` add the bit below to your search results ``` &lt;BR /&gt;| transpose header_field=version column_name=test_run&lt;BR /&gt;| eval cycles_version_delta=('23ww10b' - '23ww10a')&lt;BR /&gt;,diff_percentage=round('cycles_version_delta'/'23ww10a' * 100, 1)&lt;BR /&gt;,status=if(diff_percentage &amp;lt; 10, "PASS", "FAIL")&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yeahnah_0-1678924961428.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/24334iA9595A88A5814953/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yeahnah_0-1678924961428.png" alt="yeahnah_0-1678924961428.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If this answers your question, then please mark this with solution provided&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 00:02:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634671#M220495</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2023-03-16T00:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing/Graphing two searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634791#M220536</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/158935"&gt;@yeahnah&lt;/a&gt;&amp;nbsp;- Thanks again for your help!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 15:45:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-graph-two-searches/m-p/634791#M220536</guid>
      <dc:creator>Pip9ball</dc:creator>
      <dc:date>2023-03-16T15:45:09Z</dc:date>
    </item>
  </channel>
</rss>

