Total: 20.56s ROUTINE ======================== shop/pricing.applyDiscount in /src/pricing/discount.go 4.12s 4.12s (flat, cum) 20.04% of Total . . 38:// applyDiscount reduces every line by the campaign rate. . . 39:func applyDiscount(cart *Cart, rate float64) { 40ms 40ms 40: if rate <= 0 { . . 41: return . . 42: } 1.92s 1.92s 43: for _, line := range cart.Lines { 1.61s 1.61s 44: line.Total = round(line.Total * (1 - rate)) 550ms 550ms 45: cart.Total += line.Total . . 46: } . . 47:} ROUTINE ======================== shop/cache.Get in /src/cache/cache.go 1.44s 1.44s (flat, cum) 7.00% of Total . . 21:func (c *Cache) Get(key string) ([]byte, bool) { 980ms 980ms 22: c.mu.RLock() 460ms 460ms 23: defer c.mu.RUnlock() . . 24: v, ok := c.m[key] . . 25: return v, ok . . 26:}