diff --git a/U201916202/README.md b/U201916202/README.md
index 0faad379083304b668d4c14ad62bba8d98cee7d8..1642f13633b0533a6242c161064f520ca95b526b 100644
--- a/U201916202/README.md
+++ b/U201916202/README.md
@@ -2,4 +2,6 @@
- 姓名:杨志军
- 学号:U201916202
-- 班级:校交1902班
\ No newline at end of file
+- 班级:校交1902班
+- 理论课提交文件夹:包含理论课课程设计报告、模型源代码、README文档。
+- 实验课提交文件夹:包含实验报告、实验代码、实验过程中的测试结果输出、README文档。
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/README.md" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/README.md"
new file mode 100644
index 0000000000000000000000000000000000000000..12aaa74941ce7f3f65eb6d48c0fe0a18b0b5193c
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/README.md"
@@ -0,0 +1,40 @@
+# README
+
+- my-s3bench
+
+ 该文件夹下存放了本次实验中我基于aws-sdk-go和go-echarts实现的测试程序,包括源代码和可执行程序。
+
+ 运行测试程序时需要传入一定的参数,以下给出一个例子。
+
+ 需要特别讲解的是**numOfClients, numOfSamples, objectSize可以接收数组**,程序会自动遍历数组元素的所有组合情况进行性能测试。注意,数组中的每个数字用英文逗号隔开,不能有其他字符。
+
+ **requestMode参数用于设置测试时的请求模式,为0时表示常规请求,为1时表示对冲请求,为2时表示关联请求。**
+
+ 测试程序会将测试结果以文本报告的形式在终端输出,并生成两个可视化图表Write.html和Read.html,分别可视化展示了所有参数的写测试结果和读测试结果折线图。图中的图例"%d-%d-%d"代表这条折线所表示的测试参数{numOfClients, numOfSamples, objectSize}。例如,"8-256-1024"表示这条折线是参数为{numOfClients=8, numOfSamples=256, objectSize=1024}的测试的折线。**若读者觉得图表中折线太多影响观察,可以点击图例以隐藏或展示一条折线**。
+
+ ```
+ my-s3bench ^
+ -accessKey=hust ^
+ -secretKey=hust_obs ^
+ -bucket=loadgen ^
+ -endpoint=http://127.0.0.1:9090 ^
+ -numOfClients=1,4,8 ^
+ -numOfSamples=256,512,1024 ^
+ -objectNamePrefix=loadgen ^
+ -objectSize=1024,4096 ^
+ -requestMode=0
+ ```
+
+- 常规请求测试结果
+
+ 作者在实验过程中某次“常规请求”测试(requestMode=0)的结果输出,保存在该文件夹中以供读者参考。
+
+- 对冲请求测试结果
+
+ 作者在实验过程中某次“对冲请求”测试(requestMode=1)的结果输出,保存在该文件夹中以供读者参考。
+
+- 关联请求测试结果
+
+ 作者在实验过程中某次“关联请求”测试(requestMode=2)的结果输出,保存在该文件夹中以供读者参考。
+
+对本次实验有任何意见或建议者,欢迎联系作者,QQ573448239。
\ No newline at end of file
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/.idea/.gitignore" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/.idea/.gitignore"
new file mode 100644
index 0000000000000000000000000000000000000000..13566b81b018ad684f3a35fee301741b2734c8f4
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/.idea/.gitignore"
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/.idea/modules.xml" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/.idea/modules.xml"
new file mode 100644
index 0000000000000000000000000000000000000000..ab930061af0a10a8059b47bd6cb6d98c11db9da3
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/.idea/modules.xml"
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/.idea/my-s3bench.iml" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/.idea/my-s3bench.iml"
new file mode 100644
index 0000000000000000000000000000000000000000..5e764c4f0b9a64bb78a5babfdd583713b2df47bf
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/.idea/my-s3bench.iml"
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/go.mod" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/go.mod"
new file mode 100644
index 0000000000000000000000000000000000000000..386ab94fdb5a48b25c774cb52e0e2a41dda4659a
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/go.mod"
@@ -0,0 +1,13 @@
+module my-s3bench
+
+go 1.18
+
+require (
+ github.com/aws/aws-sdk-go v1.43.34
+ github.com/go-echarts/examples v0.0.0-20211021070855-c1dea2301ce9
+)
+
+require (
+ github.com/go-echarts/go-echarts/v2 v2.2.5-0.20211021024243-33ae1aa415d6 // indirect
+ github.com/jmespath/go-jmespath v0.4.0 // indirect
+)
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/go.sum" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/go.sum"
new file mode 100644
index 0000000000000000000000000000000000000000..1aff961b31e50f29d4bfc7e9492300292e85ff81
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/go.sum"
@@ -0,0 +1,36 @@
+github.com/aws/aws-sdk-go v1.43.34 h1:8+P+773CDgQqN1eLH1QHT6XgXHUbME3sAbDGszzjajY=
+github.com/aws/aws-sdk-go v1.43.34/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/go-echarts/examples v0.0.0-20211021070855-c1dea2301ce9 h1:EchRsIEnheOYEQuApLP8q5K54CgcfX5tc67ixAG06bw=
+github.com/go-echarts/examples v0.0.0-20211021070855-c1dea2301ce9/go.mod h1:aeXO5q9HFVVEz3ts7dND/2X4V0iBc84YLLjGcHsFP2o=
+github.com/go-echarts/go-echarts/v2 v2.2.5-0.20211021024243-33ae1aa415d6 h1:+p0u+1svKoBC2xS6GzpmcDHShkAGqD+wUQLpxIpygM0=
+github.com/go-echarts/go-echarts/v2 v2.2.5-0.20211021024243-33ae1aa415d6/go.mod h1:6TOomEztzGDVDkOSCFBq3ed7xOYfbOqhaBzD0YV771A=
+github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
+github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
+github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.6.0 h1:jlIyCplCJFULU/01vCkhKuTyc3OorI3bJFuw6obfgho=
+github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
+golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/my-s3bench.exe" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/my-s3bench.exe"
new file mode 100644
index 0000000000000000000000000000000000000000..28735e1aa1c9b8bdd30bd8ef659ddb72765bdb12
Binary files /dev/null and "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/my-s3bench.exe" differ
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/my-s3bench.go" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/my-s3bench.go"
new file mode 100644
index 0000000000000000000000000000000000000000..ee4517ff8ca853fb02af74ba817ca514c4888da5
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/my-s3bench.go"
@@ -0,0 +1,415 @@
+package main
+
+import (
+ "bytes"
+ "crypto/rand"
+ "flag"
+ "fmt"
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/credentials"
+ "github.com/aws/aws-sdk-go/aws/session"
+ "github.com/aws/aws-sdk-go/service/s3"
+ "github.com/go-echarts/go-echarts/v2/charts"
+ "github.com/go-echarts/go-echarts/v2/opts"
+ "os"
+ "sort"
+ "strconv"
+ "strings"
+ "time"
+)
+
+type Params struct {
+ putReqChan chan *s3.PutObjectInput
+ getReqChan chan *s3.GetObjectInput
+ putRespChan chan Response
+ getRespChan chan Response
+ accessKey string
+ secretKey string
+ bucket string
+ endpoint string
+ numOfClients int
+ numOfSamples int
+ objectNamePrefix string
+ objectSize int
+ sampleData []byte
+
+ reqMode int
+}
+
+type Response struct {
+ err error
+ duration time.Duration
+}
+
+type Result struct {
+ opcode string
+ totalDuration time.Duration
+ totalTransBytes int64
+ numOfErrors int
+ durationList []float64
+
+ numOfClients int
+ numOfSamples int
+ objectSize int
+}
+
+func strToIntegerList(str string) []int {
+ res := make([]int, 0)
+ for _, s := range strings.Split(str, ",") {
+ i, err := strconv.Atoi(s)
+ if err != nil {
+ fmt.Println("Please check the endpoint you input!")
+ os.Exit(-1)
+ }
+ res = append(res, i)
+ }
+ return res
+}
+
+func main() {
+ fmt.Println("this is my s3bench")
+ accessKey := flag.String("accessKey", "", "The access-key of the s3 server.")
+ secretKey := flag.String("secretKey", "", "The secret-key of the s3 server.")
+ bucket := flag.String("bucket", "", "The bucket where you run your test in.")
+ endpoint := flag.String("endpoint", "", "The endpoint of the s3 server - http://IP:PORT")
+ numOfClientsStr := flag.String("numOfClients", "", "The numbers of clients set up during the test.")
+ numOfSamplesStr := flag.String("numOfSamples", "", "The numbers of test samples you want to put/get during write/read test.")
+ objectNamePrefix := flag.String("objectNamePrefix", "", "The prefix of the object name.")
+ objectSizeStr := flag.String("objectSize", "", "The size of object. (Bytes)")
+ reqMode := flag.Int("requestMode", 0, "The mode of request. 0:Normal, 1:Hedged, 2:Tied")
+
+ flag.Parse()
+
+ numOfClientsList := strToIntegerList(*numOfClientsStr)
+ numOfSamplesList := strToIntegerList(*numOfSamplesStr)
+ objectSizeList := strToIntegerList(*objectSizeStr)
+
+ if *endpoint == "" {
+ fmt.Println("Please check the endpoint you input!")
+ os.Exit(-1)
+ }
+
+ //fmt.Println(*accessKey, *secretKey, *bucket, *endpoint, *numOfClients, *numOfSamples, *objectNamePrefix, *objectSize)
+
+ writeTestResults := make([]*Result, 0)
+ readTestResults := make([]*Result, 0)
+
+ for _, numOfClients := range numOfClientsList {
+ for _, numOfSamples := range numOfSamplesList {
+ for _, objectSize := range objectSizeList {
+ params := Params{
+ putReqChan: make(chan *s3.PutObjectInput, numOfSamples),
+ getReqChan: make(chan *s3.GetObjectInput, numOfSamples),
+ putRespChan: make(chan Response, numOfSamples),
+ getRespChan: make(chan Response, numOfSamples),
+
+ accessKey: *accessKey,
+ secretKey: *secretKey,
+ bucket: *bucket,
+ endpoint: *endpoint,
+ numOfClients: numOfClients,
+ numOfSamples: numOfSamples,
+ objectNamePrefix: *objectNamePrefix,
+ objectSize: objectSize,
+ reqMode: *reqMode,
+ }
+
+ fmt.Printf("params:{ accessKey:%s secretKey:%s bucket:%s endpoint:%s "+
+ "numOfClients:%d numOfSamples:%d objectNamePrefix:%s objectSize:%d }",
+ params.accessKey, params.secretKey, params.bucket, params.endpoint,
+ params.numOfClients, params.numOfSamples, params.objectNamePrefix, params.objectSize)
+
+ fmt.Printf("Generating the sample data in memory whose size is %d...\n", params.objectSize)
+ timeGenBegin := time.Now()
+ params.sampleData = make([]byte, params.objectSize)
+ _, errorMsg := rand.Read(params.sampleData)
+ if errorMsg != nil {
+ fmt.Println("Error! The errorMsg is : ", errorMsg)
+ os.Exit(-1)
+ }
+ fmt.Printf("Done. Time cost : %s\n", time.Since(timeGenBegin))
+
+ params.startClients()
+
+ writeTestResult := params.runTest("Write")
+
+ readTestResult := params.runTest("Read")
+
+ writeTestResult.printResult()
+ readTestResult.printResult()
+
+ //writeTestResult.showLineChart(5, 5)
+ //readTestResult.showLineChart(5, 5)
+
+ writeTestResult.numOfClients = numOfClients
+ writeTestResult.numOfSamples = numOfSamples
+ writeTestResult.objectSize = objectSize
+ readTestResult.numOfClients = numOfClients
+ readTestResult.numOfSamples = numOfSamples
+ readTestResult.objectSize = objectSize
+
+ writeTestResults = append(writeTestResults, &writeTestResult)
+ readTestResults = append(readTestResults, &readTestResult)
+ }
+ }
+ }
+
+ showMultiLineChart(writeTestResults, 5, 5)
+ showMultiLineChart(readTestResults, 5, 5)
+}
+
+func (result *Result) getPercentData(percent int) float64 {
+ index := int(0.01*(float32(percent*len(result.durationList)))) - 1
+ if index < 0 {
+ index = 0
+ }
+ return result.durationList[index]
+}
+
+func (result *Result) printResult() {
+ fmt.Println()
+ fmt.Printf("Result Summary for %s Operations\n", result.opcode)
+ fmt.Printf("Total Transferred:\t%.3f MB\n", float64(result.totalTransBytes)/(1<<20))
+ fmt.Printf("Total Throughput:\t%.3f MB/s \n", float64(result.totalTransBytes)/(1<<20)*result.totalDuration.Seconds())
+ fmt.Printf("Total Duration:\t\t%.5f s\n", result.totalDuration.Seconds())
+ fmt.Printf("Number of Errors: %d\t\n", result.numOfErrors)
+ fmt.Println("----------------------------------------------------")
+ fmt.Printf("%s times Max :\t%.5f s\n", result.opcode, result.getPercentData(100))
+ fmt.Printf("%s times 99%%th:\t%.5f s\n", result.opcode, result.getPercentData(99))
+ fmt.Printf("%s times 90%%th:\t%.5f s\n", result.opcode, result.getPercentData(90))
+ fmt.Printf("%s times 75%%th:\t%.5f s\n", result.opcode, result.getPercentData(75))
+ fmt.Printf("%s times 50%%th:\t%.5f s\n", result.opcode, result.getPercentData(50))
+ fmt.Printf("%s times 25%%th:\t%.5f s\n", result.opcode, result.getPercentData(25))
+ fmt.Printf("%s times Min :\t%.5f s\n", result.opcode, result.durationList[0])
+ fmt.Println()
+}
+
+func showMultiLineChart(results []*Result, first int, grad int) {
+ line := charts.NewLine()
+ line.SetGlobalOptions(
+ charts.WithYAxisOpts(opts.YAxis{
+ Name: "Latency(ms)",
+ }),
+ charts.WithXAxisOpts(opts.XAxis{
+ Name: "Percent(%)",
+ }),
+ charts.WithParallelComponentOpts(opts.ParallelComponent{
+ Left: "15%",
+ Right: "13%",
+ Bottom: "10%",
+ Top: "20%",
+ }),
+ charts.WithLegendOpts(opts.Legend{Show: true}),
+ )
+
+ xAxis := make([]string, 0)
+ for i := first; i <= 100; i += grad {
+ xAxis = append(xAxis, fmt.Sprintf("%d", i))
+ }
+
+ line.SetXAxis(xAxis).
+ SetSeriesOptions(
+ charts.WithLineChartOpts(opts.LineChart{
+ Smooth: true,
+ }),
+ )
+
+ for _, result := range results {
+ line.AddSeries(fmt.Sprintf("%d-%d-%d", result.numOfClients, result.numOfSamples, result.objectSize), result.getLineData(first, grad))
+ }
+
+ f, _ := os.Create(fmt.Sprintf("%s.html", results[0].opcode))
+ line.Render(f)
+ fmt.Printf("The line chart of the test result is saved as %s.html\n", results[0].opcode)
+}
+
+func (result *Result) showLineChart(first int, grad int) {
+ line := charts.NewLine()
+
+ line.SetGlobalOptions(
+ charts.WithTitleOpts(opts.Title{
+ Title: fmt.Sprintf("This chart show the tail latency in my-s3bench (%s test).", result.opcode),
+ }),
+ charts.WithYAxisOpts(opts.YAxis{
+ Name: "Latency(ms)",
+ SplitLine: &opts.SplitLine{
+ Show: false,
+ },
+ }),
+ charts.WithXAxisOpts(opts.XAxis{
+ Name: "Percent(%)",
+ }),
+ )
+
+ xAxis := make([]string, 0)
+ for i := first; i <= 100; i += grad {
+ xAxis = append(xAxis, fmt.Sprintf("%d", i))
+ }
+
+ line.SetXAxis(xAxis).
+ AddSeries("slice", result.getLineData(first, grad),
+ charts.WithLabelOpts(opts.Label{Show: true, Position: "top"})).
+ SetSeriesOptions(
+ charts.WithLineChartOpts(opts.LineChart{
+ Smooth: true,
+ }),
+ )
+
+ f, _ := os.Create(fmt.Sprintf("%s.html", result.opcode))
+ line.Render(f)
+ fmt.Printf("The line chart of the %s test result is saved as %s.html", result.opcode)
+}
+
+func (result *Result) getLineData(first int, grad int) []opts.LineData {
+ lineData := make([]opts.LineData, 0)
+ for i := first; i <= 100; i += grad {
+ lineData = append(lineData, opts.LineData{Value: 1000 * result.getPercentData(i)})
+ }
+ return lineData
+}
+
+func (params *Params) runTest(opcode string) Result {
+ fmt.Printf("Runnig %s Test...\n", opcode)
+ timeTestBegin := time.Now()
+ go params.produceRequest(opcode)
+ result := Result{
+ opcode: opcode,
+ totalTransBytes: 0,
+ numOfErrors: 0,
+ durationList: make([]float64, 0, params.numOfSamples),
+ }
+ if opcode == "Write" {
+ for i := 0; i < params.numOfSamples; i++ {
+ resp := <-params.putRespChan
+ if resp.err != nil {
+ result.numOfErrors++
+ } else {
+ result.totalTransBytes += int64(params.objectSize)
+ result.durationList = append(result.durationList, resp.duration.Seconds())
+ }
+ }
+ } else if opcode == "Read" {
+ for i := 0; i < params.numOfSamples; i++ {
+ resp := <-params.getRespChan
+ if resp.err != nil {
+ result.numOfErrors++
+ } else {
+ result.totalTransBytes += int64(params.objectSize)
+ result.durationList = append(result.durationList, resp.duration.Seconds())
+ }
+ }
+ }
+
+ result.totalDuration = time.Since(timeTestBegin)
+ sort.Float64s(result.durationList)
+
+ fmt.Println("Done.")
+
+ return result
+}
+
+func (params *Params) produceRequest(opcode string) {
+
+ if opcode == "Write" {
+ for i := 0; i < params.numOfSamples; i++ {
+ params.putReqChan <- &s3.PutObjectInput{
+ Body: bytes.NewReader(params.sampleData),
+ Bucket: aws.String(params.bucket),
+ Key: aws.String(fmt.Sprintf("%s_%d", params.objectNamePrefix, i)),
+ }
+ }
+ close(params.putReqChan)
+ } else if opcode == "Read" {
+ for i := 0; i < params.numOfSamples; i++ {
+ params.getReqChan <- &s3.GetObjectInput{
+ Bucket: aws.String(params.bucket),
+ Key: aws.String(fmt.Sprintf("%s_%d", params.objectNamePrefix, i)),
+ }
+ }
+ close(params.getReqChan)
+ } else {
+ fmt.Println("Check the opcode!")
+ }
+
+}
+
+func (params *Params) startClients() {
+ fmt.Printf("Setting up %d clients...\n", params.numOfClients)
+ cred := credentials.NewStaticCredentials(params.accessKey, params.secretKey, "")
+ config := &aws.Config{
+ Endpoint: aws.String(params.endpoint),
+ Credentials: cred,
+ Region: aws.String("igneous-test"),
+ S3ForcePathStyle: aws.Bool(true),
+ }
+ for i := 0; i < params.numOfClients; i++ {
+ go params.clientRoutine(config)
+ }
+}
+
+func (params *Params) clientRoutine(config *aws.Config) {
+ svc := s3.New(session.New(config))
+ var timeT time.Duration = 30 * time.Millisecond
+ for req := range params.putReqChan {
+ putTimeBegin := time.Now()
+ _, err := svc.PutObject(req)
+ duration := time.Since(putTimeBegin)
+
+ if params.reqMode == 1 && duration > timeT { //对冲请求模式
+ putTimeBegin2 := time.Now()
+ _, err2 := svc.PutObject(req)
+ // 由于第二个是在第一个请求超时后才发送
+ // 因此第二个请求的相对响应时间是绝对时间+超时阈值
+ duration2 := time.Since(putTimeBegin2) + timeT
+ // 若第二个请求先到达且响应无报错,则将第二个请求的响应作为本次服务请求的响应
+ if duration2 < duration && err2 == nil {
+ duration = duration2
+ err = err2
+ }
+ } else if params.reqMode == 2 { //关联请求模式
+ //time.Sleep(10 * time.Millisecond)
+ putTimeBegin2 := time.Now()
+ _, err2 := svc.PutObject(req)
+ // 关联请求同时发送两个请求,当其中之一到达时,立即取消另外一个请求
+ duration2 := time.Since(putTimeBegin2)
+ // 若第二个请求先到达且响应无报错,则将第二个请求的响应作为本次服务请求的响应
+ if duration2 < duration && err2 == nil {
+ duration = duration2
+ err = err2
+ }
+ }
+ params.putRespChan <- Response{err: err, duration: duration}
+ }
+
+ for req := range params.getReqChan {
+ getTimeBegin := time.Now()
+ _, err := svc.GetObject(req)
+ duration := time.Since(getTimeBegin)
+
+ if params.reqMode == 1 && duration > timeT { //对冲请求模式
+ getTimeBegin2 := time.Now()
+ _, err2 := svc.GetObject(req)
+ // 由于第二个是在第一个请求超时后才发送
+ // 因此第二个请求的相对响应时间是绝对时间+超时阈值
+ duration2 := time.Since(getTimeBegin2) + timeT
+ // 若第二个请求先到达且响应无报错,则将第二个请求的响应作为本次服务请求的响应
+ if duration2 < duration && err2 == nil {
+ duration = duration2
+ err = err2
+ }
+ } else if params.reqMode == 2 { //关联请求模式
+ //time.Sleep(10 * time.Millisecond)
+ getTimeBegin2 := time.Now()
+ _, err2 := svc.GetObject(req)
+ // 关联请求同时发送两个请求,当其中之一到达时,立即取消另外一个请求
+ duration2 := time.Since(getTimeBegin2)
+ // 若第二个请求先到达且响应无报错,则将第二个请求的响应作为本次服务请求的响应
+ if duration2 < duration && err2 == nil {
+ duration = duration2
+ err = err2
+ }
+ }
+
+ params.getRespChan <- Response{err: err, duration: duration}
+ }
+}
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/run-my-s3bench.cmd" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/run-my-s3bench.cmd"
new file mode 100644
index 0000000000000000000000000000000000000000..fb99b1e4d131edb994b36b63bc0e99db493a1c95
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/my-s3bench/run-my-s3bench.cmd"
@@ -0,0 +1,11 @@
+my-s3bench ^
+ -accessKey=hust ^
+ -secretKey=hust_obs ^
+ -bucket=loadgen ^
+ -endpoint=http://127.0.0.1:9090 ^
+ -numOfClients=1,4,8 ^
+ -numOfSamples=256,512,1024 ^
+ -objectNamePrefix=loadgen ^
+ -objectSize=1024,4096 ^
+ -requestMode=0
+pause
\ No newline at end of file
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\205\263\350\201\224\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Read.html" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\205\263\350\201\224\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Read.html"
new file mode 100644
index 0000000000000000000000000000000000000000..e563af57c27def2be60a51749f1014f587283b47
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\205\263\350\201\224\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Read.html"
@@ -0,0 +1,28 @@
+
+
+
+
+
+ Awesome go-echarts
+
+
+
+
+
+
+
+
+
+
+
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\205\263\350\201\224\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Write.html" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\205\263\350\201\224\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Write.html"
new file mode 100644
index 0000000000000000000000000000000000000000..76be02875e5114ca774b853f7445b255ce074a5e
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\205\263\350\201\224\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Write.html"
@@ -0,0 +1,28 @@
+
+
+
+
+
+ Awesome go-echarts
+
+
+
+
+
+
+
+
+
+
+
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\205\263\350\201\224\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/output.txt" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\205\263\350\201\224\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/output.txt"
new file mode 100644
index 0000000000000000000000000000000000000000..8b48159fe16c1858f61ac2aa704606c46d42c858
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\205\263\350\201\224\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/output.txt"
@@ -0,0 +1,669 @@
+this is my s3bench
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:256 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 513.8µs
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.542 MB/s
+Total Duration: 2.16988 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.00499 s
+Write times 99%th: 0.00448 s
+Write times 90%th: 0.00346 s
+Write times 75%th: 0.00306 s
+Write times 50%th: 0.00262 s
+Write times 25%th: 0.00227 s
+Write times Min : 0.00154 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.456 MB/s
+Total Duration: 1.82280 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.00455 s
+Read times 99%th: 0.00328 s
+Read times 90%th: 0.00273 s
+Read times 75%th: 0.00215 s
+Read times 50%th: 0.00195 s
+Read times 25%th: 0.00180 s
+Read times Min : 0.00104 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:256 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 2.158 MB/s
+Total Duration: 2.15818 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.00555 s
+Write times 99%th: 0.00442 s
+Write times 90%th: 0.00353 s
+Write times 75%th: 0.00296 s
+Write times 50%th: 0.00259 s
+Write times 25%th: 0.00227 s
+Write times Min : 0.00154 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 1.857 MB/s
+Total Duration: 1.85737 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.00471 s
+Read times 99%th: 0.00437 s
+Read times 90%th: 0.00274 s
+Read times 75%th: 0.00220 s
+Read times 50%th: 0.00192 s
+Read times 25%th: 0.00179 s
+Read times Min : 0.00103 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:512 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.500 MB
+Total Throughput: 2.140 MB/s
+Total Duration: 4.27952 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.00632 s
+Write times 99%th: 0.00465 s
+Write times 90%th: 0.00333 s
+Write times 75%th: 0.00296 s
+Write times 50%th: 0.00254 s
+Write times 25%th: 0.00223 s
+Write times Min : 0.00152 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.500 MB
+Total Throughput: 1.835 MB/s
+Total Duration: 3.66966 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.00476 s
+Read times 99%th: 0.00365 s
+Read times 90%th: 0.00275 s
+Read times 75%th: 0.00218 s
+Read times 50%th: 0.00194 s
+Read times 25%th: 0.00178 s
+Read times Min : 0.00103 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:512 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 2.000 MB
+Total Throughput: 8.633 MB/s
+Total Duration: 4.31657 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.00565 s
+Write times 99%th: 0.00427 s
+Write times 90%th: 0.00357 s
+Write times 75%th: 0.00308 s
+Write times 50%th: 0.00260 s
+Write times 25%th: 0.00223 s
+Write times Min : 0.00151 s
+
+
+Result Summary for Read Operations
+Total Transferred: 2.000 MB
+Total Throughput: 7.369 MB/s
+Total Duration: 3.68455 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.00473 s
+Read times 99%th: 0.00362 s
+Read times 90%th: 0.00279 s
+Read times 75%th: 0.00216 s
+Read times 50%th: 0.00193 s
+Read times 25%th: 0.00178 s
+Read times Min : 0.00108 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:1024 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 8.688 MB/s
+Total Duration: 8.68776 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01126 s
+Write times 99%th: 0.00499 s
+Write times 90%th: 0.00353 s
+Write times 75%th: 0.00301 s
+Write times 50%th: 0.00263 s
+Write times 25%th: 0.00229 s
+Write times Min : 0.00151 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 7.281 MB/s
+Total Duration: 7.28084 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.00497 s
+Read times 99%th: 0.00355 s
+Read times 90%th: 0.00263 s
+Read times 75%th: 0.00214 s
+Read times 50%th: 0.00191 s
+Read times 25%th: 0.00178 s
+Read times Min : 0.00103 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:1024 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 4.000 MB
+Total Throughput: 34.894 MB/s
+Total Duration: 8.72355 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.00643 s
+Write times 99%th: 0.00452 s
+Write times 90%th: 0.00348 s
+Write times 75%th: 0.00304 s
+Write times 50%th: 0.00264 s
+Write times 25%th: 0.00232 s
+Write times Min : 0.00151 s
+
+
+Result Summary for Read Operations
+Total Transferred: 4.000 MB
+Total Throughput: 30.286 MB/s
+Total Duration: 7.57138 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.00505 s
+Read times 99%th: 0.00381 s
+Read times 90%th: 0.00284 s
+Read times 75%th: 0.00215 s
+Read times 50%th: 0.00190 s
+Read times 25%th: 0.00178 s
+Read times Min : 0.00103 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:256 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.267 MB/s
+Total Duration: 1.06633 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01028 s
+Write times 99%th: 0.00901 s
+Write times 90%th: 0.00736 s
+Write times 75%th: 0.00646 s
+Write times 50%th: 0.00573 s
+Write times 25%th: 0.00522 s
+Write times Min : 0.00328 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.280 MB/s
+Total Duration: 1.12017 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01389 s
+Read times 99%th: 0.00997 s
+Read times 90%th: 0.00727 s
+Read times 75%th: 0.00632 s
+Read times 50%th: 0.00528 s
+Read times 25%th: 0.00460 s
+Read times Min : 0.00207 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:256 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 1.078 MB/s
+Total Duration: 1.07780 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01034 s
+Write times 99%th: 0.00930 s
+Write times 90%th: 0.00730 s
+Write times 75%th: 0.00636 s
+Write times 50%th: 0.00569 s
+Write times 25%th: 0.00522 s
+Write times Min : 0.00326 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 0.987 MB/s
+Total Duration: 0.98661 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.00808 s
+Read times 99%th: 0.00760 s
+Read times 90%th: 0.00656 s
+Read times 75%th: 0.00571 s
+Read times 50%th: 0.00493 s
+Read times 25%th: 0.00425 s
+Read times Min : 0.00241 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:512 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.500 MB
+Total Throughput: 1.238 MB/s
+Total Duration: 2.47585 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01338 s
+Write times 99%th: 0.01126 s
+Write times 90%th: 0.00866 s
+Write times 75%th: 0.00735 s
+Write times 50%th: 0.00635 s
+Write times 25%th: 0.00564 s
+Write times Min : 0.00386 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.500 MB
+Total Throughput: 1.011 MB/s
+Total Duration: 2.02202 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01299 s
+Read times 99%th: 0.00896 s
+Read times 90%th: 0.00676 s
+Read times 75%th: 0.00585 s
+Read times 50%th: 0.00487 s
+Read times 25%th: 0.00420 s
+Read times Min : 0.00232 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:512 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 2.000 MB
+Total Throughput: 4.903 MB/s
+Total Duration: 2.45174 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01197 s
+Write times 99%th: 0.01106 s
+Write times 90%th: 0.00874 s
+Write times 75%th: 0.00751 s
+Write times 50%th: 0.00651 s
+Write times 25%th: 0.00589 s
+Write times Min : 0.00388 s
+
+
+Result Summary for Read Operations
+Total Transferred: 2.000 MB
+Total Throughput: 3.984 MB/s
+Total Duration: 1.99206 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01017 s
+Read times 99%th: 0.00829 s
+Read times 90%th: 0.00667 s
+Read times 75%th: 0.00581 s
+Read times 50%th: 0.00506 s
+Read times 25%th: 0.00423 s
+Read times Min : 0.00229 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:1024 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 4.981 MB/s
+Total Duration: 4.98055 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01458 s
+Write times 99%th: 0.01146 s
+Write times 90%th: 0.00896 s
+Write times 75%th: 0.00762 s
+Write times 50%th: 0.00648 s
+Write times 25%th: 0.00570 s
+Write times Min : 0.00375 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 4.020 MB/s
+Total Duration: 4.02037 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01456 s
+Read times 99%th: 0.00945 s
+Read times 90%th: 0.00681 s
+Read times 75%th: 0.00586 s
+Read times 50%th: 0.00494 s
+Read times 25%th: 0.00418 s
+Read times Min : 0.00216 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:1024 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 4.000 MB
+Total Throughput: 19.414 MB/s
+Total Duration: 4.85352 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01789 s
+Write times 99%th: 0.01197 s
+Write times 90%th: 0.00862 s
+Write times 75%th: 0.00739 s
+Write times 50%th: 0.00636 s
+Write times 25%th: 0.00569 s
+Write times Min : 0.00352 s
+
+
+Result Summary for Read Operations
+Total Transferred: 4.000 MB
+Total Throughput: 16.333 MB/s
+Total Duration: 4.08325 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01200 s
+Read times 99%th: 0.00902 s
+Read times 90%th: 0.00685 s
+Read times 75%th: 0.00590 s
+Read times 50%th: 0.00500 s
+Read times 25%th: 0.00426 s
+Read times Min : 0.00192 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:256 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.275 MB/s
+Total Duration: 1.09980 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02178 s
+Write times 99%th: 0.01863 s
+Write times 90%th: 0.01685 s
+Write times 75%th: 0.01541 s
+Write times 50%th: 0.01403 s
+Write times 25%th: 0.01251 s
+Write times Min : 0.00775 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.276 MB/s
+Total Duration: 1.10274 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02152 s
+Read times 99%th: 0.01917 s
+Read times 90%th: 0.01586 s
+Read times 75%th: 0.01394 s
+Read times 50%th: 0.01221 s
+Read times 25%th: 0.01048 s
+Read times Min : 0.00340 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:256 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 1.851 MB/s
+Total Duration: 1.85135 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02454 s
+Write times 99%th: 0.01979 s
+Write times 90%th: 0.01674 s
+Write times 75%th: 0.01528 s
+Write times 50%th: 0.01279 s
+Write times 25%th: 0.01018 s
+Write times Min : 0.00508 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 1.064 MB/s
+Total Duration: 1.06357 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01808 s
+Read times 99%th: 0.01609 s
+Read times 90%th: 0.01385 s
+Read times 75%th: 0.01225 s
+Read times 50%th: 0.01055 s
+Read times 25%th: 0.00888 s
+Read times Min : 0.00255 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:512 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.500 MB
+Total Throughput: 1.202 MB/s
+Total Duration: 2.40420 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02746 s
+Write times 99%th: 0.02278 s
+Write times 90%th: 0.01882 s
+Write times 75%th: 0.01685 s
+Write times 50%th: 0.01476 s
+Write times 25%th: 0.01280 s
+Write times Min : 0.00781 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.225 MB
+Total Throughput: 5.928 MB/s
+Total Duration: 26.39281 s
+Number of Errors: 282
+----------------------------------------------------
+Read times Max : 0.52081 s
+Read times 99%th: 0.16318 s
+Read times 90%th: 0.01404 s
+Read times 75%th: 0.01277 s
+Read times 50%th: 0.01113 s
+Read times 25%th: 0.00916 s
+Read times Min : 0.00153 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:512 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 2.000 MB
+Total Throughput: 3.833 MB/s
+Total Duration: 1.91660 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02030 s
+Write times 99%th: 0.01875 s
+Write times 90%th: 0.01622 s
+Write times 75%th: 0.01523 s
+Write times 50%th: 0.01324 s
+Write times 25%th: 0.01030 s
+Write times Min : 0.00538 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.895 MB
+Total Throughput: 11.057 MB/s
+Total Duration: 5.83616 s
+Number of Errors: 27
+----------------------------------------------------
+Read times Max : 0.34510 s
+Read times 99%th: 0.18022 s
+Read times 90%th: 0.01213 s
+Read times 75%th: 0.00914 s
+Read times 50%th: 0.00718 s
+Read times 25%th: 0.00566 s
+Read times Min : 0.00198 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:1024 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.982 MB
+Total Throughput: 5.348 MB/s
+Total Duration: 5.44355 s
+Number of Errors: 18
+----------------------------------------------------
+Write times Max : 0.39392 s
+Write times 99%th: 0.02073 s
+Write times 90%th: 0.01378 s
+Write times 75%th: 0.01200 s
+Write times 50%th: 0.01061 s
+Write times 25%th: 0.00918 s
+Write times Min : 0.00305 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.966 MB
+Total Throughput: 8.448 MB/s
+Total Duration: 8.74728 s
+Number of Errors: 35
+----------------------------------------------------
+Read times Max : 0.34955 s
+Read times 99%th: 0.15969 s
+Read times 90%th: 0.01133 s
+Read times 75%th: 0.00969 s
+Read times 50%th: 0.00787 s
+Read times 25%th: 0.00611 s
+Read times Min : 0.00163 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:1024 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 4.000 MB
+Total Throughput: 14.563 MB/s
+Total Duration: 3.64084 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02318 s
+Write times 99%th: 0.01900 s
+Write times 90%th: 0.01462 s
+Write times 75%th: 0.01304 s
+Write times 50%th: 0.01120 s
+Write times 25%th: 0.00958 s
+Write times Min : 0.00486 s
+
+
+Result Summary for Read Operations
+Total Transferred: 3.793 MB
+Total Throughput: 45.019 MB/s
+Total Duration: 11.86903 s
+Number of Errors: 53
+----------------------------------------------------
+Read times Max : 0.52018 s
+Read times 99%th: 0.20694 s
+Read times 90%th: 0.01184 s
+Read times 75%th: 0.01012 s
+Read times 50%th: 0.00823 s
+Read times 25%th: 0.00631 s
+Read times Min : 0.00152 s
+
+The line chart of the test result is saved as Write.html
+The line chart of the test result is saved as Read.html
\ No newline at end of file
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\257\271\345\206\262\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Read.html" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\257\271\345\206\262\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Read.html"
new file mode 100644
index 0000000000000000000000000000000000000000..acb9618961adf36e3c04ee383956eee49b6851eb
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\257\271\345\206\262\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Read.html"
@@ -0,0 +1,28 @@
+
+
+
+
+
+ Awesome go-echarts
+
+
+
+
+
+
+
+
+
+
+
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\257\271\345\206\262\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Write.html" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\257\271\345\206\262\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Write.html"
new file mode 100644
index 0000000000000000000000000000000000000000..df9408946a7975dffa1225bbccabd15891b2796e
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\257\271\345\206\262\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Write.html"
@@ -0,0 +1,28 @@
+
+
+
+
+
+ Awesome go-echarts
+
+
+
+
+
+
+
+
+
+
+
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\257\271\345\206\262\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/output.txt" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\257\271\345\206\262\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/output.txt"
new file mode 100644
index 0000000000000000000000000000000000000000..6bf5bacdf24dc2bdda076e5b080b47d5899fef7d
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\257\271\345\206\262\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/output.txt"
@@ -0,0 +1,669 @@
+this is my s3bench
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:256 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.171 MB/s
+Total Duration: 0.68480 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01128 s
+Write times 99%th: 0.00581 s
+Write times 90%th: 0.00421 s
+Write times 75%th: 0.00349 s
+Write times 50%th: 0.00256 s
+Write times 25%th: 0.00205 s
+Write times Min : 0.00051 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.409 MB/s
+Total Duration: 1.63696 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.04497 s
+Read times 99%th: 0.01088 s
+Read times 90%th: 0.00728 s
+Read times 75%th: 0.00648 s
+Read times 50%th: 0.00590 s
+Read times 25%th: 0.00548 s
+Read times Min : 0.00123 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:256 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 0.633 MB/s
+Total Duration: 0.63270 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01231 s
+Write times 99%th: 0.00539 s
+Write times 90%th: 0.00401 s
+Write times 75%th: 0.00334 s
+Write times 50%th: 0.00226 s
+Write times 25%th: 0.00163 s
+Write times Min : 0.00050 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 1.551 MB/s
+Total Duration: 1.55118 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01309 s
+Read times 99%th: 0.01027 s
+Read times 90%th: 0.00706 s
+Read times 75%th: 0.00646 s
+Read times 50%th: 0.00593 s
+Read times 25%th: 0.00540 s
+Read times Min : 0.00107 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:512 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.500 MB
+Total Throughput: 0.733 MB/s
+Total Duration: 1.46591 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01506 s
+Write times 99%th: 0.00680 s
+Write times 90%th: 0.00451 s
+Write times 75%th: 0.00356 s
+Write times 50%th: 0.00263 s
+Write times 25%th: 0.00205 s
+Write times Min : 0.00051 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.500 MB
+Total Throughput: 1.542 MB/s
+Total Duration: 3.08410 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01347 s
+Read times 99%th: 0.01053 s
+Read times 90%th: 0.00699 s
+Read times 75%th: 0.00643 s
+Read times 50%th: 0.00587 s
+Read times 25%th: 0.00533 s
+Read times Min : 0.00160 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:512 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 2.000 MB
+Total Throughput: 2.823 MB/s
+Total Duration: 1.41158 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01472 s
+Write times 99%th: 0.00584 s
+Write times 90%th: 0.00435 s
+Write times 75%th: 0.00352 s
+Write times 50%th: 0.00256 s
+Write times 25%th: 0.00198 s
+Write times Min : 0.00051 s
+
+
+Result Summary for Read Operations
+Total Transferred: 2.000 MB
+Total Throughput: 6.123 MB/s
+Total Duration: 3.06132 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01297 s
+Read times 99%th: 0.00943 s
+Read times 90%th: 0.00687 s
+Read times 75%th: 0.00639 s
+Read times 50%th: 0.00585 s
+Read times 25%th: 0.00537 s
+Read times Min : 0.00105 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:1024 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 2.787 MB/s
+Total Duration: 2.78714 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01687 s
+Write times 99%th: 0.00675 s
+Write times 90%th: 0.00442 s
+Write times 75%th: 0.00346 s
+Write times 50%th: 0.00252 s
+Write times 25%th: 0.00194 s
+Write times Min : 0.00051 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 6.109 MB/s
+Total Duration: 6.10897 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01347 s
+Read times 99%th: 0.00947 s
+Read times 90%th: 0.00680 s
+Read times 75%th: 0.00636 s
+Read times 50%th: 0.00588 s
+Read times 25%th: 0.00544 s
+Read times Min : 0.00161 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:1024 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 4.000 MB
+Total Throughput: 11.632 MB/s
+Total Duration: 2.90799 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.03687 s
+Write times 99%th: 0.00659 s
+Write times 90%th: 0.00457 s
+Write times 75%th: 0.00351 s
+Write times 50%th: 0.00246 s
+Write times 25%th: 0.00162 s
+Write times Min : 0.00051 s
+
+
+Result Summary for Read Operations
+Total Transferred: 4.000 MB
+Total Throughput: 24.488 MB/s
+Total Duration: 6.12197 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01800 s
+Read times 99%th: 0.00947 s
+Read times 90%th: 0.00687 s
+Read times 75%th: 0.00639 s
+Read times 50%th: 0.00590 s
+Read times 25%th: 0.00540 s
+Read times Min : 0.00110 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:256 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.113 MB/s
+Total Duration: 0.45232 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01190 s
+Write times 99%th: 0.01044 s
+Write times 90%th: 0.00867 s
+Write times 75%th: 0.00779 s
+Write times 50%th: 0.00697 s
+Write times 25%th: 0.00600 s
+Write times Min : 0.00273 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.134 MB/s
+Total Duration: 0.53745 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01717 s
+Read times 99%th: 0.01464 s
+Read times 90%th: 0.01028 s
+Read times 75%th: 0.00912 s
+Read times 50%th: 0.00823 s
+Read times 25%th: 0.00748 s
+Read times Min : 0.00115 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:256 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 0.401 MB/s
+Total Duration: 0.40150 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02085 s
+Write times 99%th: 0.01532 s
+Write times 90%th: 0.00770 s
+Write times 75%th: 0.00687 s
+Write times 50%th: 0.00584 s
+Write times 25%th: 0.00516 s
+Write times Min : 0.00215 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 0.595 MB/s
+Total Duration: 0.59491 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02428 s
+Read times 99%th: 0.01929 s
+Read times 90%th: 0.01245 s
+Read times 75%th: 0.01017 s
+Read times 50%th: 0.00842 s
+Read times 25%th: 0.00779 s
+Read times Min : 0.00104 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:512 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.500 MB
+Total Throughput: 0.366 MB/s
+Total Duration: 0.73135 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01091 s
+Write times 99%th: 0.00963 s
+Write times 90%th: 0.00729 s
+Write times 75%th: 0.00641 s
+Write times 50%th: 0.00555 s
+Write times 25%th: 0.00476 s
+Write times Min : 0.00108 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.500 MB
+Total Throughput: 0.526 MB/s
+Total Duration: 1.05281 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01564 s
+Read times 99%th: 0.01246 s
+Read times 90%th: 0.00989 s
+Read times 75%th: 0.00896 s
+Read times 50%th: 0.00814 s
+Read times 25%th: 0.00744 s
+Read times Min : 0.00105 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:512 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 2.000 MB
+Total Throughput: 1.732 MB/s
+Total Duration: 0.86587 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01415 s
+Write times 99%th: 0.01196 s
+Write times 90%th: 0.00935 s
+Write times 75%th: 0.00794 s
+Write times 50%th: 0.00640 s
+Write times 25%th: 0.00528 s
+Write times Min : 0.00213 s
+
+
+Result Summary for Read Operations
+Total Transferred: 2.000 MB
+Total Throughput: 2.298 MB/s
+Total Duration: 1.14912 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02208 s
+Read times 99%th: 0.01665 s
+Read times 90%th: 0.01180 s
+Read times 75%th: 0.00962 s
+Read times 50%th: 0.00844 s
+Read times 25%th: 0.00771 s
+Read times Min : 0.00104 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:1024 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 1.664 MB/s
+Total Duration: 1.66438 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01805 s
+Write times 99%th: 0.01135 s
+Write times 90%th: 0.00856 s
+Write times 75%th: 0.00742 s
+Write times 50%th: 0.00614 s
+Write times 25%th: 0.00534 s
+Write times Min : 0.00163 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 2.206 MB/s
+Total Duration: 2.20633 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.03157 s
+Read times 99%th: 0.01391 s
+Read times 90%th: 0.01026 s
+Read times 75%th: 0.00927 s
+Read times 50%th: 0.00845 s
+Read times 25%th: 0.00773 s
+Read times Min : 0.00106 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:1024 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 4.000 MB
+Total Throughput: 8.431 MB/s
+Total Duration: 2.10770 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.04464 s
+Write times 99%th: 0.01597 s
+Write times 90%th: 0.01003 s
+Write times 75%th: 0.00864 s
+Write times 50%th: 0.00745 s
+Write times 25%th: 0.00648 s
+Write times Min : 0.00175 s
+
+
+Result Summary for Read Operations
+Total Transferred: 4.000 MB
+Total Throughput: 9.902 MB/s
+Total Duration: 2.47546 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01855 s
+Read times 99%th: 0.01576 s
+Read times 90%th: 0.01164 s
+Read times 75%th: 0.01036 s
+Read times 50%th: 0.00942 s
+Read times 25%th: 0.00867 s
+Read times Min : 0.00104 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:256 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.118 MB/s
+Total Duration: 0.47354 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02569 s
+Write times 99%th: 0.02301 s
+Write times 90%th: 0.01846 s
+Write times 75%th: 0.01654 s
+Write times 50%th: 0.01458 s
+Write times 25%th: 0.01247 s
+Write times Min : 0.00645 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.151 MB/s
+Total Duration: 0.60292 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.04631 s
+Read times 99%th: 0.02682 s
+Read times 90%th: 0.02218 s
+Read times 75%th: 0.01943 s
+Read times 50%th: 0.01579 s
+Read times 25%th: 0.01401 s
+Read times Min : 0.00173 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:256 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 0.445 MB/s
+Total Duration: 0.44524 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02252 s
+Write times 99%th: 0.01901 s
+Write times 90%th: 0.01652 s
+Write times 75%th: 0.01516 s
+Write times 50%th: 0.01392 s
+Write times 25%th: 0.01235 s
+Write times Min : 0.00679 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 0.959 MB/s
+Total Duration: 0.95922 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.04072 s
+Read times 99%th: 0.03163 s
+Read times 90%th: 0.02394 s
+Read times 75%th: 0.01992 s
+Read times 50%th: 0.01773 s
+Read times 25%th: 0.01641 s
+Read times Min : 0.00146 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:512 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 119.3µs
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.500 MB
+Total Throughput: 0.373 MB/s
+Total Duration: 0.74627 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02523 s
+Write times 99%th: 0.02136 s
+Write times 90%th: 0.01478 s
+Write times 75%th: 0.01281 s
+Write times 50%th: 0.01110 s
+Write times 25%th: 0.00983 s
+Write times Min : 0.00620 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.500 MB
+Total Throughput: 0.528 MB/s
+Total Duration: 1.05664 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02917 s
+Read times 99%th: 0.02349 s
+Read times 90%th: 0.01914 s
+Read times 75%th: 0.01762 s
+Read times 50%th: 0.01626 s
+Read times 25%th: 0.01520 s
+Read times Min : 0.00386 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:512 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 2.000 MB
+Total Throughput: 2.010 MB/s
+Total Duration: 1.00499 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02694 s
+Write times 99%th: 0.02402 s
+Write times 90%th: 0.02009 s
+Write times 75%th: 0.01725 s
+Write times 50%th: 0.01536 s
+Write times 25%th: 0.01362 s
+Write times Min : 0.00770 s
+
+
+Result Summary for Read Operations
+Total Transferred: 2.000 MB
+Total Throughput: 2.358 MB/s
+Total Duration: 1.17883 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.04070 s
+Read times 99%th: 0.03829 s
+Read times 90%th: 0.01929 s
+Read times 75%th: 0.01735 s
+Read times 50%th: 0.01586 s
+Read times 25%th: 0.01416 s
+Read times Min : 0.00128 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:1024 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 1.824 MB/s
+Total Duration: 1.82357 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.04804 s
+Write times 99%th: 0.02176 s
+Write times 90%th: 0.01678 s
+Write times 75%th: 0.01481 s
+Write times 50%th: 0.01310 s
+Write times 25%th: 0.01117 s
+Write times Min : 0.00648 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 2.126 MB/s
+Total Duration: 2.12593 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02718 s
+Read times 99%th: 0.02263 s
+Read times 90%th: 0.01897 s
+Read times 75%th: 0.01774 s
+Read times 50%th: 0.01644 s
+Read times 25%th: 0.01539 s
+Read times Min : 0.00157 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:1024 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 4.000 MB
+Total Throughput: 8.962 MB/s
+Total Duration: 2.24062 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.03104 s
+Write times 99%th: 0.02382 s
+Write times 90%th: 0.01924 s
+Write times 75%th: 0.01670 s
+Write times 50%th: 0.01488 s
+Write times 25%th: 0.01338 s
+Write times Min : 0.00642 s
+
+
+Result Summary for Read Operations
+Total Transferred: 4.000 MB
+Total Throughput: 10.852 MB/s
+Total Duration: 2.71303 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.05488 s
+Read times 99%th: 0.03160 s
+Read times 90%th: 0.01868 s
+Read times 75%th: 0.01706 s
+Read times 50%th: 0.01550 s
+Read times 25%th: 0.01402 s
+Read times Min : 0.00123 s
+
+The line chart of the test result is saved as Write.html
+The line chart of the test result is saved as Read.html
\ No newline at end of file
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\270\270\350\247\204\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Read.html" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\270\270\350\247\204\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Read.html"
new file mode 100644
index 0000000000000000000000000000000000000000..57a0e505084beca10a9034744e3c85e9fb883b9a
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\270\270\350\247\204\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Read.html"
@@ -0,0 +1,28 @@
+
+
+
+
+
+ Awesome go-echarts
+
+
+
+
+
+
+
+
+
+
+
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\270\270\350\247\204\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Write.html" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\270\270\350\247\204\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Write.html"
new file mode 100644
index 0000000000000000000000000000000000000000..8aedfbaf70680f3d47a06c90790849030ce2e118
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\270\270\350\247\204\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/Write.html"
@@ -0,0 +1,28 @@
+
+
+
+
+
+ Awesome go-echarts
+
+
+
+
+
+
+
+
+
+
+
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\270\270\350\247\204\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/output.txt" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\270\270\350\247\204\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/output.txt"
new file mode 100644
index 0000000000000000000000000000000000000000..4545896fc6619148dc906e21efb6a50a77497e6a
--- /dev/null
+++ "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\345\270\270\350\247\204\350\257\267\346\261\202\346\265\213\350\257\225\347\273\223\346\236\234/output.txt"
@@ -0,0 +1,669 @@
+this is my s3bench
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:256 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.288 MB/s
+Total Duration: 1.15386 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.00925 s
+Write times 99%th: 0.00689 s
+Write times 90%th: 0.00561 s
+Write times 75%th: 0.00489 s
+Write times 50%th: 0.00438 s
+Write times 25%th: 0.00401 s
+Write times Min : 0.00263 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.809 MB/s
+Total Duration: 3.23758 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02822 s
+Read times 99%th: 0.01751 s
+Read times 90%th: 0.01502 s
+Read times 75%th: 0.01339 s
+Read times 50%th: 0.01262 s
+Read times 25%th: 0.01143 s
+Read times Min : 0.00683 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:256 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 1.077 MB/s
+Total Duration: 1.07652 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01248 s
+Write times 99%th: 0.00825 s
+Write times 90%th: 0.00602 s
+Write times 75%th: 0.00512 s
+Write times 50%th: 0.00375 s
+Write times 25%th: 0.00304 s
+Write times Min : 0.00222 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 3.212 MB/s
+Total Duration: 3.21248 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02178 s
+Read times 99%th: 0.01886 s
+Read times 90%th: 0.01397 s
+Read times 75%th: 0.01312 s
+Read times 50%th: 0.01251 s
+Read times 25%th: 0.01179 s
+Read times Min : 0.00418 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:512 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.500 MB
+Total Throughput: 2.248 MB/s
+Total Duration: 4.49600 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02066 s
+Write times 99%th: 0.01807 s
+Write times 90%th: 0.01379 s
+Write times 75%th: 0.01293 s
+Write times 50%th: 0.00822 s
+Write times 25%th: 0.00454 s
+Write times Min : 0.00195 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.500 MB
+Total Throughput: 3.340 MB/s
+Total Duration: 6.67951 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.12973 s
+Read times 99%th: 0.01909 s
+Read times 90%th: 0.01529 s
+Read times 75%th: 0.01336 s
+Read times 50%th: 0.01259 s
+Read times 25%th: 0.01191 s
+Read times Min : 0.00456 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:512 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 2.000 MB
+Total Throughput: 4.366 MB/s
+Total Duration: 2.18276 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01356 s
+Write times 99%th: 0.00812 s
+Write times 90%th: 0.00601 s
+Write times 75%th: 0.00485 s
+Write times 50%th: 0.00396 s
+Write times 25%th: 0.00330 s
+Write times Min : 0.00208 s
+
+
+Result Summary for Read Operations
+Total Transferred: 2.000 MB
+Total Throughput: 12.865 MB/s
+Total Duration: 6.43261 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02281 s
+Read times 99%th: 0.01874 s
+Read times 90%th: 0.01382 s
+Read times 75%th: 0.01311 s
+Read times 50%th: 0.01257 s
+Read times 25%th: 0.01175 s
+Read times Min : 0.00564 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:1024 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 8.852 MB/s
+Total Duration: 8.85175 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02154 s
+Write times 99%th: 0.01788 s
+Write times 90%th: 0.01443 s
+Write times 75%th: 0.01305 s
+Write times 50%th: 0.00823 s
+Write times 25%th: 0.00369 s
+Write times Min : 0.00212 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 12.906 MB/s
+Total Duration: 12.90631 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02612 s
+Read times 99%th: 0.01851 s
+Read times 90%th: 0.01382 s
+Read times 75%th: 0.01316 s
+Read times 50%th: 0.01257 s
+Read times 25%th: 0.01191 s
+Read times Min : 0.00311 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:1 numOfSamples:1024 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 89.8µs
+Setting up 1 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 4.000 MB
+Total Throughput: 15.452 MB/s
+Total Duration: 3.86291 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01220 s
+Write times 99%th: 0.00664 s
+Write times 90%th: 0.00503 s
+Write times 75%th: 0.00427 s
+Write times 50%th: 0.00357 s
+Write times 25%th: 0.00301 s
+Write times Min : 0.00197 s
+
+
+Result Summary for Read Operations
+Total Transferred: 4.000 MB
+Total Throughput: 51.932 MB/s
+Total Duration: 12.98306 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02305 s
+Read times 99%th: 0.02055 s
+Read times 90%th: 0.01413 s
+Read times 75%th: 0.01328 s
+Read times 50%th: 0.01264 s
+Read times 25%th: 0.01184 s
+Read times Min : 0.00282 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:256 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.132 MB/s
+Total Duration: 0.52614 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.01699 s
+Write times 99%th: 0.01525 s
+Write times 90%th: 0.00999 s
+Write times 75%th: 0.00896 s
+Write times 50%th: 0.00804 s
+Write times 25%th: 0.00695 s
+Write times Min : 0.00490 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.153 MB/s
+Total Duration: 0.61067 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.01764 s
+Read times 99%th: 0.01617 s
+Read times 90%th: 0.01085 s
+Read times 75%th: 0.01005 s
+Read times 50%th: 0.00925 s
+Read times 25%th: 0.00861 s
+Read times Min : 0.00695 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:256 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 0.541 MB/s
+Total Duration: 0.54057 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.03366 s
+Write times 99%th: 0.02573 s
+Write times 90%th: 0.01118 s
+Write times 75%th: 0.00925 s
+Write times 50%th: 0.00770 s
+Write times 25%th: 0.00652 s
+Write times Min : 0.00392 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 0.669 MB/s
+Total Duration: 0.66855 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02297 s
+Read times 99%th: 0.01913 s
+Read times 90%th: 0.01483 s
+Read times 75%th: 0.01075 s
+Read times 50%th: 0.00954 s
+Read times 25%th: 0.00879 s
+Read times Min : 0.00683 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:512 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.500 MB
+Total Throughput: 1.090 MB/s
+Total Duration: 2.18009 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.12897 s
+Write times 99%th: 0.03002 s
+Write times 90%th: 0.02437 s
+Write times 75%th: 0.02047 s
+Write times 50%th: 0.01646 s
+Write times 25%th: 0.01092 s
+Write times Min : 0.00463 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.500 MB
+Total Throughput: 0.745 MB/s
+Total Duration: 1.49088 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.03499 s
+Read times 99%th: 0.02723 s
+Read times 90%th: 0.01605 s
+Read times 75%th: 0.01285 s
+Read times 50%th: 0.01055 s
+Read times 25%th: 0.00904 s
+Read times Min : 0.00682 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:512 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 2.000 MB
+Total Throughput: 2.551 MB/s
+Total Duration: 1.27545 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02191 s
+Write times 99%th: 0.01952 s
+Write times 90%th: 0.01371 s
+Write times 75%th: 0.01100 s
+Write times 50%th: 0.00914 s
+Write times 25%th: 0.00824 s
+Write times Min : 0.00532 s
+
+
+Result Summary for Read Operations
+Total Transferred: 2.000 MB
+Total Throughput: 2.686 MB/s
+Total Duration: 1.34290 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02160 s
+Read times 99%th: 0.01902 s
+Read times 90%th: 0.01324 s
+Read times 75%th: 0.01127 s
+Read times 50%th: 0.00995 s
+Read times 25%th: 0.00887 s
+Read times Min : 0.00676 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:1024 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 2.845 MB/s
+Total Duration: 2.84522 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.02910 s
+Write times 99%th: 0.02539 s
+Write times 90%th: 0.01917 s
+Write times 75%th: 0.01447 s
+Write times 50%th: 0.00903 s
+Write times 25%th: 0.00712 s
+Write times Min : 0.00411 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 2.602 MB/s
+Total Duration: 2.60248 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.03020 s
+Read times 99%th: 0.02483 s
+Read times 90%th: 0.01308 s
+Read times 75%th: 0.01043 s
+Read times 50%th: 0.00927 s
+Read times 25%th: 0.00848 s
+Read times Min : 0.00586 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:4 numOfSamples:1024 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 4 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 4.000 MB
+Total Throughput: 11.614 MB/s
+Total Duration: 2.90348 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.03210 s
+Write times 99%th: 0.02589 s
+Write times 90%th: 0.01952 s
+Write times 75%th: 0.01454 s
+Write times 50%th: 0.00923 s
+Write times 25%th: 0.00687 s
+Write times Min : 0.00398 s
+
+
+Result Summary for Read Operations
+Total Transferred: 4.000 MB
+Total Throughput: 10.562 MB/s
+Total Duration: 2.64060 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.03210 s
+Read times 99%th: 0.01845 s
+Read times 90%th: 0.01449 s
+Read times 75%th: 0.01072 s
+Read times 50%th: 0.00955 s
+Read times 25%th: 0.00874 s
+Read times Min : 0.00621 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:256 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.221 MB/s
+Total Duration: 0.88515 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.51033 s
+Write times 99%th: 0.02216 s
+Write times 90%th: 0.01769 s
+Write times 75%th: 0.01609 s
+Write times 50%th: 0.01439 s
+Write times 25%th: 0.01304 s
+Write times Min : 0.00681 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.250 MB
+Total Throughput: 0.158 MB/s
+Total Duration: 0.63326 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.09000 s
+Read times 99%th: 0.07662 s
+Read times 90%th: 0.02399 s
+Read times 75%th: 0.01814 s
+Read times 50%th: 0.01642 s
+Read times 25%th: 0.01515 s
+Read times Min : 0.00960 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:256 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 0.501 MB/s
+Total Duration: 0.50133 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.03682 s
+Write times 99%th: 0.02959 s
+Write times 90%th: 0.01967 s
+Write times 75%th: 0.01676 s
+Write times 50%th: 0.01460 s
+Write times 25%th: 0.01297 s
+Write times Min : 0.00867 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 0.547 MB/s
+Total Duration: 0.54658 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.06948 s
+Read times 99%th: 0.05981 s
+Read times 90%th: 0.01876 s
+Read times 75%th: 0.01643 s
+Read times 50%th: 0.01546 s
+Read times 25%th: 0.01441 s
+Read times Min : 0.01008 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:512 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 0.500 MB
+Total Throughput: 0.836 MB/s
+Total Duration: 1.67144 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.53161 s
+Write times 99%th: 0.03648 s
+Write times 90%th: 0.03143 s
+Write times 75%th: 0.02874 s
+Write times 50%th: 0.02495 s
+Write times 25%th: 0.02116 s
+Write times Min : 0.01076 s
+
+
+Result Summary for Read Operations
+Total Transferred: 0.500 MB
+Total Throughput: 0.538 MB/s
+Total Duration: 1.07612 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.52578 s
+Read times 99%th: 0.02509 s
+Read times 90%th: 0.01908 s
+Read times 75%th: 0.01723 s
+Read times 50%th: 0.01536 s
+Read times 25%th: 0.01390 s
+Read times Min : 0.00966 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:512 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 2.000 MB
+Total Throughput: 2.198 MB/s
+Total Duration: 1.09913 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.53802 s
+Write times 99%th: 0.03049 s
+Write times 90%th: 0.01824 s
+Write times 75%th: 0.01577 s
+Write times 50%th: 0.01269 s
+Write times 25%th: 0.00985 s
+Write times Min : 0.00607 s
+
+
+Result Summary for Read Operations
+Total Transferred: 2.000 MB
+Total Throughput: 2.505 MB/s
+Total Duration: 1.25264 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.52845 s
+Read times 99%th: 0.15322 s
+Read times 90%th: 0.02036 s
+Read times 75%th: 0.01766 s
+Read times 50%th: 0.01584 s
+Read times 25%th: 0.01436 s
+Read times Min : 0.00869 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:1024 objectNamePrefix:loadgen objectSize:1024 }Generating the sample data in memory whose size is 1024...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 1.000 MB
+Total Throughput: 2.279 MB/s
+Total Duration: 2.27860 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.05284 s
+Write times 99%th: 0.04497 s
+Write times 90%th: 0.02878 s
+Write times 75%th: 0.02011 s
+Write times 50%th: 0.01479 s
+Write times 25%th: 0.01292 s
+Write times Min : 0.00737 s
+
+
+Result Summary for Read Operations
+Total Transferred: 1.000 MB
+Total Throughput: 2.038 MB/s
+Total Duration: 2.03843 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.52429 s
+Read times 99%th: 0.02231 s
+Read times 90%th: 0.01796 s
+Read times 75%th: 0.01620 s
+Read times 50%th: 0.01526 s
+Read times 25%th: 0.01422 s
+Read times Min : 0.00992 s
+
+params:{ accessKey:hust secretKey:hust_obs bucket:loadgen endpoint:http://127.0.0.1:9090 numOfClients:8 numOfSamples:1024 objectNamePrefix:loadgen objectSize:4096 }Generating the sample data in memory whose size is 4096...
+Done. Time cost : 0s
+Setting up 8 clients...
+Runnig Write Test...
+Done.
+Runnig Read Test...
+Done.
+
+Result Summary for Write Operations
+Total Transferred: 4.000 MB
+Total Throughput: 7.870 MB/s
+Total Duration: 1.96756 s
+Number of Errors: 0
+----------------------------------------------------
+Write times Max : 0.51982 s
+Write times 99%th: 0.02686 s
+Write times 90%th: 0.01877 s
+Write times 75%th: 0.01611 s
+Write times 50%th: 0.01397 s
+Write times 25%th: 0.01195 s
+Write times Min : 0.00614 s
+
+
+Result Summary for Read Operations
+Total Transferred: 4.000 MB
+Total Throughput: 7.959 MB/s
+Total Duration: 1.98963 s
+Number of Errors: 0
+----------------------------------------------------
+Read times Max : 0.02542 s
+Read times 99%th: 0.02058 s
+Read times 90%th: 0.01770 s
+Read times 75%th: 0.01642 s
+Read times 50%th: 0.01543 s
+Read times 25%th: 0.01442 s
+Read times Min : 0.00937 s
+
+The line chart of the test result is saved as Write.html
+The line chart of the test result is saved as Read.html
\ No newline at end of file
diff --git "a/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\346\240\241\344\272\2441902_U201916202_\346\235\250\345\277\227\345\206\233.pdf" "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\346\240\241\344\272\2441902_U201916202_\346\235\250\345\277\227\345\206\233.pdf"
new file mode 100644
index 0000000000000000000000000000000000000000..f137ff2a3eb22166ef82aeb27abf1529d3b514f1
Binary files /dev/null and "b/U201916202/\345\256\236\351\252\214\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/\346\240\241\344\272\2441902_U201916202_\346\235\250\345\277\227\345\206\233.pdf" differ
diff --git "a/U201916202/\347\220\206\350\256\272\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/README.md" "b/U201916202/\347\220\206\350\256\272\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/README.md"
new file mode 100644
index 0000000000000000000000000000000000000000..081b7514714c8cf1ef37fbb1ae64dd1a35e9e970
--- /dev/null
+++ "b/U201916202/\347\220\206\350\256\272\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/README.md"
@@ -0,0 +1,14 @@
+# README
+
+main.cpp中包含了我在本次课程设计中实现的1个基础模型和2个优化模型,以及正确性测试函数、性能测试函数。
+
+代码中有一处宏定义:
+
+```c++
+#define TEST_MODE 1
+```
+
+- 当TEST_MODE为0时,程序将分别对三个模型进行正确性测试,测试结果将分别保存在"output_1.txt", "output_2.txt", "output_3.txt"中。由于正确性测试会产生大量的输出,因此进行正确性测试时,测试规模不宜太大,十万量级的插入元素能在可接受的时间内给出测试结果。
+- 当TEST_MODE为1时,程序将分别对三个模型进行性能测试,并将测试结果输出打印在终端,供用户参考。性能测试过程中没有输出,只会在测试结束后才给出测试结果输出,因此性能测试时测试规模可以尽量大,我在报告中使用的测试规模为千万量级。
+
+若读者对本次课程设计有任何意见或建议,欢迎联系,QQ573448239。
\ No newline at end of file
diff --git "a/U201916202/\347\220\206\350\256\272\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/main.cpp" "b/U201916202/\347\220\206\350\256\272\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/main.cpp"
new file mode 100644
index 0000000000000000000000000000000000000000..55cca7896b37ea5f863a296b8fef175b75d94c68
--- /dev/null
+++ "b/U201916202/\347\220\206\350\256\272\350\257\276\346\217\220\344\272\244\346\226\207\344\273\266\345\244\271/main.cpp"
@@ -0,0 +1,441 @@
+#include
+
+using namespace std;
+
+//0为正确性测试,有输出
+//1为性能测试,无输出,有计时
+#define TEST_MODE 1
+
+
+class CuckooHash{
+private:
+ unsigned size;
+ unsigned hashFuncNum;
+ unsigned maxRelocateNum;
+ double maxLoadFactor;
+ char** hashTable;
+ unsigned* cnt;
+ list auxList;
+ unordered_set posSet;
+ unsigned totalRelocateNum=0;
+
+ unsigned long long hashFunc1(const char* s) {
+ unsigned long long hash = 1315423911;
+ for(int i = 0; s[i]!=0; i++) {
+ hash ^= ((hash << 5) + s[i] + (hash >> 2));
+ }
+ return hash;
+ }
+ unsigned long long hashFunc2(const char* s){
+ int b = 378551;
+ int a = 63689;
+ unsigned long long hash = 0;
+ for(int i = 0; s[i]!=0; i++)
+ {
+ hash = hash * a + (int)s[i];
+ a = a * b;
+ }
+ return hash;
+ }
+
+ //随机迁移
+ char* rndRelocate(char* s){
+ unsigned long long h1=hashFunc1(s),h2=hashFunc2(s);
+ unsigned long long h=h1;
+ for(int i=0;ihashFuncNum;i++,h+=h2){
+ unsigned pos=h%this->size;
+ if(this->hashTable[pos]==NULL){
+ this->hashTable[pos]=s;
+ return NULL;
+ }
+ }
+ h=h1;
+ for(int i=0;ihashFuncNum;i++,h+=h2){
+ unsigned pos=h%this->size;
+ if(posSet.find(pos)==posSet.end()){
+ posSet.insert(pos);
+ char* rnt=this->hashTable[pos];
+ this->hashTable[pos]=s;
+ totalRelocateNum++;
+ return rnt;
+ }
+ }
+ //所有位置都走过了,无法避免环路,返回原值
+ return s;
+ }
+
+ typedef struct hrstStrct{
+ char* s;
+ unsigned cnt;
+ }hrstStrct;
+
+ //最少迁移次数启发式策略
+ hrstStrct hrstRelocate_1(hrstStrct hs){
+ unsigned long long h1=hashFunc1(hs.s),h2=hashFunc2(hs.s);
+ unsigned long long h=h1;
+ unsigned minCnt=0x7FFFFFFF, minPos=-1;
+ for(int i=0;ihashFuncNum;i++,h+=h2){
+ unsigned pos=h%this->size;
+ if(this->hashTable[pos]==NULL){
+ this->hashTable[pos]=hs.s;
+ this->cnt[pos]=hs.cnt;
+ return {NULL,0};
+ }
+ }
+ h=h1;
+ for(int i=0;ihashFuncNum;i++,h+=h2){
+ unsigned pos=h%this->size;
+ if(cnt[pos]hashTable[minPos],this->cnt[minPos]+1};
+ this->hashTable[minPos]=hs.s;
+ this->cnt[minPos]=hs.cnt;
+ totalRelocateNum++;
+ return rnt;
+ }
+
+ //所有位置都走过了,无法避免环路,返回原值
+ return hs;
+ }
+
+ //最多空桶启发式策略
+ char* hrstRelocate_2(char* s){
+ unsigned long long h1=hashFunc1(s),h2=hashFunc2(s);
+ unsigned long long h=h1;
+ unsigned minCnt=0xFFFF, minPos=-1;
+ unsigned usedNum=0,emptyPos=-1;
+ for(int i=0;ihashFuncNum;i++,h+=h2){
+ unsigned pos=h%this->size;
+ if(this->hashTable[pos]!=NULL){
+ usedNum++;
+ }
+ else if(emptyPos==-1){
+ emptyPos=pos;
+ }
+ }
+ if(emptyPos!=-1){
+ this->hashTable[emptyPos]=s;
+ this->cnt[emptyPos]=usedNum+1;
+ return NULL;
+ }
+ h=h1;
+ for(int i=0;ihashFuncNum;i++,h+=h2){
+ unsigned pos=h%this->size;
+ if(cnt[pos]hashTable[minPos];
+ this->hashTable[minPos]=s;
+ this->cnt[minPos]=this->hashFuncNum;
+ totalRelocateNum++;
+ return rnt;
+ }
+
+ //所有位置都走过了,无法避免环路,返回原值
+ return s;
+ }
+
+
+ void insertToAuxList(char* s){
+ this->auxList.push_front(s);
+ if(TEST_MODE==0)
+ cout<size=size;
+ this->hashFuncNum=hashFuncNum;
+ this->maxRelocateNum=maxRelocateNum;
+ this->maxLoadFactor=maxLoadFactor;
+ hashTable=(char**)malloc(sizeof(char*)*this->size);
+ cnt=(unsigned*)malloc(sizeof(unsigned)*this->size);
+ for(unsigned i=0;isize;i++){
+ hashTable[i]=NULL;
+ }
+ srand(time(NULL));
+ }
+
+ //返回该元素插入的位置在所有侯选位置中的序号
+ //返回值为非负数表示插入成功,否则为插入失败
+ int insert(const char* s){
+ if(query(s)!=-1){
+ //cout<<"The item has been inserted before."<maxRelocateNum);
+ //cout<maxRelocateNum);
+ //cout<maxRelocateNum);
+ //cout<hashFuncNum;i++){
+ if(i==0){
+ h=h1;
+ }
+ else{
+ h+=h2;
+ }
+ const char* p=this->hashTable[h%this->size];
+ if(p!=NULL && strcmp(s,p)==0){
+ //cout<<"Yes"<size;
+ }
+ }
+ for(auto iter=auxList.begin();iter!=auxList.end();iter++){
+ if(strcmp(s,*iter)==0){
+ return this->size;
+ }
+ }
+ //cout<<"No"<size;i++){
+ hashTable[i]=NULL;
+ }
+ memset(this->cnt,0,sizeof(this->cnt));
+ auxList.clear();
+ totalRelocateNum=0;
+ }
+
+ unsigned getTotalRelocateNum(){
+ return this->totalRelocateNum;
+ }
+
+ unsigned getListLength(){
+ return this->auxList.size();
+ }
+
+ void printConfig(){
+ printf("{ size=%d hashFuncNum=%d maxRelocateNum=%d load factor=%.2f }\n",this->size,this->hashFuncNum,this->maxRelocateNum,this->maxLoadFactor);
+ }
+
+ unsigned getSize(){
+ return size;
+ }
+
+ double getMaxLoadFactor(){
+ return maxLoadFactor;
+ }
+
+};
+
+//正确性测试
+void crtTest(CuckooHash& t,int modelTested, vector& insertTestSet,vector& queryTestSet){
+ char filePath[13]={0};
+ sprintf(filePath,"output_%d.txt",modelTested);
+ FILE* fp=freopen(filePath,"w+",stdout);
+ //cout<=0 && rnt& insertTestSet){
+ t.printConfig();
+ time_t b=clock();
+ switch (modelTested)
+ {
+ case 0:
+ cout<<"Random selection strategy."< insertTestSet, queryTestSet;
+ int randNum=rand();
+ char op;
+ string s;
+ int rnt;
+ for(int i=0;i