From e98f34d5890d687ac370c7289836f303668453bb Mon Sep 17 00:00:00 2001 From: jmc <33655003+jmcook1186@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:03:48 +0100 Subject: [PATCH] update quick start --- docs/users/quick-start.md | 41 +++++++++++++++------------------------ 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/docs/users/quick-start.md b/docs/users/quick-start.md index 41f9ea8..99af968 100644 --- a/docs/users/quick-start.md +++ b/docs/users/quick-start.md @@ -16,22 +16,12 @@ npm install -g @grnsft/if Read our detailed guide to [installing IF](./how-to-install-if.md). -## 2: Install some plugins -Install some of the plugins you want to include in your pipeline. The following commands will install both the official and unofficial IF model packages. - -```sh -npm install -g @grnsft/if-plugins -npm install -g @grnsft/if-unofficial-plugins -``` - -Read our detailed guide to [loading plugins](./how-to-import-plugins.md). - -## 3: Create a manifest file +## 2: Create a manifest file A manifest file contains all the configuration and input data required to measure your application's energy and carbon impacts and should have a `.yml` extension. -Open the file, add your data and save the file. The simple example below runs a single snapshot observation through a single plugin. +Open the file, add your data and save the file. The minimal example below runs two snapshot observations through a single plugin - all it does is multiply a value in each element of the `input` data by 2. ```yaml name: basic-demo @@ -39,11 +29,13 @@ description: tags: initialize: plugins: - teads-curve: - path: '@grnsft/if-unofficial-plugins' - method: TeadsCurve - global-config: - interpolation: spline + double-a-value: + path: 'builtin' + method: Coefficient + config: + input-parameter: "cpu-utilization" + coefficient: 2 + output-parameter: "cpu-utilization-doubled" tree: children: child-0: @@ -53,7 +45,7 @@ tree: observe: regroup: compute: - - teads-curve + - double-a-value inputs: - timestamp: 2023-07-06T00:00 duration: 1 @@ -61,14 +53,11 @@ tree: - timestamp: 2023-07-06T00:01 duration: 1 cpu/utilization: 80 - - timestamp: 2023-07-06T00:02 - duration: 1 - cpu/utilization: 20 ``` -Read our detailed guide to [writing manifest files](./how-to-write-manifests.md). +Read our detailed guides to [writing manifest files](./how-to-write-manifests.md). -## 4: Compute your manifest file +## 3: Compute your manifest file Run the pipeline by passing the path to your manifest file to the `if-run` command line tool: @@ -76,13 +65,15 @@ Run the pipeline by passing the path to your manifest file to the `if-run` comma if-run --manifest ``` -:tada:**Congratulations** :tada:! You have just used the Impact Framework to compute the energy consumed by an application! +The output will be printed to the console. + +:tada:**Congratulations** :tada:! You have just used the Impact Framework to compute a manifest file! Your challenge now is to use these principles to construct manifest files for real applications. Our docs will help! ## Next steps Now you know how to use the `if-run` you can start building more complex pipelines of plugins and more complicated manifest files. Your overall aim is to create a manifest file that accurately represents a real software application, and a plugin pipeline that yields an environmental metric that's important to you (e.g. `carbon`). -Experiment by adding more plugins to the pipeline, for example add `sci-o` to convert energy into `operational-carbon`. Your output data will be displayed in your console. +Experiment by adding more plugins to the pipeline and observe how each plugin enriches each element in the `inputs` array with new values. You can also configure `if` to save your output data to another `yaml` file. To do this, add the `--output` flag and the path to the output file where the results are saved.