Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs-ui/stories/components/profiling/EventedTrace.json

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions docs-ui/stories/components/profiling/flamegraphZoomView.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {FlamegraphZoomView} from 'sentry/components/profiling/FlamegraphZoomView';
import {CanvasPoolManager} from 'sentry/utils/profiling/canvasScheduler';
import {Flamegraph} from 'sentry/utils/profiling/flamegraph';
import {LightFlamegraphTheme} from 'sentry/utils/profiling/flamegraph/FlamegraphTheme';
import {importProfile} from 'sentry/utils/profiling/profile/importProfile';

const trace = require('./EventedTrace.json');

export default {
title: 'Components/Profiling/FlamegraphZoomView',
};

export const EventedTrace = ({inverted, leftHeavy}) => {
const canvasPoolManager = new CanvasPoolManager();

const profiles = importProfile(trace);
const flamegraph = new Flamegraph(profiles.profiles[0], 0, inverted, leftHeavy);

return (
<FlamegraphZoomView
flamegraph={flamegraph}
highlightRecursion="false"
colorCoding="by symbol name"
canvasPoolManager={canvasPoolManager}
flamegraphTheme={LightFlamegraphTheme}
/>
);
};

EventedTrace.args = {
inverted: false,
leftHeavy: false,
};
Loading