Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
time taken by birt report to run ??
sandeepBha
Hi All,
how can i know that how much time is taken by birt viewer to run a report.
is there any method to find out the time taken by a birt report to run.
scenario ::
when we click a show report button than birt viewer will run and report is saw.
I want to know the exact time taken in this process by birt viewer.
please reply soon
thanks in advance
Find more posts tagged with
Comments
JasonW
You should be able to put some script in the report in the beforeFactory and afterFactory methods to track the time. Keep in mind that putting the script in will add some time to the creation. Write out the times to a file:
beforeFactory:
importPackage( Packages.java.util );
var dt = new Date();
beginTime = dt.getTime();
afterFactory:
importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/temp/events.txt", true ) );
importPackage( Packages.java.util );
var dtf = new Date();
endTime = dtf.getTime();
ttl = endTime - beginTime;
out.println( "afterRender Event (Milliseconds): " + ttl);
out.close();
Jason
sandeepBha
hi jason
thanks for your reply
can I saw this ttl(after render event (millisecond )) on that report.
if yes then how??
please help soon.
sandeep
JasonW
Sandeep,
Do you mean can you put the script in the afterRender? If so you should be able to. If you want the ttl variable displayed in the report and you leave in the afterFactory you should be able to access it in an onRender script if you persist it. For example add a label to the report an in its onRender event put this:
this.text = reportContext.getPersistentGlobalVariable("ttl);
Then change the afterFactory method to look like:
afterFactory:
importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/temp/events.txt", true ) );
importPackage( Packages.java.util );
var dtf = new Date();
endTime = dtf.getTime();
ttl = endTime - beginTime;
out.println( "afterRender Event (Milliseconds): " + ttl);
out.close();
reportContext.setPersistentGlobalVariable( "ttl", ttl);
Jason
pratim
hi Jason,<br />
<br />
Just wanted to clarify my doubt with this thread.<br />
How can i find which method(initialize,before factory,after factory,before render, after render) calls at which time, while executing a report?<br />
<br />
Considering the report flow i.e, a report access data from database to display it in the web browser. What are the methods it invokes during this report execution time and what is the flow of this method ?<br />
<br />
<blockquote class='ipsBlockquote' data-author="JasonW"><p>Sandeep,<br />
<br />
Do you mean can you put the script in the afterRender? If so you should be able to. If you want the ttl variable displayed in the report and you leave in the afterFactory you should be able to access it in an onRender script if you persist it. For example add a label to the report an in its onRender event put this:<br />
<br />
this.text = reportContext.getPersistentGlobalVariable("ttl);<br />
<br />
Then change the afterFactory method to look like:<br />
afterFactory:<br />
importPackage( Packages.java.io );<br />
out = new PrintWriter( new FileWriter( "c:/temp/events.txt", true ) );<br />
importPackage( Packages.java.util );<br />
var dtf = new Date();<br />
endTime = dtf.getTime();<br />
ttl = endTime - beginTime;<br />
out.println( "afterRender Event (Milliseconds): " + ttl);<br />
out.close();<br />
reportContext.setPersistentGlobalVariable( "ttl", ttl);<br />
<br />
Jason</p></blockquote>
JasonW
Take a look at this page:<br />
<a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/deploy/reportScripting.php'>Report
Scripting</a><br />
<br />
Jason
pratim
Can you help me out in solving an issue. Please go through the link mentioned below,
"
http://www.birt-exchange.org/forum/deploying-integrating-birt-report-engine-applications/19724-please-help-cant-load-report-query.html"
;
vsub
hi Jason,
We have set of 100 reports , would like to see time taken by each birt report. With the above given approach we need to provide before factory and after factory events in each report. Is there any way we can use the librabry in BIRT for this purpose and create reusable component and make use of it in all the reports.
thank in adavance.
regards
bhaskar
yoovrajkhullar
<blockquote class="ipsBlockquote" data-author="JasonW" data-cid="51663" data-time="1249052781">
<div>
<p>Sandeep, Do you mean can you put the script in the afterRender? If so you should be able to. If you want the ttl variable displayed in the report and you leave in the afterFactory you should be able to access it in an onRender script if you persist it. For example add a label to the report an in its onRender event put this: this.text = reportContext.getPersistentGlobalVariable("ttl); Then change the afterFactory method to look like: afterFactory: importPackage( Packages.java.io ); out = new PrintWriter( new FileWriter( "c:/temp/events.txt", true ) ); importPackage( Packages.java.util ); var dtf = new Date(); endTime = dtf.getTime(); ttl = endTime - beginTime; out.println( "afterRender Event (Milliseconds): " + ttl); out.close(); reportContext.setPersistentGlobalVariable( "ttl", ttl); Jason</p>
<p> </p>
<p>Hi Jason,</p>
<p> </p>
<p>I liked this, but want to use this ttl Global variable in the Befor eOpen method of a dataset, there it gives me null value.</p>
<p>The reason being this ttl time is not calculated till after factory method is complete.</p>
<p>i am trying to show the Report run time as a Column in the dataset.</p>
<p>I am able to show as Label as you had mentioned, but how to show in the Column of the dataset.</p>
<p>Yoovraj</p>
</div>
</blockquote>