Skip to content

Commit d35be2b

Browse files
authored
Added explanations for website and ai measurements (#99)
1 parent b17b9be commit d35be2b

File tree

3 files changed

+73
-1
lines changed

3 files changed

+73
-1
lines changed

content/en/docs/measuring/debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Debugging measurements"
33
description: "Debugging measurements"
44
lead: ""
55
date: 2022-06-15T08:48:45+00:00
6-
weight: 840
6+
weight: 860
77
---
88

99
## Debugging containers
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "Measuring AI/ML applications"
3+
description: ""
4+
lead: ""
5+
date: 2025-05-23T01:49:15+00:00
6+
weight: 840
7+
toc: true
8+
---
9+
10+
GMT can also measure AI/ML workloads.
11+
12+
### Example for ML workload
13+
14+
See [our example ML example application](https://github.com/green-coding-solutions/example-applications/tree/main/ml-model) to have a usage scenario for a simple Python ML workload to get started.
15+
16+
### Example for GenAI Text LLM workload
17+
18+
The simplest way is to use [ollama](https://ollama.com) as a manager and encapsulte it inside of the GMT.
19+
20+
See [our example ollama LLM example application](https://github.com/green-coding-solutions/example-applications/tree/main/ai-model) to have a usage scenario to get started.
21+
22+
#### Quick LLM query measuring
23+
24+
Since LLM chat queries are so common GMT comes with a quick measurement function for that.
25+
26+
In the root folder you find the `run-template.sh` file.
27+
28+
Measure a sample query like this: `bash run-template.sh ai "How cool is the GMT?"`
29+
30+
It will download ollama, setup the containers and download an example model (*gemma3:1b*). Once you got this quick measurement running iterate on it by using our [our example ollama LLM example application](https://github.com/green-coding-solutions/example-applications/tree/main/ai-model).
31+
32+
Bonus tipp: If you apply `--quick` to the `run-template.sh` call the measurement is quicker for debugging purposes. However results will be not as reliable. Use only for debugging!
33+
34+
#### Trying out our hosted service
35+
36+
We operate [green-coding.ai](https://green-coding.ai) as a simple demo vertical that uses the underlying [Green Metrics Tool Cluster Hosted Service →]({{< relref "/docs/measuring/measuring-service/" >}}).
37+
38+
Check it out if you do not feel like installing the GMT and just want to get carbon and energy info on single prompts.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: "Measuring Websites"
3+
description: ""
4+
lead: ""
5+
date: 2025-05-23T01:49:15+00:00
6+
weight: 841
7+
toc: true
8+
---
9+
10+
GMT can also measure websites and takes a multi-dimenisonal approach here:
11+
- The energy of the browser is measured to display and render the page
12+
- The network transfer energy is measured that was needed to download the HTML and page assets
13+
14+
To isolate this as best as possible GMT orchestrates a reverse proxy, warms up the cache by pre-loading the full page once and only then does the final measurement.
15+
16+
**Warning:** Measuring websites is very tricky! GMT shaves off some of the caveats by using reverse proxys and cache pre-loading to make results more reliable. Since measurement load times are in milliseconds range you must have [Metric Providers]({{< relref "/docs/measuring/metric-providers/" >}}) with very high *sampling_rates* connected. **2ms** is a good value. Also website measurements are really only realiable in a [controlled cluster]({{< relref "/docs/cluster/" >}}) with [accuracy control]({{< relref "/docs/cluster/accuracy-control/" >}}).
17+
18+
#### Quick Website query measuring
19+
20+
Since measuring websites is so common GMT comes with a quick measurement function for that.
21+
22+
In the root folder you find the `run-template.sh` file.
23+
24+
Measure a sample query like this: `bash run-template.sh website "https://www.green-coding.io"`
25+
26+
It will download the needed containers, setup them up and run the measurement. Once you got this quick measurement running iterate on it by extending the [example measurement file](https://github.com/green-coding-solutions/green-metrics-tool/blob/main/templates/website/usage_scenario.yml) with more steps, for instance measuring all the sub-pages on your domain
27+
28+
Bonus tipp: If you apply `--quick` to the `run-template.sh` call the measurement is quicker for debugging purposes. However results will be not as reliable. Use only for debugging!
29+
30+
#### Trying out our hosted service
31+
32+
We operate [website-tester.green-coding.io](https://website-tester.green-coding.io) as a simple demo vertical that uses the underlying [Green Metrics Tool Cluster Hosted Service →]({{< relref "/docs/measuring/measuring-service/" >}}).
33+
34+
Check it out if you do not feel like installing the GMT and just want to get carbon and energy info on a single page.

0 commit comments

Comments
 (0)