Skip to content

v1.0.1

Compare
Choose a tag to compare
@iyashjayesh iyashjayesh released this 19 Sep 09:55
· 4 commits to main since this release
5092668

What's Changed

Update on Code Changes

After reviewing the feedback, it seems the default port change was missed during the code merge. Additionally, a minor enhancement has been added to the function trace logic.

Note:

The monigo.TraceFunction(func()) method accept func(){} as a type.

Example Usage:

func apiHandler(w http.ResponseWriter, r *http.Request) {
    // Trace function: when the highMemoryUsage function is called, it will be traced.
    monigo.TraceFunction(highMemoryUsage) 
    w.Write([]byte("API1 response: memexpensiveFunc"))
}

func highMemoryUsage() {
    // Simulate high memory usage by allocating a large slice
    largeSlice := make([]float64, 1e8) // 100 million elements
    for i := 0; i < len(largeSlice); i++ {
        largeSlice[i] = float64(i)
    }
}

Full Changelog: v1.0.0...v1.0.1