@parca/profile 0.16.452 → 0.16.454

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/MetricsGraph/MetricsTooltip/index.js +1 -1
  3. package/dist/MetricsGraphStrips/AreaGraph/Tooltip.d.ts +10 -0
  4. package/dist/MetricsGraphStrips/AreaGraph/Tooltip.d.ts.map +1 -0
  5. package/dist/MetricsGraphStrips/AreaGraph/Tooltip.js +44 -0
  6. package/dist/MetricsGraphStrips/AreaGraph/index.d.ts.map +1 -1
  7. package/dist/MetricsGraphStrips/AreaGraph/index.js +34 -4
  8. package/dist/MetricsGraphStrips/MetricsGraphStrips.stories.d.ts +8 -3
  9. package/dist/MetricsGraphStrips/MetricsGraphStrips.stories.d.ts.map +1 -1
  10. package/dist/MetricsGraphStrips/MetricsGraphStrips.stories.js +8 -8
  11. package/dist/MetricsGraphStrips/index.d.ts +6 -5
  12. package/dist/MetricsGraphStrips/index.d.ts.map +1 -1
  13. package/dist/MetricsGraphStrips/index.js +24 -5
  14. package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts +1 -0
  15. package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.d.ts.map +1 -1
  16. package/dist/ProfileIcicleGraph/IcicleGraphArrow/index.js +1 -0
  17. package/dist/ProfileIcicleGraph/index.d.ts +1 -2
  18. package/dist/ProfileIcicleGraph/index.d.ts.map +1 -1
  19. package/dist/ProfileIcicleGraph/index.js +4 -4
  20. package/dist/ProfileView/components/DashboardItems/index.d.ts +1 -2
  21. package/dist/ProfileView/components/DashboardItems/index.d.ts.map +1 -1
  22. package/dist/ProfileView/components/DashboardItems/index.js +2 -2
  23. package/dist/ProfileView/context/ProfileViewContext.d.ts +10 -0
  24. package/dist/ProfileView/context/ProfileViewContext.d.ts.map +1 -1
  25. package/dist/ProfileView/context/ProfileViewContext.js +1 -0
  26. package/dist/ProfileView/index.d.ts +1 -1
  27. package/dist/ProfileView/index.d.ts.map +1 -1
  28. package/dist/ProfileView/index.js +2 -3
  29. package/dist/ProfileView/types/visualization.d.ts +2 -0
  30. package/dist/ProfileView/types/visualization.d.ts.map +1 -1
  31. package/dist/ProfileViewWithData.d.ts +4 -2
  32. package/dist/ProfileViewWithData.d.ts.map +1 -1
  33. package/dist/ProfileViewWithData.js +7 -4
  34. package/dist/TimelineGuide/index.d.ts.map +1 -1
  35. package/dist/index.d.ts +1 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +1 -0
  38. package/dist/styles.css +1 -1
  39. package/package.json +6 -6
  40. package/src/MetricsGraph/MetricsTooltip/index.tsx +1 -1
  41. package/src/MetricsGraphStrips/AreaGraph/Tooltip.tsx +83 -0
  42. package/src/MetricsGraphStrips/AreaGraph/index.tsx +48 -3
  43. package/src/MetricsGraphStrips/MetricsGraphStrips.stories.tsx +8 -8
  44. package/src/MetricsGraphStrips/index.tsx +40 -13
  45. package/src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx +1 -0
  46. package/src/ProfileIcicleGraph/index.tsx +4 -6
  47. package/src/ProfileView/components/DashboardItems/index.tsx +0 -3
  48. package/src/ProfileView/context/ProfileViewContext.tsx +12 -0
  49. package/src/ProfileView/index.tsx +2 -3
  50. package/src/ProfileView/types/visualization.ts +2 -0
  51. package/src/ProfileViewWithData.tsx +11 -5
  52. package/src/TimelineGuide/index.tsx +0 -5
  53. package/src/index.tsx +1 -0
@@ -17,9 +17,10 @@ import {QueryRequest_ReportType, QueryServiceClient} from '@parca/client';
17
17
  import {useGrpcMetadata, useParcaContext, useURLState} from '@parca/components';
18
18
  import {saveAsBlob} from '@parca/utilities';
19
19
 
20
- import {FIELD_FUNCTION_NAME} from './ProfileIcicleGraph/IcicleGraphArrow';
20
+ import {FIELD_FUNCTION_NAME, FIELD_TIMESTAMP} from './ProfileIcicleGraph/IcicleGraphArrow';
21
21
  import {ProfileSource} from './ProfileSource';
22
22
  import {ProfileView} from './ProfileView';
23
+ import {TimelineGuideData} from './ProfileView/context/ProfileViewContext';
23
24
  import {useQuery} from './useQuery';
24
25
  import {downloadPprof} from './utils';
25
26
 
@@ -28,14 +29,16 @@ interface ProfileViewWithDataProps {
28
29
  profileSource: ProfileSource;
29
30
  compare?: boolean;
30
31
  showVisualizationSelector?: boolean;
31
- showTimelineGuide?: boolean;
32
+ isGroupByTimestamp?: boolean;
33
+ timelineGuide?: TimelineGuideData;
32
34
  }
33
35
 
34
36
  export const ProfileViewWithData = ({
35
37
  queryClient,
36
38
  profileSource,
37
39
  showVisualizationSelector,
38
- showTimelineGuide,
40
+ isGroupByTimestamp,
41
+ timelineGuide,
39
42
  }: ProfileViewWithDataProps): JSX.Element => {
40
43
  const metadata = useGrpcMetadata();
41
44
  const [dashboardItems] = useURLState<string[]>('dashboard_items', {
@@ -44,7 +47,10 @@ export const ProfileViewWithData = ({
44
47
  const [sourceBuildID] = useURLState<string>('source_buildid');
45
48
  const [sourceFilename] = useURLState<string>('source_filename');
46
49
  const [groupBy] = useURLState<string[]>('group_by', {
47
- defaultValue: [FIELD_FUNCTION_NAME],
50
+ defaultValue: [
51
+ isGroupByTimestamp === true ? FIELD_TIMESTAMP : (null as unknown as string),
52
+ FIELD_FUNCTION_NAME,
53
+ ].filter(Boolean),
48
54
  alwaysReturnArray: true,
49
55
  });
50
56
 
@@ -244,7 +250,7 @@ export const ProfileViewWithData = ({
244
250
  onDownloadPProf={() => void downloadPProfClick()}
245
251
  pprofDownloading={pprofDownloading}
246
252
  showVisualizationSelector={showVisualizationSelector}
247
- showTimelineGuide={showTimelineGuide}
253
+ timelineGuide={timelineGuide}
248
254
  />
249
255
  );
250
256
  };
@@ -88,11 +88,6 @@ export const TimelineGuide = ({bounds, width, height, margin, ticks}: Props): JS
88
88
  y1={-height + 20}
89
89
  y2={-height + 20}
90
90
  />
91
- {/* <g transform={`translate(${(width - 2.5 * margin) / 2}, ${margin / 2})`}>
92
- <text fill="currentColor" dy=".71em" y={5} className="text-sm">
93
- Time
94
- </text>
95
- </g> */}
96
91
  </g>
97
92
  </svg>
98
93
  </div>
package/src/index.tsx CHANGED
@@ -25,6 +25,7 @@ export * from './ProfileViewWithData';
25
25
  export * from './utils';
26
26
  export * from './ProfileTypeSelector';
27
27
  export * from './SourceView';
28
+ export * from './ProfileMetricsGraph';
28
29
  export {default as Callgraph} from './Callgraph';
29
30
 
30
31
  export const DEFAULT_PROFILE_EXPLORER_PARAM_VALUES = {