setup bench

This commit is contained in:
2025-02-28 20:34:47 +01:00
parent f4e29c18e5
commit 0209e6ca6b
7 changed files with 111 additions and 57 deletions

24
project/tasks/double.go Normal file
View File

@@ -0,0 +1,24 @@
package main
import (
"encoding/json"
)
type Request struct {
Data int
Name string
}
func exec_task(arg string) string{
req := Request{}
json.Unmarshal([]byte(arg), &req)
// double the data field
req.Data = req.Data * 2
// return the json string
json, _ := json.Marshal(req)
return string(json)
}