Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
TEST: Added Berlin ZoomIn test
Browse files Browse the repository at this point in the history
  • Loading branch information
ninok committed Feb 19, 2020
1 parent 947f1c1 commit 45b2294
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
26 changes: 25 additions & 1 deletion @here/harp-examples/lib/PerformanceConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,31 @@ export namespace PerformanceTestData {
tilts: [0, 0, 0, 0, 0, 0],
numberOfDrawPoints: 250
};

export const BERLIN_ZOOM_IN = {
controlPoints: [
52.5,
13.4,
52.5,
13.4,
52.5,
13.4,
52.5,
13.4,
52.5,
13.4,
52.5,
13.4,
52.5,
13.4,
52.5,
13.4,
52.5,
13.4
],
zoomLevels: [12, 13, 14, 15, 16, 17, 18, 19, 20],
tilts: [0, 0, 0, 0, 0, 0, 0, 0, 0],
numberOfDrawPoints: 250
};
export const PARIS_ZOOM_IN_AND_OUT_2 = {
controlPoints: [
48.8566,
Expand Down
4 changes: 2 additions & 2 deletions @here/harp-examples/lib/PerformanceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export namespace PerformanceUtils {
];

const DEFAULT_THEME = {
resource: "resources/berlin_tilezen_base.json"
resource: "resources/normal.day.json"
};

function getVendorFomContext(context: WebGLRenderingContext): GlInfo {
Expand Down Expand Up @@ -197,7 +197,7 @@ export namespace PerformanceUtils {
dataSource = new OmvDataSource({
baseUrl: "https://xyz.api.here.com/tiles/herebase.02",
apiFormat: APIFormat.XYZOMV,
styleSetName: "tilezen",
styleSetName: "here_olp",
maxZoomLevel: 17,
authenticationCode: accessToken,
copyrightInfo: copyrights
Expand Down
30 changes: 26 additions & 4 deletions @here/harp-examples/src/performance_benchmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,22 @@ export namespace PerformanceBenchmark {
finishTest();
}

async function ZoomInBerlin() {
startTest("ZoomIn", "Berlin");
latestResult = await PerformanceUtils.measureFlyoverSpline(
mapViewApp,
"ZoomIn_Berlin",
PerformanceTestData.BERLIN_ZOOM_IN,
flyoverNumFrames,
false,
true,
showLabels,
flyoverNumRuns,
checkIfCancelled
);
finishTest();
}

async function ZoomInOutParis() {
startTest("ZoomInOut", "Paris");
latestResult = await PerformanceUtils.measureFlyoverSpline(
Expand Down Expand Up @@ -591,7 +607,8 @@ export namespace PerformanceBenchmark {
reducedDay: "resources/berlin_tilezen_day_reduced.json",
reducedNight: "resources/berlin_tilezen_night_reduced.json",
streets: "resources/berlin_tilezen_effects_streets.json",
outlines: "resources/berlin_tilezen_effects_outlines.json"
outlines: "resources/berlin_tilezen_effects_outlines.json",
miami: "resources/normal.day.json"
},
PixelRatio: {
default: undefined,
Expand All @@ -601,6 +618,7 @@ export namespace PerformanceBenchmark {
},
CanvasSize: {
default: undefined,
"1100×900": "1100×900",
"640×400": "640×400",
"1024×768": "1024×768",
"1024×1024": "1024×1024",
Expand Down Expand Up @@ -660,7 +678,7 @@ export namespace PerformanceBenchmark {
"6": 6,
"8": 8
},
PhasedLoading: true,
PhasedLoading: false,
Berlin: () => {
openMapBerlin();
},
Expand Down Expand Up @@ -712,6 +730,9 @@ export namespace PerformanceBenchmark {
FlyOverEuropeLoaded: () => {
flyoverEuropeLoaded();
},
ZoomInBerlin: () => {
ZoomInBerlin();
},
ZoomInOutParis: () => {
ZoomInOutParis();
},
Expand All @@ -737,7 +758,7 @@ export namespace PerformanceBenchmark {
mapViewApp.mapView.theme = newTheme;
});
})
.setValue("resources/berlin_tilezen_base.json");
.setValue("resources/normal.day.json");

benchmarksFolder
.add(guiOptions, "CanvasSize", guiOptions.CanvasSize)
Expand Down Expand Up @@ -765,7 +786,7 @@ export namespace PerformanceBenchmark {
}
canvasSize = `${theCanvasElement.clientWidth}×${theCanvasElement.clientHeight}`;
})
.setValue(undefined);
.setValue("1100×900");

benchmarksFolder
.add(guiOptions, "PowerPreference", guiOptions.PowerPreference)
Expand Down Expand Up @@ -863,6 +884,7 @@ export namespace PerformanceBenchmark {
})
.setValue(undefined);

flyOversFolder.add(guiOptions, "ZoomInBerlin");
flyOversFolder.add(guiOptions, "ZoomInOutParis");
flyOversFolder.add(guiOptions, "ZoomInOutParis2");
flyOversFolder.add(guiOptions, "FlyOverNY");
Expand Down

0 comments on commit 45b2294

Please sign in to comment.