iPerfViewer.d.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import type { DynamicFloat32Array } from "../PerformanceViewer/dynamicFloat32Array";
  2. /**
  3. * Defines the shape of a collection of datasets that our graphing service uses for drawing purposes.
  4. */
  5. export interface IPerfDatasets {
  6. /**
  7. * The ids of our dataset.
  8. */
  9. ids: string[];
  10. /**
  11. * The data to be processed by the performance graph. Each slice will be of the form of [timestamp, numberOfPoints, value1, value2...]
  12. */
  13. data: DynamicFloat32Array;
  14. /**
  15. * A list of starting indices for each slice of data collected. Used for fast access of an arbitrary slice inside the data array.
  16. */
  17. startingIndices: DynamicFloat32Array;
  18. }
  19. /**
  20. * Defines the shape of a the metadata the graphing service uses for drawing purposes.
  21. */
  22. export interface IPerfMetadata {
  23. /**
  24. * The color of the line to be drawn.
  25. */
  26. color?: string;
  27. /**
  28. * Specifies if data should be hidden, falsey by default.
  29. */
  30. hidden?: boolean;
  31. /**
  32. * Specifies the category of the data
  33. */
  34. category?: string;
  35. }
  36. /**
  37. * Defines the shape of a custom user registered event.
  38. */
  39. export interface IPerfCustomEvent {
  40. /**
  41. * The name of the event.
  42. */
  43. name: string;
  44. /**
  45. * The value for the event, if set we will use it as the value, otherwise we will count the number of occurrences.
  46. */
  47. value?: number;
  48. }