Commit 184b59d5 authored by Denys Mishunov's avatar Denys Mishunov Committed by Jose Vargas

Moved the performance scripts

To improve the strucutre, moved performance-related
utils and constants into a dedicated folder
parent c9424072
<script> <script>
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { initEditorLite } from '~/blob/utils'; import { initEditorLite } from '~/blob/utils';
import { SNIPPET_MEASURE_BLOBS_CONTENT } from '~/performance_constants'; import { SNIPPET_MEASURE_BLOBS_CONTENT } from '~/performance/constants';
import eventHub from './eventhub'; import eventHub from './eventhub';
......
...@@ -10,8 +10,8 @@ import { ...@@ -10,8 +10,8 @@ import {
WEBIDE_MEASURE_TREE_FROM_REQUEST, WEBIDE_MEASURE_TREE_FROM_REQUEST,
WEBIDE_MEASURE_FILE_FROM_REQUEST, WEBIDE_MEASURE_FILE_FROM_REQUEST,
WEBIDE_MEASURE_FILE_AFTER_INTERACTION, WEBIDE_MEASURE_FILE_AFTER_INTERACTION,
} from '~/performance_constants'; } from '~/performance/constants';
import { performanceMarkAndMeasure } from '~/performance_utils'; import { performanceMarkAndMeasure } from '~/performance/utils';
import { modalTypes } from '../constants'; import { modalTypes } from '../constants';
import eventHub from '../eventhub'; import eventHub from '../eventhub';
import FindFile from '~/vue_shared/components/file_finder/index.vue'; import FindFile from '~/vue_shared/components/file_finder/index.vue';
......
...@@ -6,8 +6,8 @@ import { ...@@ -6,8 +6,8 @@ import {
WEBIDE_MARK_TREE_START, WEBIDE_MARK_TREE_START,
WEBIDE_MEASURE_TREE_FROM_REQUEST, WEBIDE_MEASURE_TREE_FROM_REQUEST,
WEBIDE_MARK_FILE_CLICKED, WEBIDE_MARK_FILE_CLICKED,
} from '~/performance_constants'; } from '~/performance/constants';
import { performanceMarkAndMeasure } from '~/performance_utils'; import { performanceMarkAndMeasure } from '~/performance/utils';
import eventHub from '../eventhub'; import eventHub from '../eventhub';
import IdeFileRow from './ide_file_row.vue'; import IdeFileRow from './ide_file_row.vue';
import NavDropdown from './nav_dropdown.vue'; import NavDropdown from './nav_dropdown.vue';
......
...@@ -9,8 +9,8 @@ import { ...@@ -9,8 +9,8 @@ import {
WEBIDE_MARK_FILE_START, WEBIDE_MARK_FILE_START,
WEBIDE_MEASURE_FILE_AFTER_INTERACTION, WEBIDE_MEASURE_FILE_AFTER_INTERACTION,
WEBIDE_MEASURE_FILE_FROM_REQUEST, WEBIDE_MEASURE_FILE_FROM_REQUEST,
} from '~/performance_constants'; } from '~/performance/constants';
import { performanceMarkAndMeasure } from '~/performance_utils'; import { performanceMarkAndMeasure } from '~/performance/utils';
import eventHub from '../eventhub'; import eventHub from '../eventhub';
import { import {
leftSidebarViews, leftSidebarViews,
......
import { languages } from 'monaco-editor'; import { languages } from 'monaco-editor';
import { flatten, isString } from 'lodash'; import { flatten, isString } from 'lodash';
import { SIDE_LEFT, SIDE_RIGHT } from './constants'; import { SIDE_LEFT, SIDE_RIGHT } from './constants';
import { performanceMarkAndMeasure } from '~/performance_utils'; import { performanceMarkAndMeasure } from '~/performance/utils';
const toLowerCase = x => x.toLowerCase(); const toLowerCase = x => x.toLowerCase();
......
/* eslint-disable no-console */ /* eslint-disable no-console */
import { getCLS, getFID, getLCP } from 'web-vitals'; import { getCLS, getFID, getLCP } from 'web-vitals';
import { PERFORMANCE_TYPE_MARK, PERFORMANCE_TYPE_MEASURE } from '~/performance_constants'; import { PERFORMANCE_TYPE_MARK, PERFORMANCE_TYPE_MEASURE } from '~/performance/constants';
const initVitalsLog = () => { const initVitalsLog = () => {
const reportVital = data => { const reportVital = data => {
......
...@@ -9,9 +9,9 @@ import FormFooterActions from '~/vue_shared/components/form/form_footer_actions. ...@@ -9,9 +9,9 @@ import FormFooterActions from '~/vue_shared/components/form/form_footer_actions.
import { import {
SNIPPET_MARK_EDIT_APP_START, SNIPPET_MARK_EDIT_APP_START,
SNIPPET_MEASURE_BLOBS_CONTENT, SNIPPET_MEASURE_BLOBS_CONTENT,
} from '~/performance_constants'; } from '~/performance/constants';
import eventHub from '~/blob/components/eventhub'; import eventHub from '~/blob/components/eventhub';
import { performanceMarkAndMeasure } from '~/performance_utils'; import { performanceMarkAndMeasure } from '~/performance/utils';
import UpdateSnippetMutation from '../mutations/updateSnippet.mutation.graphql'; import UpdateSnippetMutation from '../mutations/updateSnippet.mutation.graphql';
import CreateSnippetMutation from '../mutations/createSnippet.mutation.graphql'; import CreateSnippetMutation from '../mutations/createSnippet.mutation.graphql';
......
...@@ -9,8 +9,8 @@ import { SNIPPET_VISIBILITY_PUBLIC } from '~/snippets/constants'; ...@@ -9,8 +9,8 @@ import { SNIPPET_VISIBILITY_PUBLIC } from '~/snippets/constants';
import { import {
SNIPPET_MARK_VIEW_APP_START, SNIPPET_MARK_VIEW_APP_START,
SNIPPET_MEASURE_BLOBS_CONTENT, SNIPPET_MEASURE_BLOBS_CONTENT,
} from '~/performance_constants'; } from '~/performance/constants';
import { performanceMarkAndMeasure } from '~/performance_utils'; import { performanceMarkAndMeasure } from '~/performance/utils';
import eventHub from '~/blob/components/eventhub'; import eventHub from '~/blob/components/eventhub';
import { getSnippetMixin } from '../mixins/snippets'; import { getSnippetMixin } from '../mixins/snippets';
......
...@@ -7,8 +7,8 @@ import { ...@@ -7,8 +7,8 @@ import {
SNIPPET_LEVELS_MAP, SNIPPET_LEVELS_MAP,
SNIPPET_VISIBILITY, SNIPPET_VISIBILITY,
} from '../constants'; } from '../constants';
import { performanceMarkAndMeasure } from '~/performance_utils'; import { performanceMarkAndMeasure } from '~/performance/utils';
import { SNIPPET_MARK_BLOBS_CONTENT, SNIPPET_MEASURE_BLOBS_CONTENT } from '~/performance_constants'; import { SNIPPET_MARK_BLOBS_CONTENT, SNIPPET_MEASURE_BLOBS_CONTENT } from '~/performance/constants';
const createLocalId = () => uniqueId('blob_local_'); const createLocalId = () => uniqueId('blob_local_');
......
import { SNIPPET_MEASURE_BLOBS_CONTENT } from '~/performance_constants'; import { SNIPPET_MEASURE_BLOBS_CONTENT } from '~/performance/constants';
import eventHub from '~/blob/components/eventhub'; import eventHub from '~/blob/components/eventhub';
export default { export default {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment