Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
senthilkumarchinnasamycognizant committed May 21, 2019
1 parent 889103c commit 20b6be5
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 41 deletions.
4 changes: 2 additions & 2 deletions CXOptimizeAPI/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'com.cognizant.pace.CXOptimize.api'
version '2.0.5'
version '2.0.6'

buildscript {
ext {
Expand Down Expand Up @@ -36,7 +36,7 @@ apply plugin: 'com.palantir.docker'

jar {
baseName = 'CXOptimizeAPI'
version = '2.0.5'
version = '2.0.6'
}

ext {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class GlobalConstants
public static final String ANALYSISDELETE = 'analysisindex/_delete_by_query'
public static final String STATSSEARCH = 'statsindex/run/_search'
public static final String STATSINDEX_INSERT = 'statsindex/run'
public static final String STATSINDEXTABLE = 'statsindex/run/'
public static final String STATSINDEX = 'statsindex'
public static final String STATSDELETE = 'statsindex/_delete_by_query'
public static final String USERSEARCH = 'userdetails/user/_search'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,11 @@ class PaceAnalysisEngine
LOGGER.debug 'OUTPUT getComparisonReport :' + comparisonReport
txnCalcMetrics.each {key,value ->
//detailBreakUp = (ElasticSearchUtils.getSampleForDetailedAnalysis(configReader, key, (value."$comparisonPerc").toString(),configReader.CurrentRun.toString(),'Current')).hits.hits[0].'_source'
detailSample = (ElasticSearchUtils.getSampleForDetailedAnalysis(configReader, key, (value."$comparisonPerc").toString(),configReader.CurrentRun.toString(),'Current')).hits.hits[0]
id = detailSample.'_id'
detailBreakUp = detailSample.'_source'
//detailSample = (ElasticSearchUtils.getSampleForDetailedAnalysis(configReader, key, (value."$comparisonPerc").toString(),configReader.CurrentRun.toString(),'Current')).hits.hits[0]
//id = detailSample.'_id'
id = value.sampleID
//detailSample = (ElasticSearchUtils.getSampleForDetailedAnalysisByID(configReader,id)).hits.hits[0]
detailBreakUp = (ElasticSearchUtils.getSampleForDetailedAnalysisByID(configReader,id)).'_source'
LOGGER.debug 'OUTPUT getSampleForDetailedAnalysis :' + detailBreakUp
if(configReader?.isNativeApp != null && configReader?.isNativeApp == true)
{
Expand Down Expand Up @@ -436,8 +438,8 @@ class PaceAnalysisEngine
row.put('clientProcessing',(detailBreakUp?.clientProcessing == null ? 0 : detailBreakUp.clientProcessing))
row.put('visuallyComplete',(detailBreakUp?.visuallyComplete == null ? 0 : detailBreakUp.visuallyComplete))
row.put('domInteractive',(detailBreakUp?.renderingTime == null ? 0 : detailBreakUp.renderingTime))
row.put('resourceCount',detailBreakUp.Resources.size)
row.put('resourceSize',detailBreakUp?.resourceSize == null ? 0 : detailBreakUp?.resourceSize)
row.put('resourceCount',value.HttpCount)
row.put('resourceSize',value.Payload)
if(configReader?.isMarkAPIEnabled != null && configReader?.isMarkAPIEnabled)
{
def markSample = ElasticSearchUtils.extractMarkDetailsUsingID(configReader,id)
Expand Down Expand Up @@ -488,8 +490,8 @@ class PaceAnalysisEngine
row.put('url',detailBreakUp.url)
//row.put('resourceBlockTime',Double.parseDouble(PaceRuleEngine.calculateBlockingTime(detailBreakUp.Resources).toString()).round())
row.put('visuallyComplete',(detailBreakUp?.visuallyComplete == null ? 0 : detailBreakUp.visuallyComplete))
row.put('resourceCount',detailBreakUp.Resources.size)
row.put('resourceSize',detailBreakUp?.resourceSize == null ? 0 : detailBreakUp?.resourceSize)
row.put('resourceCount',value.HttpCount)
row.put('resourceSize',value.Payload)
row.put('clientProcessing',(value."$comparisonPerc" - (detailBreakUp?.resourceLoadTime == null ? 0 : Double.parseDouble(detailBreakUp.resourceLoadTime.toString()).round())))
if(configReader?.isMarkAPIEnabled != null && configReader?.isMarkAPIEnabled)
{
Expand Down Expand Up @@ -1588,12 +1590,12 @@ class PaceAnalysisEngine
def txnData = ElasticSearchUtils.extractAllSamples(configReader,configReader?.CurrentRun.toString(),args.txnName,'Current')
def analysisList = []
def row = [:]
def sampleCounter = (configReader?.samplesCount == null ? 10 : configReader?.samplesCount)
def cnt = 0
//def sampleCounter = (configReader?.samplesCount == null ? 10 : configReader?.samplesCount)
//def cnt = 0
txnData.hits.hits.each {it ->
if(cnt < sampleCounter)
{
cnt++
//if(cnt < sampleCounter)
//{
//cnt++
if(configReader?.isNativeApp != null && configReader?.isNativeApp == true)
{
rulesOutput = PaceRuleEngine.applyNativeAppRules(it._source,configReader)
Expand Down Expand Up @@ -1644,7 +1646,7 @@ class PaceAnalysisEngine
row.put('resourceSize',it._source.resourceSize)
row.put('ttfbUser',(it._source?.ttfbUser == null ? 0 : it._source?.ttfbUser))
row.put('ttfbBrowser',(it._source?.ttfbBrowser == null ? 0 : it._source?.ttfbBrowser))
row.put('ttfpUser',(it._source?.ttfbUser == null ? 0 : it._source?.ttfbUser))
row.put('ttfpUser',(it._source?.ttfpUser == null ? 0 : it._source?.ttfpUser))
row.put('ttfpBrowser',(it._source?.ttfpBrowser == null ? 0 : it._source?.ttfpBrowser))
row.put('clientProcessing',(it._source?.clientProcessing == null ? 0 : it._source?.clientProcessing))
row.put('visuallyComplete',(it._source?.visuallyComplete == null ? 0 : it._source?.visuallyComplete))
Expand Down Expand Up @@ -1681,7 +1683,7 @@ class PaceAnalysisEngine
}
}

}
//}

analysisList.add(row.clone())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ class PaceReportEngine

}
jsonStr.append('"visuallyComplete":').append(arrList[i].visuallyComplete).append(',')
jsonStr.append('"clientProcessing":').append(arrList[i].clientProcessing).append(',')
jsonStr.append('"clientProcessing":').append(arrList[i].clientTime).append(',')
jsonStr.append('"resrCount":').append(arrList[i].resourceCount).append(',')
jsonStr.append('"resrSize":').append(arrList[i].resourceSize).append(',')
jsonStr.append('"score":').append(arrList[i].score).append(',')
Expand Down Expand Up @@ -769,7 +769,7 @@ class PaceReportEngine

}
jsonStr.append('"visuallyComplete":').append(CommonUtils.convertMilliToSeconds(arrList[i].visuallyComplete)).append(',')
jsonStr.append('"clientProcessing":').append(CommonUtils.convertMilliToSeconds(arrList[i].clientProcessing)).append(',')
jsonStr.append('"clientProcessing":').append(CommonUtils.convertMilliToSeconds(arrList[i].clientTime)).append(',')
jsonStr.append('"resrCount":').append(arrList[i].resourceCount).append(',')
jsonStr.append('"resrSize":').append(arrList[i].resourceSize).append(',')
jsonStr.append('"score":').append(arrList[i].score).append(',')
Expand Down
4 changes: 2 additions & 2 deletions CXOptimizeUI/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'com.cognizant.pace.CXOptimize.UI'
version '2.0.5'
version '2.0.6'

buildscript {
ext {
Expand Down Expand Up @@ -30,7 +30,7 @@ apply plugin: 'com.palantir.docker'

jar {
baseName = 'CXOptimizeUI'
version = '2.0.5'
version = '2.0.6'
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@
var tableHeader = '';
if (json.TransactionMetrics[0].userPerceivedTime === undefined) {
if (json.TransactionMetrics[0].speedIndex === undefined) {
tableHeader = '<th>Time</th><th>PageLoadTime</th><th>ClientProcessing</th><th>BackendTime</th><th>FullLoadTime</th><th>ResourceCount</th><th>Total Payload(bytes)</th><th>Score (S)</th><th>Recommendations</th><th>View HAR</th>';
tableHeader = '<th>Time</th><th>PageLoadTime</th><th>FrontendTime</th><th>BackendTime</th><th>FullLoadTime</th><th>ResourceCount</th><th>Total Payload(bytes)</th><th>Score (S)</th><th>Recommendations</th><th>View HAR</th>';
} else {
tableHeader = '<th>Time</th><th>PageLoadTime</th><th>SpeedIndex</th><th>FirstByte</th><th>FirstPaint</th><th>ServerTime</th><th>ClientProcessing</th><th>BackendTime</th><th>FullLoadTime</th><th>ResourceCount</th><th>Total Payload(bytes)</th><th>Score (S)</th><th>Recommendations</th><th>View HAR</th>';
tableHeader = '<th>Time</th><th>PageLoadTime</th><th>SpeedIndex</th><th>FirstByte</th><th>FirstPaint</th><th>ServerTime</th><th>FrontendTime</th><th>BackendTime</th><th>FullLoadTime</th><th>ResourceCount</th><th>Total Payload(bytes)</th><th>Score (S)</th><th>Recommendations</th><th>View HAR</th>';
}
} else {
tableHeader = '<th>Time</th><th>TotalPage Time</th><th>User Perceived Time</th><th>Backend Time</th><th>Resource Count</th><th>Payload</th><th>Score (S)</th><th>Recommendations</th><th>View HAR</th>';
Expand Down

0 comments on commit 20b6be5

Please sign in to comment.