Hi list,

(Reply to myself on 1) I've tried the following approach (POC):
"
<function name="main">
     <loop from="1" to="2" var="i">
           <parallel>
                <loop from="1" to="10" var="j">
                     <call function="'query1'">
                           {
                                'stressTesterMachine': '---.---.---.---',
                                'PACSMachine': '---.---.---.---',
                                'aec': '---------'
                           }
                     </call>
                </loop>
                <stafcmd name="'Delay'">
                     <location>'local'</location>
                     <service>'delay'</service>
                     <request>'delay 10000'</request>
                </stafcmd>
           </parallel>
     </loop>
</function>
"
And it seems to be working, is this a good/recommended approach for my case? 
Any other thoughts?
I've noticed that (and especially in the second loop round) the delay did not 
start when the next loop of "query1" started but some noticeable time following 
it.

Besides, any recommendation on question '2'?
Thanks.



From: Nitzan Zaifman [mailto:nitz...@algotec.co.il]
Sent: Sunday, October 13, 2013 2:23 PM
To: staf-users@lists.sourceforge.net
Subject: [staf-users] STAX background process

Hello,

A couple of questions (for starters :)):


1.       Approach to run background commands in the same "job":

I have a task requiring running background commands at set intervals which can 
take an arbitrary amount of time.

I've already created a STAX script to do the command.



Of course I can use "CRON" service to run them separately but  I'll lose 
testcase indication/counting as each will be separate.
What I would like to do is run a function in the background or run a process 
command async from STAX.



To be exact, if you need the real case:

I have an executable which (ultimately) queries a database and returns results. 
I've create a STAX job to do this process invocation and count the returned 
results.

I would then like to add thresholds to decide, for ex., if it's a "PASS" or a 
"FAIL" (for ex. "PASS" returns results in less than 10 seconds, or if the 
results are more then 10,000 then less than 30 seconds, etc.) then have that 
run its course and give me FAIL/SUCCESS counters.

As evident, each "query" runs for different length of times and there are 
different types of queries, etc.

I believe the solution should be in the area of a wrapper to trigger the 
function "query1" (for ex.) and then WAIT 2m (ex.), and trigger another query 
type named query2, and so on regardless of the times queries take - the results 
will come when they come.

Do you have any recommendation? Or another approach etc.



2.       How can I create a decent results report, or better yet "CSV" file 
though STAX?

Of course I can just use python to write locally to some file, and at the end 
send it all to my central location and thorough another logic and the end 
combine it all.

But, isn't there another, more natural "built-in" way to accomplish that? For 
ex. write though "log" to a central location and have it written in my format 
(CSV) to a file.



Thanks, Nitzan.



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to