@powerhousedao/academy 5.0.0-staging.9 → 5.0.1-staging.2

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 (108) hide show
  1. package/.vscode/settings.json +1 -1
  2. package/CHANGELOG.md +400 -0
  3. package/README.md +3 -3
  4. package/babel.config.js +1 -1
  5. package/blog/BeyondCommunication-ABlueprintForDevelopment.md +25 -24
  6. package/blog/TheChallengeOfChange.md +21 -21
  7. package/docs/academy/01-GetStarted/00-ExploreDemoPackage.mdx +67 -30
  8. package/docs/academy/01-GetStarted/01-CreateNewPowerhouseProject.md +38 -21
  9. package/docs/academy/01-GetStarted/02-DefineToDoListDocumentModel.md +24 -19
  10. package/docs/academy/01-GetStarted/03-ImplementOperationReducers.md +44 -41
  11. package/docs/academy/01-GetStarted/04-BuildToDoListEditor.md +10 -10
  12. package/docs/academy/01-GetStarted/05-VetraStudio.md +164 -0
  13. package/docs/academy/01-GetStarted/06-ReactorMCP.md +58 -0
  14. package/docs/academy/01-GetStarted/home.mdx +185 -90
  15. package/docs/academy/01-GetStarted/images/Modules.png +0 -0
  16. package/docs/academy/01-GetStarted/images/VetraStudioDrive.png +0 -0
  17. package/docs/academy/01-GetStarted/styles.module.css +5 -5
  18. package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/01-Prerequisites.md +46 -18
  19. package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/02-StandardDocumentModelWorkflow.md +118 -68
  20. package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/03-BuilderTools.md +75 -33
  21. package/docs/academy/02-MasteryTrack/01-BuilderEnvironment/_category_.json +6 -6
  22. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/01-WhatIsADocumentModel.md +30 -21
  23. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/02-SpecifyTheStateSchema.md +41 -37
  24. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/03-SpecifyDocumentOperations.md +29 -25
  25. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/04-UseTheDocumentModelGenerator.md +36 -37
  26. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/05-ImplementDocumentReducers.md +128 -109
  27. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/06-ImplementDocumentModelTests.md +95 -86
  28. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/07-ExampleToDoListRepository.md +7 -9
  29. package/docs/academy/02-MasteryTrack/02-DocumentModelCreation/_category_.json +6 -6
  30. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/01-BuildingDocumentEditors.md +65 -47
  31. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/02-ConfiguringDrives.md +77 -62
  32. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/03-BuildingADriveExplorer.md +360 -349
  33. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/06-DocumentTools/00-DocumentToolbar.mdx +16 -10
  34. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/06-DocumentTools/01-OperationHistory.md +10 -7
  35. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/06-DocumentTools/02-RevisionHistoryTimeline.md +25 -17
  36. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/06-DocumentTools/_category_.json +6 -6
  37. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-Authorization/01-RenownAuthenticationFlow.md +14 -7
  38. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-Authorization/02-Authorization.md +0 -1
  39. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/07-Authorization/_category_.json +5 -5
  40. package/docs/academy/02-MasteryTrack/03-BuildingUserExperiences/_category_.json +1 -1
  41. package/docs/academy/02-MasteryTrack/04-WorkWithData/01-GraphQLAtPowerhouse.md +45 -33
  42. package/docs/academy/02-MasteryTrack/04-WorkWithData/02-UsingTheAPI.mdx +61 -18
  43. package/docs/academy/02-MasteryTrack/04-WorkWithData/03-UsingSubgraphs.md +50 -54
  44. package/docs/academy/02-MasteryTrack/04-WorkWithData/04-analytics-processor.md +126 -110
  45. package/docs/academy/02-MasteryTrack/04-WorkWithData/05-RelationalDbProcessor.md +75 -45
  46. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/GraphQL References/QueryingADocumentWithGraphQL.md +23 -21
  47. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/best-practices.md +9 -9
  48. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/graphql/index.md +11 -23
  49. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/graphql/integration.md +25 -9
  50. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/intro.md +10 -10
  51. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/benchmarks.md +1 -1
  52. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/index.md +16 -11
  53. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/memory.md +6 -5
  54. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/schema.md +2 -2
  55. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/typescript/utilities.md +7 -5
  56. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/use-cases/maker.md +32 -58
  57. package/docs/academy/02-MasteryTrack/04-WorkWithData/06-Analytics Engine/use-cases/processors.md +1 -1
  58. package/docs/academy/02-MasteryTrack/04-WorkWithData/07-drive-analytics.md +105 -71
  59. package/docs/academy/02-MasteryTrack/04-WorkWithData/_ARCHIVE-AnalyticsProcessorTutorial/_01-SetupBuilderEnvironment.md +22 -0
  60. package/docs/academy/02-MasteryTrack/04-WorkWithData/_ARCHIVE-AnalyticsProcessorTutorial/_02-CreateNewPowerhouseProject.md +9 -8
  61. package/docs/academy/02-MasteryTrack/04-WorkWithData/_ARCHIVE-AnalyticsProcessorTutorial/_03-GenerateAnAnalyticsProcessor.md +28 -32
  62. package/docs/academy/02-MasteryTrack/04-WorkWithData/_ARCHIVE-AnalyticsProcessorTutorial/_04-UpdateAnalyticsProcessor.md +25 -26
  63. package/docs/academy/02-MasteryTrack/04-WorkWithData/_ARCHIVE-AnalyticsProcessorTutorial/_category_.json +1 -1
  64. package/docs/academy/02-MasteryTrack/04-WorkWithData/_category_.json +7 -7
  65. package/docs/academy/02-MasteryTrack/05-Launch/01-IntroductionToPackages.md +3 -4
  66. package/docs/academy/02-MasteryTrack/05-Launch/02-PublishYourProject.md +69 -45
  67. package/docs/academy/02-MasteryTrack/05-Launch/03-SetupEnvironment.md +70 -40
  68. package/docs/academy/02-MasteryTrack/05-Launch/04-ConfigureEnvironment.md +1 -0
  69. package/docs/academy/02-MasteryTrack/05-Launch/_category_.json +7 -7
  70. package/docs/academy/02-MasteryTrack/_category_.json +6 -6
  71. package/docs/academy/03-ExampleUsecases/Chatroom/02-CreateNewPowerhouseProject.md +5 -3
  72. package/docs/academy/03-ExampleUsecases/Chatroom/03-DefineChatroomDocumentModel.md +38 -37
  73. package/docs/academy/03-ExampleUsecases/Chatroom/04-ImplementOperationReducers.md +45 -41
  74. package/docs/academy/03-ExampleUsecases/Chatroom/05-ImplementChatroomEditor.md +14 -14
  75. package/docs/academy/03-ExampleUsecases/Chatroom/06-LaunchALocalReactor.md +6 -6
  76. package/docs/academy/03-ExampleUsecases/Chatroom/_category_.json +1 -1
  77. package/docs/academy/04-APIReferences/00-PowerhouseCLI.md +104 -43
  78. package/docs/academy/04-APIReferences/01-ReactHooks.md +177 -129
  79. package/docs/academy/04-APIReferences/04-RelationalDatabase.md +121 -113
  80. package/docs/academy/04-APIReferences/05-PHDocumentMigrationGuide.md +48 -41
  81. package/docs/academy/04-APIReferences/_category_.json +6 -6
  82. package/docs/academy/05-Architecture/00-PowerhouseArchitecture.md +1 -2
  83. package/docs/academy/05-Architecture/01-WorkingWithTheReactor.md +11 -8
  84. package/docs/academy/05-Architecture/05-DocumentModelTheory/_category_.json +1 -1
  85. package/docs/academy/05-Architecture/_category_.json +6 -6
  86. package/docs/academy/06-ComponentLibrary/00-DocumentEngineering.md +25 -23
  87. package/docs/academy/06-ComponentLibrary/02-CreateCustomScalars.md +105 -93
  88. package/docs/academy/06-ComponentLibrary/03-IntegrateIntoAReactComponent.md +1 -0
  89. package/docs/academy/06-ComponentLibrary/_category_.json +7 -7
  90. package/docs/academy/07-Cookbook.md +268 -35
  91. package/docs/academy/08-Glossary.md +7 -1
  92. package/docs/bookofpowerhouse/01-Overview.md +2 -2
  93. package/docs/bookofpowerhouse/02-GeneralFrameworkAndPhilosophy.md +1 -7
  94. package/docs/bookofpowerhouse/03-PowerhouseSoftwareArchitecture.md +10 -7
  95. package/docs/bookofpowerhouse/04-DevelopmentApproaches.md +10 -4
  96. package/docs/bookofpowerhouse/05-SNOsandANewModelForOSSandPublicGoods.md +23 -30
  97. package/docs/bookofpowerhouse/06-SNOsInActionAndPlatformEconomies.md +0 -7
  98. package/docusaurus.config.ts +64 -66
  99. package/package.json +9 -7
  100. package/scripts/generate-combined-cli-docs.ts +43 -13
  101. package/sidebars.ts +2 -0
  102. package/src/components/HomepageFeatures/index.tsx +171 -78
  103. package/src/components/HomepageFeatures/styles.module.css +1 -2
  104. package/src/css/custom.css +89 -89
  105. package/src/pages/_archive-homepage.tsx +17 -16
  106. package/src/theme/DocCardList/index.tsx +9 -8
  107. package/static.json +6 -6
  108. package/tsconfig.tsbuildinfo +1 -0
@@ -11,11 +11,17 @@ The `analytics-engine-graphql` module provides types and resolvers needed for a
11
11
  The graphql package contains typical resolvers and typedefs. The resolvers, however, are dependent on another object: `AnalyticsModel`. This object is responsible for connecting GQL types with an `IAnalyticsStore` implementation.
12
12
 
13
13
  ```typescript
14
- import { AnalyticsModel, AnalyticsResolvers, typedefs } from "@powerhousedao/analytics-engine-graphql";
14
+ import {
15
+ AnalyticsModel,
16
+ AnalyticsResolvers,
17
+ typedefs,
18
+ } from "@powerhousedao/analytics-engine-graphql";
15
19
  import { AnalyticsQueryEngine } from "@powerhousedao/analytics-engine-core";
16
20
  import { MemoryAnalyticsStore } from "@powerhousedao/analytics-engine-browser";
17
21
 
18
- const model = new AnalyticsModel(new AnalyticsQueryEngine(new MemoryAnalyticsStore()));
22
+ const model = new AnalyticsModel(
23
+ new AnalyticsQueryEngine(new MemoryAnalyticsStore()),
24
+ );
19
25
  ```
20
26
 
21
27
  > Note that the analytics resolvers require the passed in context to have an `AnalyticsModel` implementation on it. See below for details.
@@ -30,10 +36,14 @@ import http from "http";
30
36
 
31
37
  import { makeExecutableSchema } from "@graphql-tools/schema";
32
38
  import { ApolloServer } from "@apollo/server";
33
- import { expressMiddleware } from '@apollo/server/express4';
34
- import { ApolloServerPluginDrainHttpServer } from '@apollo/server/plugin/drainHttpServer';
35
-
36
- import { AnalyticsModel, AnalyticsResolvers, typedefs } from "@powerhousedao/analytics-engine-graphql";
39
+ import { expressMiddleware } from "@apollo/server/express4";
40
+ import { ApolloServerPluginDrainHttpServer } from "@apollo/server/plugin/drainHttpServer";
41
+
42
+ import {
43
+ AnalyticsModel,
44
+ AnalyticsResolvers,
45
+ typedefs,
46
+ } from "@powerhousedao/analytics-engine-graphql";
37
47
  import { AnalyticsQueryEngine } from "@powerhousedao/analytics-engine-core";
38
48
  import { MemoryAnalyticsStore } from "@powerhousedao/analytics-engine-browser";
39
49
 
@@ -48,7 +58,10 @@ const schema = makeExecutableSchema({
48
58
  });
49
59
 
50
60
  // create an apollo instance
51
- const plugins = [ApolloServerPluginDrainHttpServer({ httpServer }), responseCachePlugin()];
61
+ const plugins = [
62
+ ApolloServerPluginDrainHttpServer({ httpServer }),
63
+ responseCachePlugin(),
64
+ ];
52
65
  const server = new ApolloServer({
53
66
  schema,
54
67
  plugins,
@@ -57,9 +70,12 @@ const server = new ApolloServer({
57
70
  await server.start();
58
71
 
59
72
  // needed by the analytics resolvers
60
- const model = new AnalyticsModel(new AnalyticsQueryEngine(new MemoryAnalyticsStore()));
73
+ const model = new AnalyticsModel(
74
+ new AnalyticsQueryEngine(new MemoryAnalyticsStore()),
75
+ );
61
76
 
62
- app.use("/graphql",
77
+ app.use(
78
+ "/graphql",
63
79
  express.json(),
64
80
  expressMiddleware(server, {
65
81
  context: ({ req }) => {
@@ -109,7 +109,7 @@ The analytics engine supports various granularity options, each suitable for dif
109
109
  5. `monthly` : Monthly granularity is useful for a more detailed view of trends and patterns, particularly useful for operational planning and monitoring.
110
110
 
111
111
  6. `weekly` : Provides weekly data aggregation, which is helpful for short-term performance tracking and operational adjustments.
112
- daily: Offers a day-to-day breakdown, ideal for detailed analysis of daily operations or events.
112
+ daily: Offers a day-to-day breakdown, ideal for detailed analysis of daily operations or events.
113
113
 
114
114
  7. `hourly`: The most granular level, providing insights into hourly fluctuations. Useful in scenarios where short-term data spikes or dips are significant.
115
115
 
@@ -118,7 +118,7 @@ daily: Offers a day-to-day breakdown, ideal for detailed analysis of daily opera
118
118
  - Data Volume: Higher granularity (like hourly or daily) results in a larger volume of data points, providing more detailed insights but potentially leading to more complex analysis. Lower granularity (like annual or total) simplifies the data into fewer, broader data points.
119
119
 
120
120
  - Trend Analysis: Finer granularity helps in identifying short-term trends and anomalies, whereas coarser granularity is better for long-term trend analysis and strategic planning.
121
- Performance Impact: Queries with finer granularity might be more resource-intensive and take longer to execute due to the larger number of data points processed.
121
+ Performance Impact: Queries with finer granularity might be more resource-intensive and take longer to execute due to the larger number of data points processed.
122
122
 
123
123
  - Contextual Relevance: The choice of granularity should match the context of the analysis. For instance, financial planning might prefer annual or quarterly granularity, while operational monitoring might require daily or hourly data.
124
124
 
@@ -130,20 +130,20 @@ In summary, the choice of granularity in your query significantly influences the
130
130
 
131
131
  These are high-level definitions of major terms you will need to know.
132
132
 
133
- * **AnalyticsSeries** - The individual metric values, comprised of `(value, start, end)`. There should be one of these for every change in value.
133
+ - **AnalyticsSeries** - The individual metric values, comprised of `(value, start, end)`. There should be one of these for every change in value.
134
134
 
135
- * **AnalyticsDimension** - Shared objects that decorate series objects with `name` and `path` information. Used to relate metrics to one another.
135
+ - **AnalyticsDimension** - Shared objects that decorate series objects with `name` and `path` information. Used to relate metrics to one another.
136
136
 
137
- * **Path** - Composable, `/`-delimited string field on dimension that is used to _determine specificity_ during queries.
137
+ - **Path** - Composable, `/`-delimited string field on dimension that is used to _determine specificity_ during queries.
138
138
 
139
- * **LOD** - A number that, when paired with `path`, determines how to aggregate values across dimensions.
139
+ - **LOD** - A number that, when paired with `path`, determines how to aggregate values across dimensions.
140
140
 
141
- * **Granularity** - Determines how to aggregate values over time, like "monthly" or "yearly".
141
+ - **Granularity** - Determines how to aggregate values over time, like "monthly" or "yearly".
142
142
 
143
143
  ## Next steps
144
144
 
145
145
  Next steps depend on use case.
146
146
 
147
- * For developers looking to **input data**, or **query data with Typescript**, see the [Typescript](./typescript/) docs.
148
- * For developers interested in **querying data with GraphQL**, see the [GraphQL](./graphql/) documentation. Data cannot be input through GraphQL.
149
- * For developers interested in **contributing to this project**, see the developer documentation [on GitHub](https://github.com/powerhouse-inc/analytics-engine).
147
+ - For developers looking to **input data**, or **query data with Typescript**, see the [Typescript](./typescript/) docs.
148
+ - For developers interested in **querying data with GraphQL**, see the [GraphQL](./graphql/) documentation. Data cannot be input through GraphQL.
149
+ - For developers interested in **contributing to this project**, see the developer documentation [on GitHub](https://github.com/powerhouse-inc/analytics-engine).
@@ -24,4 +24,4 @@ In [this benchmark](https://github.com/powerhouse-inc/analytics-engine/blob/main
24
24
  | ------------ | ----------- | ------------ |
25
25
  | Init | 3 | 323.00 ms |
26
26
  | 100 Inserts | 478 | 2.08 ms |
27
- | 200k Inserts | 0 | 4448.10 ms |
27
+ | 200k Inserts | 0 | 4448.10 ms |
@@ -70,7 +70,9 @@ const results = await engine.execute({
70
70
  currency: AnalyticsPath.fromArray(["DAI"]),
71
71
  metrics: ["Forecast"],
72
72
  select: {
73
- report: [AnalyticsPath.fromArray(["atlas", "EcosystemActor", "50", "2023", "11"])],
73
+ report: [
74
+ AnalyticsPath.fromArray(["atlas", "EcosystemActor", "50", "2023", "11"]),
75
+ ],
74
76
  },
75
77
  granularity: 0,
76
78
  lod: {},
@@ -111,11 +113,11 @@ type GroupedPeriodResult = {
111
113
  - `unit`: This indicates the unit of measurement for the metric, such as quantities, currency (e.g., `"DAI"`), or percentages.
112
114
 
113
115
  - `dimensions`: A nested array that provides context for the metric by breaking it down into finer categories or segments, such as `"project"` or `"category"`. Each dimension can contain:
114
- - `name`: The identifier or key for the dimension.
115
- - `path`: A structured representation of the dimension's hierarchy or location within a dataset.
116
- - `label`: A human-readable label for the dimension, which can be used for display purposes.
117
- - `description`: A brief explanation of the dimension to give users an understanding of what it represents.
118
- - `icon`: A graphical representation or icon associated with the dimension for easier identification in user interfaces.
116
+ - `name`: The identifier or key for the dimension.
117
+ - `path`: A structured representation of the dimension's hierarchy or location within a dataset.
118
+ - `label`: A human-readable label for the dimension, which can be used for display purposes.
119
+ - `description`: A brief explanation of the dimension to give users an understanding of what it represents.
120
+ - `icon`: A graphical representation or icon associated with the dimension for easier identification in user interfaces.
119
121
 
120
122
  - `value`: The actual numerical value of the metric for each row within the specified period.
121
123
 
@@ -160,7 +162,7 @@ await store.addSeriesValue([
160
162
  dimensions: {
161
163
  budget: AnalyticsPath.fromString("atlas/legacy/core-units/PE-001"),
162
164
  category: AnalyticsPath.fromString(
163
- "atlas/headcount/CompensationAndBenefits/FrontEndEngineering"
165
+ "atlas/headcount/CompensationAndBenefits/FrontEndEngineering",
164
166
  ),
165
167
  project: source,
166
168
  },
@@ -176,11 +178,14 @@ The `IAnalyticsStore` also provides an API for subscribing to data changes. This
176
178
  const store = new MemoryAnalyticsStore();
177
179
 
178
180
  // subscribe
179
- const unsub = store.subscribeToSource(AnalyticsPath.fromString("atlas/"), (source) => {
180
- console.log('Atlas data was changed!');
181
+ const unsub = store.subscribeToSource(
182
+ AnalyticsPath.fromString("atlas/"),
183
+ (source) => {
184
+ console.log("Atlas data was changed!");
181
185
 
182
- // decide whether or not to requery
183
- });
186
+ // decide whether or not to requery
187
+ },
188
+ );
184
189
 
185
190
  // elided
186
191
 
@@ -40,15 +40,16 @@ const knex = knexFactory({ client: "pg", useNullAsDefault: true });
40
40
 
41
41
  // create your own Pglite instance and pass it in
42
42
  // See (https://github.com/electric-sql/pglite/blob/main/packages/pglite/src/interface.ts) for full list of options.
43
- const pgLiteFactory = () => PGlite.create({
44
- debug: 3,
45
- relaxedDurability: false,
46
- });
43
+ const pgLiteFactory = () =>
44
+ PGlite.create({
45
+ debug: 3,
46
+ relaxedDurability: false,
47
+ });
47
48
 
48
49
  const store = new MemoryAnalyticsStore({
49
50
  knex,
50
51
  pgLiteFactory,
51
- })
52
+ });
52
53
  ```
53
54
 
54
55
  ## Initialization
@@ -1,9 +1,9 @@
1
1
  # Database schema
2
2
 
3
3
  ![untitled](../images/dbs.png)
4
- *Database table structures for the analytics engine.*
4
+ _Database table structures for the analytics engine._
5
5
 
6
- Analytics information is stored in three database tables:
6
+ Analytics information is stored in three database tables:
7
7
 
8
8
  - `AnalyticsSeries`: This table stores the raw data over a period with its metric, value, unit, function and parameters.
9
9
  - `AnalyticsDimension`: This table stores all available dimensions for each series.
@@ -48,7 +48,9 @@ The `AnalyticsProfiler` requires a namespace and a logger.
48
48
  ```typescript
49
49
  const profiler = new AnalyticsProfiler(
50
50
  "my-system",
51
- (metricName: string, ms: number) => console.log(`[${metricName}] ${Math.floor(ms)} ms`));
51
+ (metricName: string, ms: number) =>
52
+ console.log(`[${metricName}] ${Math.floor(ms)} ms`),
53
+ );
52
54
  ```
53
55
 
54
56
  > This object may be passed in through the constructor.
@@ -86,17 +88,17 @@ Often, it is useful to group metrics together. This is accomplished through a me
86
88
  // Blocks, { }, are a good convention to signal stack depth.
87
89
  profiler.push("system");
88
90
  {
89
- profiler.recordSync("a", myFuncA); // my-system.system.a
91
+ profiler.recordSync("a", myFuncA); // my-system.system.a
90
92
 
91
93
  profiler.push("subsystem");
92
94
  {
93
- profiler.recordSync("b", myFuncB); // my-system.system.subsystem.b
95
+ profiler.recordSync("b", myFuncB); // my-system.system.subsystem.b
94
96
  }
95
97
  profiler.pop();
96
98
 
97
- profiler.recordSync("c", myFuncC); // my-system.system.c
99
+ profiler.recordSync("c", myFuncC); // my-system.system.c
98
100
  }
99
101
  profiler.pop();
100
102
 
101
- profiler.recordSync("d", myFuncC); // my-system.c
103
+ profiler.recordSync("d", myFuncC); // my-system.c
102
104
  ```
@@ -47,43 +47,34 @@ The above query will output the following list, which is described in the dropdo
47
47
  <summary>👉 Expand this dropdown to explore the list of fields and retrievable data.</summary>
48
48
 
49
49
  - **Actuals**: This metric represents the recorded amounts that have been actually spent or received. It is used for tracking and comparing against budgeted or forecasted amounts. This will be helpful to understand the real financial performance.
50
-
51
- - Example Use Case: Comparing actual spending against the budget for a specific project to assess financial management efficiency.
50
+ - Example Use Case: Comparing actual spending against the budget for a specific project to assess financial management efficiency.
52
51
 
53
52
  - **Budget**: The estimated financial plan for a period, detailing the expected amounts allocated for various expenses and revenues.
54
- - Example Use Case: Planning financial allocations for upcoming quarters and tracking the distribution of funds across different departments.
53
+ - Example Use Case: Planning financial allocations for upcoming quarters and tracking the distribution of funds across different departments.
55
54
 
56
55
  - **Forecast**: A projection of future financial outcomes based on current trends and past data. This functions as an educated estimate that helps in planning and strategy.
57
-
58
- - Example Use Case: Anticipating cash flow and financial needs for the next fiscal year to make informed business decisions and adjustments.
56
+ - Example Use Case: Anticipating cash flow and financial needs for the next fiscal year to make informed business decisions and adjustments.
59
57
 
60
58
  - **PaymentsOnChain**: This metric tracks transactions executed on the blockchain, ensuring transparency and immutability of payment records.
61
-
62
- - Example Use Case: Auditing blockchain transactions to ensure the accuracy of financial reporting within decentralized finance operations.
59
+ - Example Use Case: Auditing blockchain transactions to ensure the accuracy of financial reporting within decentralized finance operations.
63
60
 
64
61
  - **PaymentsOffChainIncluded**: Reflects transactions that occur outside the blockchain but are recognized in the financial records, possibly including traditional banking transactions and off-chain payment channels.
65
-
66
- - Example Use Case: Reconciling on-chain and off-chain financial activities to maintain a comprehensive understanding of total expenditures and revenues.
62
+ - Example Use Case: Reconciling on-chain and off-chain financial activities to maintain a comprehensive understanding of total expenditures and revenues.
67
63
 
68
64
  - **DailyDaiPriceChange**: This metric measures the daily fluctuation in the price of DAI in USD. It's crucial for understanding the stability of DAI and its performance against the US dollar on a day-to-day basis.
69
-
70
- - Example Use Case: Monitoring the stability of DAI to ensure it maintains its peg to the US dollar, crucial for financial planning and risk assessment in DAI-denominated transactions.
65
+ - Example Use Case: Monitoring the stability of DAI to ensure it maintains its peg to the US dollar, crucial for financial planning and risk assessment in DAI-denominated transactions.
71
66
 
72
67
  - **DailyUsdcPriceChange**: Tracks the daily price change of USDC in USD. This metric is important for analyzing USDC's stability and its daily performance relative to the US dollar.
73
-
74
- - Example Use Case: Evaluating the daily fluctuations of USDC to assess its reliability as a stablecoin for operational liquidity and treasury management.
68
+ - Example Use Case: Evaluating the daily fluctuations of USDC to assess its reliability as a stablecoin for operational liquidity and treasury management.
75
69
 
76
70
  - **DailyUsdpPriceChange**: Reflects the daily price movement of USDP (Pax Dollar) in USD. It provides insights into the daily stability and performance of USDP against the US dollar.
77
-
78
- - Example Use Case: Analyzing USDP's stability for strategic decisions in treasury operations, especially for entities holding or transacting in USDP.
71
+ - Example Use Case: Analyzing USDP's stability for strategic decisions in treasury operations, especially for entities holding or transacting in USDP.
79
72
 
80
73
  - **DailyMkrPriceChange**: This metric shows the daily variation in the price of MKR in USD. It is vital for stakeholders to track the governance token's market performance on a daily basis.
81
-
82
- - Example Use Case: Investors and MKR holders use this data to make informed decisions regarding buying, selling, or holding MKR based on its daily market performance.
74
+ - Example Use Case: Investors and MKR holders use this data to make informed decisions regarding buying, selling, or holding MKR based on its daily market performance.
83
75
 
84
76
  - **DailyEthPriceChange**: Measures the daily price change of Ethereum (ETH) in USD. Given Ethereum's centrality to the DeFi ecosystem, this metric is key for evaluating the daily market dynamics of ETH.
85
-
86
- - Example Use Case: DeFi participants and investors track ETH's price fluctuations to adjust their investment strategies, hedge risks, and capitalize on market movements.
77
+ - Example Use Case: DeFi participants and investors track ETH's price fluctuations to adjust their investment strategies, hedge risks, and capitalize on market movements.
87
78
 
88
79
  </details>
89
80
 
@@ -107,7 +98,7 @@ query Analytics {
107
98
  }
108
99
  ```
109
100
 
110
- The output of the query above:
101
+ The output of the query above:
111
102
 
112
103
  ```graphql
113
104
  {
@@ -201,42 +192,24 @@ The output of the query above:
201
192
 
202
193
  <summary> Expand this dropdown to explore the list of fields and retrievable data.</summary>
203
194
 
204
- **Budget**
205
- - **Description**: Refers to the allocation and utilization of funds within different projects or operational areas. It includes various budget categories such as recognized delegates, specific projects, and governance facilitation.
195
+ **Budget** - **Description**: Refers to the allocation and utilization of funds within different projects or operational areas. It includes various budget categories such as recognized delegates, specific projects, and governance facilitation.
206
196
 
207
197
  - **Values**:
208
- - Paths like `atlas/legacy/recognized-delegates/` and `atlas/scopes/SUP/I/PHOENIX/` represent different budget categories or segments.
209
- - Labels, descriptions, and icons are provided for more detailed budget segments, aiding in identifying specific budget areas and their purposes.
210
-
211
- **Category**
212
- - **Description**: Categorizes transactions or allocations into broader groups like compensation, benefits, or non-headcount expenses.
213
- - **Values**:
214
- - Paths like `atlas/headcount/CompensationAndBenefits/` and `atlas/non-headcount/` help segregate financial data into meaningful categories for analysis.
215
-
216
- **Wallet**
217
- - **Description**: Tracks transactions or balances associated with specific blockchain wallet addresses.
218
- - **Values**:
219
- - Each path, like `atlas/0xbe8e3e3618f7474f8cb1d074a26affef007e98fb/`, corresponds to a unique wallet address, enabling financial tracking at the wallet level.
220
-
221
- **Project**
222
- - **Description**: Represents different projects or initiatives within the MakerDAO ecosystem.
223
- - **Values**:
224
- - Paths such as `atlas/Flip Flap Flop Delegate LLC/` and `atlas/Feedblack Loops LLC/` designate various projects, facilitating project-specific financial analysis and reporting.
225
-
226
- **Report**
227
- - **Description**: Used for accessing specific financial reports, typically segmented by time (e.g., monthly, quarterly).
228
- - **Values**:
229
- - Paths like `atlas/Delegates/null/2021/11/` represent report segments, often organized by date, allowing users to access financial information for specific time periods.
230
-
231
- **TransactionType**
232
- - **Description**: Differentiates between various types of transactions within the MakerDAO ecosystem. This dimension helps in analyzing transaction flows, such as internal transfers, governance actions, or external payments.
233
- - **Values**:
234
- - A path like `atlas/Internal Transaction/` signifies a specific category of transaction, in this case, internal transactions within the organization. This allows for a focused analysis of internal fund movements or operational transactions.
235
-
236
- **PriceData**
237
- - **Description**: Provides access to historical price data for different cryptocurrencies, facilitating financial analysis and market trend observations. This dimension is crucial for tracking the day-to-day or historical price movements of tokens like MKR, DAI, etc.
238
- - **Values**:
239
- - Paths such as `atlas/price-data/mkr-usd/day-average/` offer access to daily average prices of MKR in USD, enabling detailed analysis of MKR's price performance over time. This can be invaluable for financial reporting, investment analysis, or economic research within the MakerDAO ecosystem.
198
+ - Paths like `atlas/legacy/recognized-delegates/` and `atlas/scopes/SUP/I/PHOENIX/` represent different budget categories or segments.
199
+ - Labels, descriptions, and icons are provided for more detailed budget segments, aiding in identifying specific budget areas and their purposes.
200
+
201
+ **Category** - **Description**: Categorizes transactions or allocations into broader groups like compensation, benefits, or non-headcount expenses. - **Values**: - Paths like `atlas/headcount/CompensationAndBenefits/` and `atlas/non-headcount/` help segregate financial data into meaningful categories for analysis.
202
+
203
+ **Wallet** - **Description**: Tracks transactions or balances associated with specific blockchain wallet addresses. - **Values**: - Each path, like `atlas/0xbe8e3e3618f7474f8cb1d074a26affef007e98fb/`, corresponds to a unique wallet address, enabling financial tracking at the wallet level.
204
+
205
+ **Project** - **Description**: Represents different projects or initiatives within the MakerDAO ecosystem. - **Values**: - Paths such as `atlas/Flip Flap Flop Delegate LLC/` and `atlas/Feedblack Loops LLC/` designate various projects, facilitating project-specific financial analysis and reporting.
206
+
207
+ **Report** - **Description**: Used for accessing specific financial reports, typically segmented by time (e.g., monthly, quarterly). - **Values**: - Paths like `atlas/Delegates/null/2021/11/` represent report segments, often organized by date, allowing users to access financial information for specific time periods.
208
+
209
+ **TransactionType** - **Description**: Differentiates between various types of transactions within the MakerDAO ecosystem. This dimension helps in analyzing transaction flows, such as internal transfers, governance actions, or external payments. - **Values**: - A path like `atlas/Internal Transaction/` signifies a specific category of transaction, in this case, internal transactions within the organization. This allows for a focused analysis of internal fund movements or operational transactions.
210
+
211
+ **PriceData** - **Description**: Provides access to historical price data for different cryptocurrencies, facilitating financial analysis and market trend observations. This dimension is crucial for tracking the day-to-day or historical price movements of tokens like MKR, DAI, etc. - **Values**: - Paths such as `atlas/price-data/mkr-usd/day-average/` offer access to daily average prices of MKR in USD, enabling detailed analysis of MKR's price performance over time. This can be invaluable for financial reporting, investment analysis, or economic research within the MakerDAO ecosystem.
212
+
240
213
  </details>
241
214
 
242
215
  ### Currency
@@ -267,7 +240,6 @@ query Analytics($filter: AnalyticsFilter) {
267
240
  }
268
241
  }
269
242
  }
270
-
271
243
  ```
272
244
 
273
245
  With filters for MKR:
@@ -284,6 +256,7 @@ With filters for MKR:
284
256
  }
285
257
  }
286
258
  ```
259
+
287
260
  This query will return budget data in MKR for the specified time frame and dimension.
288
261
 
289
262
  3. Consistency in Currency Specification: It's essential to be consistent in specifying the currency for each query. If your analysis involves comparing data across both DAI and MKR, ensure that separate queries are made for each currency and the results are appropriately labeled and distinguished.
@@ -314,6 +287,7 @@ By appropriately specifying the currency in your queries, you can tailor the fin
314
287
  }
315
288
  }
316
289
  ```
290
+
317
291
  This configuration fetches total MKR budget data for the entire year of 2023, focusing on the 'budget' dimension with a specific level of detail.
318
292
 
319
293
  2. Comprehensive Yearly Financial Analysis in DAI:
@@ -337,6 +311,7 @@ This configuration fetches total MKR budget data for the entire year of 2023, fo
337
311
  }
338
312
 
339
313
  ```
314
+
340
315
  This filter setup is designed to provide an annual overview of actuals and forecast data across all categories in DAI for the year 2023.
341
316
 
342
317
  These examples demonstrate how to construct a complete filter object for different types of financial analysis. By properly defining each parameter, users can ensure accurate and relevant data retrieval from the analytics engine.
@@ -353,7 +328,7 @@ The `multiCurrencySeries` is a new feature introduced to the MakerDAO Analytics
353
328
 
354
329
  The conversion is based on the available price change metrics in the analytics engine. To see all available price change metrics in the engine, use the metricsfield in the query to get a list:
355
330
 
356
- ```graphql
331
+ ```graphql
357
332
  "metrics": [
358
333
  "Actuals",
359
334
  "Budget",
@@ -530,7 +505,6 @@ query MyAnalyticsQuery($filter: AnalyticsFilter) {
530
505
  }
531
506
  }
532
507
  }
533
-
534
508
  ```
535
509
 
536
510
  **Step 6: Execute the Query**
@@ -598,7 +572,7 @@ Explanation
598
572
 
599
573
  - This query fetches the total actual expenses and budget for MakerDAO for the entire year of 2023.
600
574
  - The granularity is set to "total" to aggregate data across the whole year.
601
- metrics include "Actuals" and "Budget" to get both actual spendings and budgeted amounts.
575
+ metrics include "Actuals" and "Budget" to get both actual spendings and budgeted amounts.
602
576
  - The currency is set to "DAI" to ensure all financial data is in the DAI format.
603
577
 
604
578
  Modification for Custom Use Cases
@@ -1,3 +1,3 @@
1
1
  # Processors
2
2
 
3
- See the Analytics Processor documentation for a thorough walkthrough of using the analytics system inside of a reactor processor to track metrics around document model operations.
3
+ See the Analytics Processor documentation for a thorough walkthrough of using the analytics system inside of a reactor processor to track metrics around document model operations.