Commit 9141a494 authored by manohar's avatar manohar

time after each action printed for checking


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96043 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1e4b11b0
......@@ -174,7 +174,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
boolean isWizard=false;
String orderType=""; // added by cpatil on 02/07/14
long startTime = 0;
//String IPD_INDEPENDENT = "",IPD_INDENT = "",IPD_MPS_ORDER = "",IPD_DIST = ""; //cpatil on 15/01/14
/*
* public void ejbCreate() throws RemoteException, CreateException { try {
......@@ -200,7 +200,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
String resultString = null;
Document dom = null, dom1 = null;
String retString = null;
long startTime = 0, endTime = 0, totalTime = 0, totalHrs = 0, totlMts = 0, totSecs = 0; // Added
long endTime = 0, totalTime = 0, totalHrs = 0, totlMts = 0, totSecs = 0; // Added
// by
// Jiten
// 13/11/06
......@@ -253,6 +253,7 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
String resultString = "",windowName1="",bomCodeParent= "";
ResultSet rs = null;
this.wnName=windowName;
long endTime = 0, totalTime = 0, totalHrs = 0, totlMts = 0, totSecs = 0; // Added
System.out.println("win name is ==>"+wnName);
......@@ -383,6 +384,19 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
connDriver = null;
// validate the filter parameter entered by the user
errString = validateFilterParams(dom);
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend validateFilterParams[" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
if (errString != null && errString.trim().length() > 0)
{
System.out.println("Error validating filter parameters:..." + errString);
......@@ -393,6 +407,17 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
errString = "";
// System.out.println("Populating Common Parameters...");
errString = populateCommonParameters();
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend populateCommonParameters[" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
if (errString != null && errString.trim().length() > 0)
{
System.out.println("Error While Populating Common Parameters:..." + errString);
......@@ -424,6 +449,16 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
return errString;
}
}
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend [" + isBomReplace + "] populateSiteMap[" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
if(!( isBomReplace)) // added by cpatil on 17/05/14 for BomReplace
{
......@@ -450,6 +485,16 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
System.out.println("Else 12/06/14 itemCodeTo [" + itemCodeTo + "] itemCodeMap [" + itemCodeMap +"]");
itemCodeMap.put(itemCodeTo, new Integer(itemCodeMap.size() + 1));
}
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend [" + isBomReplace + "] populateItemMap[" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
// Populating All Items...........
// if MatPlan equals 'Y' then call method populateAllItem()
......@@ -460,6 +505,16 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
{
System.out.println("Populating All Items...........");
errString = populateAllItem();
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend [" + isBomReplace + "] populateAllItem[" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
if (errString != null && errString.trim().length() > 0)
{
......@@ -499,6 +554,16 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
System.out.println("13/06/14 adpeList.size() after 1 [" + adpeList.size() + "] itemBomMap [" + itemBomMap + "]");
errString = bomExplode( siteCode1, bomCode1);
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend [" + isBomReplace + "] bomExplode[" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
if (errString != null && errString.trim().length() > 0)
{
System.out.println("@@@ cpatil --- Error While Calling method bomExplode(String, String):..." + errString);
......@@ -517,6 +582,16 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
//else
//{
errString = populateADPElementList();
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend [" + isBomReplace + "] populateADPElementList [" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
//}
// generate the ADPElement array here..
......@@ -542,6 +617,16 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
//
errString = mrpOptimize();
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend [" + isBomReplace + "] mrpOptimize [" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
if (errString != null && errString.trim().length() > 0)
{
System.out.println("Error While Optimizing ADPEList:..." + errString);
......@@ -561,6 +646,16 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
//End Added by sachin on 26/6/13
*/
errString = generatePlanDemand();
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend generatePlanDemand [" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
if (errString != null && errString.trim().length() > 0)
{
System.out.println("Error While generating Plan Demand:..." + errString);
......@@ -575,6 +670,16 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
//if(!isDetailReq)
//{
errString = InsertPlanDemand();
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend InsertPlanDemand [" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
if (errString != null && errString.trim().length() > 0)
{
System.out.println("Error While inserting Plan Demand:..." + errString);
......@@ -669,8 +774,28 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
* stmt.close();
*/
// End
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend delete old plan [" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
errString = InsertPlanTable();
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend InsertPlanTable [" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
if (errString != null && errString.trim().length() > 0)
{
System.out.println("Error While inserting Plan HdrDet:..." + errString);
......@@ -683,7 +808,27 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
}
resultString = setValuesInBrow();
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend setValuesInBrow [" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
Write2XSL();
endTime = System.currentTimeMillis();
totalTime = endTime - startTime;
System.out.println("Total Time Spend :: " + totalTime + " Milliseconds");
totSecs = (int) (((double) 1 / 1000) * (totalTime));
totalHrs = (int) (totSecs / 3600);
totlMts = (int) (((totSecs - (totalHrs * 3600)) / 60));
totSecs = (int) (totSecs - ((totalHrs * 3600) + (totlMts * 60)));
System.out.println("Total Time Spend Write2XSL [" + totalHrs + "] Hours [" + totlMts + "] Minutes [" + totSecs + "] seconds");
} catch (SQLException se)
{
System.out.println("SQLException :RunMRPPrcEJB :process(Document dom, Document dom2, String winName, String xtraParams):" + se.getMessage() + ":");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment