Skip to content

Instantly share code, notes, and snippets.

@PhilAlbrecht
Last active February 26, 2019 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PhilAlbrecht/5152393b1a338b7136bd38a3c6597b43 to your computer and use it in GitHub Desktop.
Save PhilAlbrecht/5152393b1a338b7136bd38a3c6597b43 to your computer and use it in GitHub Desktop.
Script for fixing wrong byte numbers in osm
def resultFetcher = ctx.getBean('wptInstructionService')
def eventResultPersister = ctx.getBean('eventResultPersisterService')
Date start = new Date().parse('yyyy/MM/dd', '2019/02/16');
Date end = new Date().parse('yyyy/MM/dd', '2019/02/17');
def jobResults = JobResult.findAllByExecutionDateBetween(start,end);
jobResults.each { event ->
event.getEventResults().each {
def gPathResult = resultFetcher.fetchResult(
WebPageTestServer.findByBaseUrl(it.getJobResult().getWptServerBaseurl()),
it.getJobResult().getTestId())
.getResultsContainingNode(it.numberOfWptRun-1, it.cachedView, it.oneBasedStepIndexInJourney - 1)
eventResultPersister.setBreakdownMeasurands(gPathResult,it)
it.save(flush: true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment