企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
Banchmark === - 简单测试 ~~~ type datamodel struct { Host string `json:"host"` } func BenchmarkSquare(b *testing.B) { b.ResetTimer() for i:=0;i<b.N;i++{ //测试代码 //data :=`{"host":"123456"}` //d := &datamodel{} //json.Unmarshal([]byte(data),d) d := &datamodel{ Host:"1212312", } json.Marshal(d) } b.StopTimer() } ~~~