Announcement

Collapse
No announcement yet.

Writing custom tests in PTS and viewing the results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Writing custom tests in PTS and viewing the results

    Hello! I recently wrote my first custom test on PTS (shell). However, I don't know where to export my log file and what to put in it so that PTS generates a result file.
    Any help would be appreciated!
    Thanks again for this great software!
    Ldes

  • #2
    Log file should be written to $LOG_FILE (env var set when PTS is running the test.)

    Or if you are able to post your test publicly, any other tips/advice can be provided, but should be simple if you are basing your test profile off an existing test.
    Michael Larabel
    https://www.michaellarabel.com/

    Comment


    • #3
      Yes of course ! ( note: i'm a newbie in this type of programming )
      Code:
      for i in {1..4}
      do
      
      DISK=$(dd if=/dev/urandom of=/dev/sd"$PARTLETTER" bs=4M seek=100 count=100 status=progress 2>> $LOG_FILE) #append as an error
      wait
      
      DISKLETTER=$(echo ${DISKLETTER[${i:-1}]}; ((i++));)
      
      PARTLETTER=$(echo ${PARTLETTER[${i:-1}]}; ((i++));)
      done
      it has some more things going on but for now i'd like to measure the transfer rate (I'll probably rewrite it in python later as it is only a demo)

      Comment


      • #4
        Looks like it should work fine, did you try making a results-definition.xml yet? If so what do you see when running `phoronix-test-suite debug-run [name of test]`
        Michael Larabel
        https://www.michaellarabel.com/

        Comment


        • #5
          Yes, the file was generated by the test profile creation helper.
          When I try the debug-run, it outputs "the test did not produce a result" even though I can now see the log file.

          Log file :
          Code:
          150994944 bytes (151 MB, 144 MiB) copied, 1 s, 148 MB/s
          310378496 bytes (310 MB, 296 MiB) copied, 2 s, 153 MB/s
          100+0 records in
          100+0 records out
          419430400 bytes (419 MB, 400 MiB) copied, 78.8627 s, 5.3 MB/s
          
          146800640 bytes (147 MB, 140 MiB) copied, 1 s, 146 MB/s
          297795584 bytes (298 MB, 284 MiB) copied, 2 s, 149 MB/s
          100+0 records in
          100+0 records out
          419430400 bytes (419 MB, 400 MiB) copied, 76.6073 s, 5.5 MB/s
          
          150994944 bytes (151 MB, 144 MiB) copied, 1 s, 147 MB/s
          306184192 bytes (306 MB, 292 MiB) copied, 2 s, 152 MB/s
          100+0 records in
          100+0 records out
          419430400 bytes (419 MB, 400 MiB) copied, 88.4647 s, 4.7 MB/s
          
          146800640 bytes (147 MB, 140 MiB) copied, 1 s, 144 MB/s
          301989888 bytes (302 MB, 288 MiB) copied, 2 s, 150 MB/s
          100+0 records in
          100+0 records out
          419430400 bytes (419 MB, 400 MiB) copied, 48.5736 s, 8.6 MB/s

          Comment


          • #6
            The results-definition.xml should look something like

            Code:
            <PhoronixTestSuite>
            <ResultsParser>
            <OutputTemplate>419430400 bytes (419 MB, 400 MiB) copied, 88.4647 s, #_RESULT_# MB/s</OutputTemplate>
            <LineBeforeHint>records out</LineBeforeHint>
            </ResultsParser>
            </PhoronixTestSuite>
            Michael Larabel
            https://www.michaellarabel.com/

            Comment


            • #7
              Since there are multiple variables in the output, should I use the mutli output exemple like the result-definition.xml from hpcc ?
              Code:
              [NOTICE] Trying to get property 'SystemMonitor' of non-object:556
              
              [NOTICE] Trying to get property 'ExtraData' of non-object:566
              
              [NOTICE] Trying to get property 'ImageParser' of non-object:573
              
              [NOTICE] Trying to get property 'ResultsParser' of non-object:586
              
              The test run did not produce a result.
              
              
              [NOTICE] Trying to get property 'SystemMonitor' of non-object:556
              
              [NOTICE] Trying to get property 'ExtraData' of non-object:566
              
              [NOTICE] Trying to get property 'ImageParser' of non-object:573
              
              [NOTICE] Trying to get property 'ResultsParser' of non-object:586
              Code:
              <?xml version="1.0"?>
              <PhoronixTestSuite>
              <ResultsParser>
              <OutputTemplate>419430400 bytes (419 MB, 400 MiB) copied, 88.4647 s, #_RESULT_# MB/s</OutputTemplate>
              <lineBeforeHint>records out</LineBeforeHint>
              </ResultsParser>
              </PhoronixTestSuite>

              Comment


              • #8
                After a lot of testing, I've finally managed to make it work ! thank you for your answers and your time

                Ldes

                Comment

                Working...
                X