1234567891011121314151617181920212223 |
- package prof
- import (
- "testing"
- "git.i2edu.net/i2/go-zero/core/utils"
- )
- func TestProfiler(t *testing.T) {
- EnableProfiling()
- Start()
- Report("foo", ProfilePoint{
- ElapsedTimer: utils.NewElapsedTimer(),
- })
- }
- func TestNullProfiler(t *testing.T) {
- p := newNullProfiler()
- p.Start()
- p.Report("foo", ProfilePoint{
- ElapsedTimer: utils.NewElapsedTimer(),
- })
- }
|