Skip to content

Commit

Permalink
Merge pull request #275 from iteratec/feature/add_first_paint
Browse files Browse the repository at this point in the history
Added first paint as measurand
  • Loading branch information
DanielSteger authored Sep 24, 2019
2 parents 9e7ff88 + 6dfe468 commit 48b9a58
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 11 deletions.
22 changes: 12 additions & 10 deletions grails-app/domain/de/iteratec/osm/result/EventResult.groovy
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
/*
* OpenSpeedMonitor (OSM)
* Copyright 2014 iteratec GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Expand All @@ -29,7 +29,7 @@ import grails.gorm.annotation.Entity

/**
* <p>
* The results of one event in one and only one
* The results of one event in one and only one
* {@linkplain JobResult job-result}.
* </p>
*
Expand Down Expand Up @@ -98,6 +98,7 @@ class EventResult implements CsiValue, RepresentableWptResult {
Integer cssTotalBytes
Integer htmlTotalBytes
Integer firstMeaningfulPaint
Integer firstPaint
Integer firstContentfulPaint

/** tester from result xml */
Expand Down Expand Up @@ -169,6 +170,7 @@ class EventResult implements CsiValue, RepresentableWptResult {
cssTotalBytes(nullable: true)
htmlTotalBytes(nullable: true)
firstMeaningfulPaint(nullable: true)
firstPaint(nullable: true)
firstContentfulPaint(nullable: true)

firstCpuIdleInMillisecs(nullable: true)
Expand Down
2 changes: 2 additions & 0 deletions grails-app/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ de.iteratec.isr.measurand.IMAGE_TOTAL_BYTES=Bytes Images
de.iteratec.isr.measurand.CSS_TOTAL_BYTES=Bytes CSS
de.iteratec.isr.measurand.HTML_TOTAL_BYTES=Bytes HTML
de.iteratec.isr.measurand.FIRST_MEANINGFUL_PAINT=First Meaningful Paint
de.iteratec.isr.measurand.FIRST_PAINT=First Paint
de.iteratec.isr.measurand.FIRST_CONTENTFUL_PAINT=First Contentful Paint
de.iteratec.isr.measurand.short.docCompleteTimeInMillisecs=doc complete time
de.iteratec.isr.measurand.short.domTimeInMillisecs=dom time
Expand Down Expand Up @@ -1087,6 +1088,7 @@ frontend.de.iteratec.isr.measurand.IMAGE_TOTAL_BYTES=Bytes Images
frontend.de.iteratec.isr.measurand.CSS_TOTAL_BYTES=Bytes CSS
frontend.de.iteratec.isr.measurand.HTML_TOTAL_BYTES=Bytes HTML
frontend.de.iteratec.isr.measurand.FIRST_MEANINGFUL_PAINT=First Meaningful Paint
frontend.de.iteratec.isr.measurand.FIRST_PAINT=First Paint
frontend.de.iteratec.isr.measurand.FIRST_CONTENTFUL_PAINT=First Contentful Paint
frontend.de.iteratec.isr.measurand.VISUALLY_COMPLETE_85=85% Visually Complete
frontend.de.iteratec.isr.measurand.VISUALLY_COMPLETE_90=90% Visually Complete
Expand Down
2 changes: 2 additions & 0 deletions grails-app/i18n/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ de.iteratec.isr.measurand.IMAGE_TOTAL_BYTES=Bytes Images
de.iteratec.isr.measurand.CSS_TOTAL_BYTES=Bytes CSS
de.iteratec.isr.measurand.HTML_TOTAL_BYTES=Bytes HTML
de.iteratec.isr.measurand.FIRST_MEANINGFUL_PAINT=First Meaningful Paint
de.iteratec.isr.measurand.FIRST_PAINT=First Paint
de.iteratec.isr.measurand.FIRST_CONTENTFUL_PAINT=First Contentful Paint
de.iteratec.isr.measurand.endingCached=rv
de.iteratec.isr.measurand.endingUncached=fv
Expand Down Expand Up @@ -1069,6 +1070,7 @@ frontend.de.iteratec.isr.measurand.IMAGE_TOTAL_BYTES=Bytes Images
frontend.de.iteratec.isr.measurand.CSS_TOTAL_BYTES=Bytes CSS
frontend.de.iteratec.isr.measurand.HTML_TOTAL_BYTES=Bytes HTML
frontend.de.iteratec.isr.measurand.FIRST_MEANINGFUL_PAINT=First Meaningful Paint
frontend.de.iteratec.isr.measurand.FIRST_PAINT=First Paint
frontend.de.iteratec.isr.measurand.FIRST_CONTENTFUL_PAINT=First Contentful Paint
frontend.de.iteratec.isr.measurand.FIRST_CPU_IDLE=First CPU Idle
frontend.de.iteratec.isr.measurand.TIME_TO_INTERACTIVE=Time to Interactive
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
databaseChangeLog = {
changeSet(author: "jwi", id: "1569252298504-1") {
addColumn(tableName: "event_result") {
column(name: "first_paint", type: "integer")
}
}
}
1 change: 1 addition & 0 deletions grails-app/migrations/changelog.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ databaseChangeLog = {
include file: '2019-05-20-migrate-otto-locations.groovy'
include file: '2019-06-19-add-user-timing-idx.groovy'
include file: '2019-08-05-rename-interactive-fields.groovy'
include file: '2019-09-23-v530-add-first-paint-measurand.groovy'
}
3 changes: 2 additions & 1 deletion src/main/groovy/de/iteratec/osm/result/Measurand.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ enum Measurand{
CSS_TOTAL_BYTES(MeasurandGroup.REQUEST_SIZES, "cssTotalBytes", "css-total", "css"),
HTML_TOTAL_BYTES(MeasurandGroup.REQUEST_SIZES, "htmlTotalBytes", "html-total", "html"),
FIRST_MEANINGFUL_PAINT(MeasurandGroup.LOAD_TIMES, "firstMeaningfulPaint", "first-meaningful-paint", "firstMeaningfulPaint"),
FIRST_PAINT(MeasurandGroup.LOAD_TIMES, "firstPaint", "first-paint", "firstPaint"),
FIRST_CONTENTFUL_PAINT(MeasurandGroup.LOAD_TIMES, "firstContentfulPaint", "first-contentful-paint", "firstContentfulPaint")

private MeasurandGroup group
Expand Down Expand Up @@ -56,4 +57,4 @@ enum Measurand{
static Measurand byResultXmlTag( String xmlTag ) {
return values().find{it.getTagInResultXml() == xmlTag}
}
}
}

0 comments on commit 48b9a58

Please sign in to comment.