diff options
Diffstat (limited to 'app/assets/javascripts/snippets/components/show.vue')
-rw-r--r-- | app/assets/javascripts/snippets/components/show.vue | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/app/assets/javascripts/snippets/components/show.vue b/app/assets/javascripts/snippets/components/show.vue index 43be2cb7ed8..4a2f060ff7c 100644 --- a/app/assets/javascripts/snippets/components/show.vue +++ b/app/assets/javascripts/snippets/components/show.vue @@ -5,11 +5,18 @@ import SnippetHeader from './snippet_header.vue'; import SnippetTitle from './snippet_title.vue'; import SnippetBlob from './snippet_blob_view.vue'; import CloneDropdownButton from '~/vue_shared/components/clone_dropdown.vue'; +import { SNIPPET_VISIBILITY_PUBLIC } from '~/snippets/constants'; +import { + SNIPPET_MARK_VIEW_APP_START, + SNIPPET_MEASURE_BLOBS_CONTENT, +} from '~/performance_constants'; +import { performanceMarkAndMeasure } from '~/performance_utils'; +import eventHub from '~/blob/components/eventhub'; import { getSnippetMixin } from '../mixins/snippets'; -import { SNIPPET_VISIBILITY_PUBLIC } from '~/snippets/constants'; +import { markBlobPerformance } from '../utils/blob'; -import { SNIPPET_MARK_VIEW_APP_START } from '~/performance_constants'; +eventHub.$on(SNIPPET_MEASURE_BLOBS_CONTENT, markBlobPerformance); export default { components: { @@ -30,7 +37,7 @@ export default { }, }, beforeCreate() { - performance.mark(SNIPPET_MARK_VIEW_APP_START); + performanceMarkAndMeasure({ mark: SNIPPET_MARK_VIEW_APP_START }); }, }; </script> |