-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
count
が何故か 2191 or 0 で固定されて集計されてしまう問題を修正
#49
Conversation
this.currentState = { | ||
// NOTE: Vue の data は getter を使って構成されているので、プロパティにアクセスするタイミングによって値が変わってしまう。 | ||
// これでは集計上不都合なので、ここで一度 pure なオブジェクトに変換している。 | ||
this.currentState = JSON.parse(JSON.stringify({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vueのobserverが悪さしているのかな〜と思って、送信するデータを丸ごと JSON.parse(JSON.stringify(...))
するようにしてみた
// Infinity は JSON に変換できないので -1 として扱う | ||
maxLoop: newState.configInUse?.maxLoop === Infinity ? -1 : (newState.configInUse?.maxLoop ?? this.currentState.configInUse.maxLoop), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ついでに無限ループがONだと集計の送信に失敗するバグがあったので直しておいた
@@ -160,7 +164,7 @@ class MemoryMeasurementScheduler { | |||
|
|||
const scheduleMeasurement = () => { | |||
const interval = measurementInterval() | |||
console.log('Scheduling memory measurement in ' + Math.round(interval / 1000) + ' seconds.') | |||
console.log(`Scheduling memory measurement in ${Math.round(interval / 1000)} seconds (${new Date(Date.now() + interval).toLocaleString()}).`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今はN秒後に performance.measureMemory
が発火する、というログしかだしていないけど、これだと何時何分くらいに発火するのかパッと分からなくてデバッグ時に不便なので、ついでに時刻の形式で表示するようにしてみた。
ref: #33
count
が何故か 2191 or 0 で固定されて集計されてしまっている