Remove CM6 performance measurement (#22663)

GitOrigin-RevId: 2178f2b66c200005517ed8ff52afadd8b5fda14b
This commit is contained in:
Alf Eaton
2025-01-28 09:04:50 +00:00
committed by Copybot
parent 47663fbe35
commit 4351805f7c
4 changed files with 1 additions and 353 deletions
@@ -1,7 +1,6 @@
import { useIdeReactContext } from '@/features/ide-react/context/ide-react-context'
import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
import { EditorType } from '@/features/ide-react/editor/types/editor-type'
import { reportCM6Perf } from '@/infrastructure/cm6-performance'
import { putJSON } from '@/infrastructure/fetch-json'
import { debugConsole } from '@/utils/debugging'
import moment from 'moment'
@@ -10,23 +9,9 @@ import useEventListener from '@/shared/hooks/use-event-listener'
import useDomEventListener from '@/shared/hooks/use-dom-event-listener'
function createEditingSessionHeartbeatData(editorType: EditorType) {
const segmentation: Record<string, unknown> = {
return {
editorType,
}
const cm6PerfData = reportCM6Perf()
// Ignore if no typing has happened
if (cm6PerfData.numberOfEntries > 0) {
for (const [key, value] of Object.entries(cm6PerfData)) {
const segmentationPropName =
'cm6Perf' + key.charAt(0).toUpperCase() + key.slice(1)
if (value !== null) {
segmentation[segmentationPropName] = value
}
}
}
return segmentation
}
function sendEditingSessionHeartbeat(