Skip to content

Commit

Permalink
Fix TOC and some typos. (census-instrumentation#1111)
Browse files Browse the repository at this point in the history
  • Loading branch information
rghetia committed Apr 25, 2019
1 parent 3979b65 commit 399b5a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions examples/gauges/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
Table of Contents
=================

* [Gauges](#gauges)
* [Run the example](#run-the-example)
* [How to use gauges?](#how-to-use-gauge?)
* [Initialize metric registry](#initialize-metric-registry)
* [Create gauge metric](#create-gauge-metric)
* [Create gauge entry](#create-gauge-entry)
* [Set gauge value](#set-gauge-values)
* [Complete example](#complete-example)

# Summary
- [Summary](#summary)
- [Run the example](#run-the-example)
- [How to use gauges?](#how-to-use-gauges-)
* [Initialize Metric Registry](#initialize-metric-registry)
* [Create gauge metric](#create-gauge-metric)
* [Create gauge entry](#create-gauge-entry)
* [Set gauge values](#set-gauge-values)
* [Complete Example](#complete-example)

## Summary
[top](#Table-of-Contents)

This example shows how to use gauge metrics. The program records two gauges.
Expand All @@ -25,7 +25,7 @@ It periodically runs a function that retrieves the memory stats and updates the
Metrics can be viewed at [http://localhost:9090/metrcs](http://localhost:9090/metrcs) once the program is running.
The program lets you choose the amount of memory (in MB) to consume. Choose different values and query the metrics to see the change in metrics.

## Run the example.
## Run the example

```
$ go get go.opencensus.io/examples/gauges/...
Expand All @@ -37,7 +37,7 @@ then:
$ go run $(go env GOPATH)/src/go.opencensus.io/examples/gauges/gauge.go
```

## How to use gauge?
## How to use gauges?

### Initialize Metric Registry
Create a new metric registry for all your metrics.
Expand Down Expand Up @@ -213,11 +213,11 @@ func getInput() int {
}

func work() {
fmt.Printf("Program periodically records following gauge metrics\n")
fmt.Printf("Program periodically records following gauge metrics.\n")
fmt.Printf(" 1. process_heap_alloc = the heap allocation (used + freed but not garbage collected)\n")
fmt.Printf(" 2. process_idle_to_alloc_ratio = heap idle (unused) /allocation ratio\n")
fmt.Printf("\nGo to http://localhost:9090/metrics to see the metrics.\n\n\n")
fmt.Printf("Enter memory you would like to allocate in MB to change the value of above metris.\n")
fmt.Printf("Enter memory you would like to allocate in MB to change the value of above metrics.\n")

// Do some work and record gauge metrics.
for {
Expand Down
4 changes: 2 additions & 2 deletions examples/gauges/gauge.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ func getInput() int {
}

func work() {
fmt.Printf("Program periodically records following gauge metrics\n")
fmt.Printf("Program periodically records following gauge metrics.\n")
fmt.Printf(" 1. process_heap_alloc = the heap allocation (used + freed but not garbage collected)\n")
fmt.Printf(" 2. process_idle_to_alloc_ratio = heap idle (unused) /allocation ratio\n")
fmt.Printf("\nGo to http://localhost:9090/metrics to see the metrics.\n\n\n")
fmt.Printf("Enter memory you would like to allocate in MB to change the value of above metris.\n")
fmt.Printf("Enter memory you would like to allocate in MB to change the value of above metrics.\n")

// Do some work and record gauge metrics.
for {
Expand Down

0 comments on commit 399b5a5

Please sign in to comment.