|
@@ -40,16 +40,16 @@ function tensorFlowWebPackStatus() {
|
|
return __cache4TensorFlowWebPackStatus;
|
|
return __cache4TensorFlowWebPackStatus;
|
|
}
|
|
}
|
|
|
|
|
|
-function getCPUModel() {
|
|
|
|
- if (typeof nodeRequire != "undefined") {
|
|
|
|
- var os = window.nodeRequire("os");
|
|
|
|
- const cpus = os.cpus();
|
|
|
|
- if (cpus.length > 0) {
|
|
|
|
- return cpus[0].model;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return "null";
|
|
|
|
-}
|
|
|
|
|
|
+// function getCPUModel() {
|
|
|
|
+// if (typeof nodeRequire != "undefined") {
|
|
|
|
+// var os = window.nodeRequire("os");
|
|
|
|
+// const cpus = os.cpus();
|
|
|
|
+// if (cpus.length > 0) {
|
|
|
|
+// return cpus[0].model;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// return "null";
|
|
|
|
+// }
|
|
|
|
|
|
// if (os.isWin7) alert("是win7");
|
|
// if (os.isWin7) alert("是win7");
|
|
|
|
|
|
@@ -186,15 +186,16 @@ export default {
|
|
console.log(detectTimeArray);
|
|
console.log(detectTimeArray);
|
|
detectTimeArray.push(0, 0); // 避免再次达到push条件和上传条件
|
|
detectTimeArray.push(0, 0); // 避免再次达到push条件和上传条件
|
|
|
|
|
|
- const roundAvg100 = Math.round(avg / 100) * 100;
|
|
|
|
- const osType = os.isWin7 ? "win7" : os.isWin10 ? "win10" : "other";
|
|
|
|
- const stats = `webgl: ${webgl_available()}; tf_backend: ${faceapi.tf.getBackend()}; os: ${osType}; cpu: ${getCPUModel()}`;
|
|
|
|
- window._hmt.push([
|
|
|
|
- "_trackEvent",
|
|
|
|
- "正在考试页面",
|
|
|
|
- "实时人脸检测统计" + roundAvg100 + "ms",
|
|
|
|
- stats,
|
|
|
|
- ]);
|
|
|
|
|
|
+ // FIXME: 上线初期停止统计此类信息,过于零散
|
|
|
|
+ // const roundAvg100 = Math.round(avg / 100) * 100;
|
|
|
|
+ // const osType = os.isWin7 ? "win7" : os.isWin10 ? "win10" : "other";
|
|
|
|
+ // const stats = `webgl: ${webgl_available()}; tf_backend: ${faceapi.tf.getBackend()}; os: ${osType}; cpu: ${getCPUModel()}`;
|
|
|
|
+ // window._hmt.push([
|
|
|
|
+ // "_trackEvent",
|
|
|
|
+ // "正在考试页面",
|
|
|
|
+ // "实时人脸检测统计" + roundAvg100 + "ms",
|
|
|
|
+ // stats,
|
|
|
|
+ // ]);
|
|
|
|
|
|
this.multipleTimeUsage = roundAvg;
|
|
this.multipleTimeUsage = roundAvg;
|
|
}
|
|
}
|