diff --git a/packages/commands/measure/src/__tests__/__snapshots__/measure.test.tsx.snap b/packages/commands/measure/src/__tests__/__snapshots__/measure.test.tsx.snap
index be3847f5..e38bfe4b 100644
--- a/packages/commands/measure/src/__tests__/__snapshots__/measure.test.tsx.snap
+++ b/packages/commands/measure/src/__tests__/__snapshots__/measure.test.tsx.snap
@@ -24,7 +24,7 @@ Average CPU usage
An app might run at high frame rates, such as 60 FPS or higher, but might be using too much processing power, so it's important to check CPU usage.
Depending on the device, this value can go up to
100% x number of cores
-. For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+. For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
High CPU Usage
0.5 s
Impacted threads:
@@ -862,7 +862,7 @@ exports[`flashlight measure interactive it displays measures: Web app with measu
100% x number of cores
- . For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+ . For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
@@ -3825,7 +3825,7 @@ Average CPU usage
An app might run at high frame rates, such as 60 FPS or higher, but might be using too much processing power, so it's important to check CPU usage.
Depending on the device, this value can go up to
100% x number of cores
-. For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+. For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
High CPU Usage
-
Impacted threads:
@@ -4226,7 +4226,7 @@ exports[`flashlight measure interactive it displays measures: Web app with no me
100% x number of cores
- . For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+ . For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
diff --git a/packages/commands/test/src/__tests__/measurePerformance.test.ts b/packages/commands/test/src/__tests__/measurePerformance.test.ts
index 35cf7d81..ca7e7bb9 100644
--- a/packages/commands/test/src/__tests__/measurePerformance.test.ts
+++ b/packages/commands/test/src/__tests__/measurePerformance.test.ts
@@ -15,6 +15,7 @@ jest.mock("@perf-profiler/profiler", () => {
mockPerformancePolling.setCallback(onMeasure);
onStartMeasuring();
});
+ mockedProfiler.detectDeviceRefreshRate = jest.fn(() => 120);
return {
...jest.requireActual("@perf-profiler/profiler"),
@@ -90,6 +91,9 @@ describe("measurePerformance", () => {
],
"name": "TITLE",
"score": 3,
+ "specs": {
+ "refreshRate": 120,
+ },
"status": "SUCCESS",
}
`);
diff --git a/packages/commands/test/src/__tests__/writeResults.ts b/packages/commands/test/src/__tests__/writeResults.ts
index 2a92803a..948e7de4 100644
--- a/packages/commands/test/src/__tests__/writeResults.ts
+++ b/packages/commands/test/src/__tests__/writeResults.ts
@@ -9,6 +9,7 @@ jest.mock("@perf-profiler/profiler", () => ({
profiler: {
...jest.requireActual("@perf-profiler/profiler").profiler,
installProfilerOnDevice: jest.fn(),
+ detectDeviceRefreshRate: jest.fn(() => 120),
},
}));
diff --git a/packages/commands/test/src/writeReport.ts b/packages/commands/test/src/writeReport.ts
index 8315e07f..a251375e 100644
--- a/packages/commands/test/src/writeReport.ts
+++ b/packages/commands/test/src/writeReport.ts
@@ -1,4 +1,5 @@
import { Logger } from "@perf-profiler/logger";
+import { profiler } from "@perf-profiler/profiler";
import { averageTestCaseResult } from "@perf-profiler/reporter";
import {
AveragedTestCaseResult,
@@ -26,6 +27,9 @@ export const writeReport = (
measures.length === 0 || measures[measures.length - 1].status === "FAILURE"
? "FAILURE"
: "SUCCESS",
+ specs: {
+ refreshRate: profiler.detectDeviceRefreshRate(),
+ },
};
/**
diff --git a/packages/core/types/index.ts b/packages/core/types/index.ts
index d9f8a5df..3ab5a50a 100644
--- a/packages/core/types/index.ts
+++ b/packages/core/types/index.ts
@@ -39,7 +39,7 @@ export interface TestCaseResult {
status: TestCaseResultStatus;
iterations: TestCaseIterationResult[];
type?: TestCaseResultType;
- specs?: DeviceSpecs;
+ specs: DeviceSpecs | undefined;
}
export interface AveragedTestCaseResult {
@@ -50,7 +50,7 @@ export interface AveragedTestCaseResult {
average: TestCaseIterationResult;
averageHighCpuUsage: { [processName: string]: number };
type?: TestCaseResultType;
- specs?: DeviceSpecs;
+ specs: DeviceSpecs | undefined;
}
// Shouldn't really be here but @perf-profiler/types is imported by everyone and doesn't contain any logic
diff --git a/packages/core/web-reporter-ui/ReporterView.tsx b/packages/core/web-reporter-ui/ReporterView.tsx
index ac4fe6ca..8d313b0d 100644
--- a/packages/core/web-reporter-ui/ReporterView.tsx
+++ b/packages/core/web-reporter-ui/ReporterView.tsx
@@ -73,7 +73,7 @@ const Report = ({
<>
100% x number of cores
- . For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+ . For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
100% x number of cores
- . For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+ . For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
renders the comparison view 4`] = `
100% x number of cores
- . For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+ . For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
@@ -16024,7 +16024,7 @@ exports[`
100% x number of cores
- . For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+ . For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
@@ -22040,7 +22040,7 @@ Average CPU usage
An app might run at high frame rates, such as 60 FPS or higher, but might be using too much processing power, so it's important to check CPU usage.
Depending on the device, this value can go up to
100% x number of cores
-. For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+. For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
Min Max Range:
70
@@ -22248,7 +22248,7 @@ Average CPU usage
An app might run at high frame rates, such as 60 FPS or higher, but might be using too much processing power, so it's important to check CPU usage.
Depending on the device, this value can go up to
100% x number of cores
-. For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+. For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
Min Max Range:
82
@@ -23830,7 +23830,7 @@ exports[`
100% x number of cores
- . For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+ . For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
renders the comparison view with videos 2`] = `
100% x number of cores
- . For instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+ . For instance, a Samsung A10s has 8 cores, so the max value would be 800%.
100% x number of cores
. For
- instance, a Samsung A10s has 4 cores, so the max value would be 400%.
+ instance, a Samsung A10s has 8 cores, so the max value would be 800%.
>
);
diff --git a/packages/platforms/ios-instruments/src/writeReport.ts b/packages/platforms/ios-instruments/src/writeReport.ts
index 17ffa701..333bceab 100644
--- a/packages/platforms/ios-instruments/src/writeReport.ts
+++ b/packages/platforms/ios-instruments/src/writeReport.ts
@@ -122,6 +122,9 @@ export const writeReport = (inputFileName: string, outputFileName: string) => {
status: "SUCCESS",
iterations,
type: "IOS_EXPERIMENTAL",
+ specs: {
+ refreshRate: FAKE_FPS,
+ },
};
fs.writeFileSync(outputFileName, JSON.stringify(results, null, 2));
diff --git a/website/static/examples/flashlist/report.js b/website/static/examples/flashlist/report.js
index 4ec24e67..ba3e4d62 100644
--- a/website/static/examples/flashlist/report.js
+++ b/website/static/examples/flashlist/report.js
@@ -1,4 +1,4 @@
-function e(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};function r(e){Object.defineProperty(e,"__esModule",{value:!0,configurable:!0})}function n(e){return e&&e.__esModule?e.default:e}function i(e,t){return Object.keys(t).forEach((function(r){"default"===r||"__esModule"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e}var a={},o={},s=t.parcelRequire99db;null==s&&((s=function(e){if(e in a)return a[e].exports;if(e in o){var t=o[e];delete o[e];var r={id:e,exports:{}};return a[e]=r,t.call(r.exports,r,r.exports),r.exports}var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}).register=function(e,t){o[e]=t},t.parcelRequire99db=s),s.register("1b2ls",(function(t,r){var n,i,a;e(t.exports,"Fragment",(()=>n),(e=>n=e)),e(t.exports,"jsx",(()=>i),(e=>i=e)),e(t.exports,"jsxs",(()=>a),(e=>a=e)),s("8coUR");var o=s("acw62"),l=60103;if(n=60107,"function"==typeof Symbol&&Symbol.for){var c=Symbol.for;l=c("react.element"),n=c("react.fragment")}var u=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d=Object.prototype.hasOwnProperty,h={key:!0,ref:!0,__self:!0,__source:!0};function f(e,t,r){var n,i={},a=null,o=null;for(n in void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(o=t.ref),t)d.call(t,n)&&!h.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:l,type:e,key:a,ref:o,props:i,_owner:u.current}}i=f,a=f})),s.register("8coUR",(function(e,t){var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var o,s,l=a(e),c=1;c>>=y=b>>>24,p-=y,!(16&(y=b>>>16&255))){if(0==(64&y)){b=m[(65535&b)+(f&(1<