From 7c173acc5570a4fed7fc7eb91942c7ecfa5f2aa5 Mon Sep 17 00:00:00 2001 From: "Xin.Zh" Date: Thu, 5 Aug 2021 19:33:40 +0800 Subject: [PATCH] add license header (#7197) --- alert/app/app.go | 15 +++++++ alert/app/expr/expr.go | 15 +++++++ alert/app/expr/expr_test.go | 15 +++++++ alert/app/expr/funcs.go | 15 +++++++ alert/app/expr/funcs_test.go | 15 +++++++ alert/app/route.go | 15 +++++++ alert/app/rule.go | 15 +++++++ alert/app/rule_test.go | 15 +++++++ alert/cmd/alert/main.go | 15 +++++++ alert/models/models.go | 15 +++++++ alert/models/rule.go | 15 +++++++ alert/utils/config.go | 15 +++++++ alert/utils/log/log.go | 15 +++++++ importSampleData/app/main.go | 15 +++++++ importSampleData/import/import_config.go | 15 +++++++ src/connector/odbc/examples/go/odbc.go | 15 +++++++ tests/comparisonTest/influxdb/main.go | 15 +++++++ tests/gotest/case001/case001.go | 1 + tests/script/general/http/bug.go | 35 ++++++++++----- tests/script/general/http/httpTestNew.go | 15 +++++++ tests/script/general/http/httpTest_cloud.go | 23 ++++++++-- tests/script/general/http/httpTest_private.go | 25 ++++++++--- tests/script/general/http/telegrafTest.go | 43 +++++++++++++------ tests/stress/main.go | 15 +++++++ 24 files changed, 379 insertions(+), 33 deletions(-) diff --git a/alert/app/app.go b/alert/app/app.go index 760f93d839..68a6aa4059 100644 --- a/alert/app/app.go +++ b/alert/app/app.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package app import ( diff --git a/alert/app/expr/expr.go b/alert/app/expr/expr.go index 42cb506f0e..dec6ce71a3 100644 --- a/alert/app/expr/expr.go +++ b/alert/app/expr/expr.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package expr import ( diff --git a/alert/app/expr/expr_test.go b/alert/app/expr/expr_test.go index 0228268771..db2d5bf22a 100644 --- a/alert/app/expr/expr_test.go +++ b/alert/app/expr/expr_test.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package expr import "testing" diff --git a/alert/app/expr/funcs.go b/alert/app/expr/funcs.go index 97ed0e1c64..3535e0d014 100644 --- a/alert/app/expr/funcs.go +++ b/alert/app/expr/funcs.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package expr import ( diff --git a/alert/app/expr/funcs_test.go b/alert/app/expr/funcs_test.go index b960888b25..68d4c24703 100644 --- a/alert/app/expr/funcs_test.go +++ b/alert/app/expr/funcs_test.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package expr import ( diff --git a/alert/app/route.go b/alert/app/route.go index 0fec3bab34..467e7b38c4 100644 --- a/alert/app/route.go +++ b/alert/app/route.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package app import ( diff --git a/alert/app/rule.go b/alert/app/rule.go index 236e5bd755..e318edab2a 100644 --- a/alert/app/rule.go +++ b/alert/app/rule.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package app import ( diff --git a/alert/app/rule_test.go b/alert/app/rule_test.go index 0adf100e9c..2b732f7153 100644 --- a/alert/app/rule_test.go +++ b/alert/app/rule_test.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package app import ( diff --git a/alert/cmd/alert/main.go b/alert/cmd/alert/main.go index 1bd185b580..5a5e5c6df6 100644 --- a/alert/cmd/alert/main.go +++ b/alert/cmd/alert/main.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( diff --git a/alert/models/models.go b/alert/models/models.go index 5d6de5572c..57b2737c62 100644 --- a/alert/models/models.go +++ b/alert/models/models.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package models import ( diff --git a/alert/models/rule.go b/alert/models/rule.go index 53d45f45da..759f9aad80 100644 --- a/alert/models/rule.go +++ b/alert/models/rule.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package models import "time" diff --git a/alert/utils/config.go b/alert/utils/config.go index 71b9dd16e1..7ee6306891 100644 --- a/alert/utils/config.go +++ b/alert/utils/config.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package utils import ( diff --git a/alert/utils/log/log.go b/alert/utils/log/log.go index 5f49c213ae..c7e2c56973 100644 --- a/alert/utils/log/log.go +++ b/alert/utils/log/log.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package log import ( diff --git a/importSampleData/app/main.go b/importSampleData/app/main.go index 5fee49734d..e45e33e159 100644 --- a/importSampleData/app/main.go +++ b/importSampleData/app/main.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( diff --git a/importSampleData/import/import_config.go b/importSampleData/import/import_config.go index fdaeeab7da..68587a3519 100644 --- a/importSampleData/import/import_config.go +++ b/importSampleData/import/import_config.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package dataimport import ( diff --git a/src/connector/odbc/examples/go/odbc.go b/src/connector/odbc/examples/go/odbc.go index 4d9c760c4e..4d69d20e9b 100644 --- a/src/connector/odbc/examples/go/odbc.go +++ b/src/connector/odbc/examples/go/odbc.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( diff --git a/tests/comparisonTest/influxdb/main.go b/tests/comparisonTest/influxdb/main.go index 2fb16fad89..043dfbf96d 100644 --- a/tests/comparisonTest/influxdb/main.go +++ b/tests/comparisonTest/influxdb/main.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( diff --git a/tests/gotest/case001/case001.go b/tests/gotest/case001/case001.go index fb94f566dd..9e912aab99 100644 --- a/tests/gotest/case001/case001.go +++ b/tests/gotest/case001/case001.go @@ -12,6 +12,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ + package main import ( diff --git a/tests/script/general/http/bug.go b/tests/script/general/http/bug.go index 61991f4d02..9455a48c56 100644 --- a/tests/script/general/http/bug.go +++ b/tests/script/general/http/bug.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( @@ -184,7 +199,7 @@ func exec(client *http.Client, sql string) { if (request < 103) { return } - + atomic.AddInt64(&period, spend) if request%5000 == 0 && request != 0 { requestAvg := float64(period) / float64(1000000) / float64(request) @@ -204,7 +219,7 @@ func insertTable(conn int) { tbStart := conn*config.TablePerConn + config.TableStart tmStart := config.DataBegin - + for j := 0; j < config.DataNum; j++ { for i := 0; i < config.TablePerConn; i++ { tmVal := int64(j)*int64(config.DataInterval) + tmStart + 1 @@ -214,7 +229,7 @@ func insertTable(conn int) { if config.DataRandom { dataVal = rand.Intn(1000) } - + sql := fmt.Sprintf("import into %s.%s%d values(%d, %d)", config.DbName, config.TablePrefix, tbIndex, tmVal, dataVal) exec(client, sql) time.Sleep(time.Millisecond * time.Duration(10)) @@ -282,7 +297,7 @@ func selectData(wg *sync.WaitGroup, conn int) { client := &http.Client{} - + tbStart := conn*config.TablePerConn + config.TableStart for j := 0; j < config.DataNum; j++ { tbIndex := 0 + tbStart @@ -292,10 +307,10 @@ func selectData(wg *sync.WaitGroup, conn int) { sql += fmt.Sprintf(",'%s%d'", config.TablePrefix, tbIndex) } sql += ") group by orgno" - + //sql := fmt.Sprintf("select count(*) from db.mt") //sql := fmt.Sprintf("select max(i),min(i) from db.mt", config.TablePrefix, tbIndex) - + exec(client, sql) time.Sleep(time.Millisecond * time.Duration(10)) } @@ -303,17 +318,17 @@ func selectData(wg *sync.WaitGroup, conn int) { func main() { filename := flag.String("config", "taos_cloud.json", "config file name") - + flag.Parse() - + readFile(*filename) - + fmt.Println("\n================http test start======================") var wg sync.WaitGroup fmt.Println("\n================select data ========================") - + for i := 0; i < config.ConnNum; i++ { wg.Add(1) diff --git a/tests/script/general/http/httpTestNew.go b/tests/script/general/http/httpTestNew.go index 7947f0a20a..9ca7733d44 100644 --- a/tests/script/general/http/httpTestNew.go +++ b/tests/script/general/http/httpTestNew.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( diff --git a/tests/script/general/http/httpTest_cloud.go b/tests/script/general/http/httpTest_cloud.go index feb3f1450b..1d849a245f 100644 --- a/tests/script/general/http/httpTest_cloud.go +++ b/tests/script/general/http/httpTest_cloud.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( @@ -184,7 +199,7 @@ func exec(client *http.Client, sql string) { if (request < 103) { return } - + atomic.AddInt64(&period, spend) if request%5000 == 0 && request != 0 { requestAvg := float64(period) / float64(1000000) / float64(request) @@ -333,11 +348,11 @@ func selectData(wg *sync.WaitGroup, conn int) { func main() { filename := flag.String("config", "taos_cloud.json", "config file name") - + flag.Parse() - + readFile(*filename) - + fmt.Println("\n================http test start======================") var wg sync.WaitGroup diff --git a/tests/script/general/http/httpTest_private.go b/tests/script/general/http/httpTest_private.go index 907b6c1d62..66f19ec896 100644 --- a/tests/script/general/http/httpTest_private.go +++ b/tests/script/general/http/httpTest_private.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( @@ -184,7 +199,7 @@ func exec(client *http.Client, sql string) { if (request < 103) { return } - + atomic.AddInt64(&period, spend) if request%5000 == 0 && request != 0 { requestAvg := float64(period) / float64(1000000) / float64(request) @@ -256,7 +271,7 @@ func insertTable(conn int) { sql += fmt.Sprintf("(%d, %d)", tmVal, dataVal) } - + exec(client, sql) if config.WaitTime != 0 { time.Sleep(time.Millisecond * time.Duration(config.WaitTime)) @@ -333,11 +348,11 @@ func selectData(wg *sync.WaitGroup, conn int) { func main() { filename := flag.String("config", "taos_cloud.json", "config file name") - + flag.Parse() - + readFile(*filename) - + fmt.Println("\n================http test start======================") var wg sync.WaitGroup diff --git a/tests/script/general/http/telegrafTest.go b/tests/script/general/http/telegrafTest.go index b8cbb43ce8..caa6493c82 100644 --- a/tests/script/general/http/telegrafTest.go +++ b/tests/script/general/http/telegrafTest.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( @@ -68,7 +83,7 @@ func readConf(filename string) { fmt.Println("LoopNum:", config.LoopNum) fmt.Println("dbName:", config.DbName) fmt.Println("dataBegin:", config.DataBegin) - + fmt.Println("================http token=============================") token, err = getToken() url = fmt.Sprintf("http://%s:%d/telegraf/%s", config.HostIp, 6020, config.DbName) @@ -90,9 +105,9 @@ func readReq(filename string) { defer file.Close() data, _ := ioutil.ReadAll(file) - + template = string(data[:]) - + //fmt.Println(template) } @@ -154,13 +169,13 @@ func exec(client *http.Client, sql string) { var jsonResult JsonResult err = json.Unmarshal(data, &jsonResult) if err != nil { - fmt.Println("parse json error: ", string(data[:])) + fmt.Println("parse json error: ", string(data[:])) resp.Body.Close() continue } - - atomic.AddInt64(&request, 1) + + atomic.AddInt64(&request, 1) atomic.AddInt64(&period, spend) if request%1000 == 0 && request != 0 { @@ -179,16 +194,16 @@ func exec(client *http.Client, sql string) { func writeData(wg *sync.WaitGroup, tbIndex int) { defer wg.Done() client := &http.Client{} - + tbName := fmt.Sprintf("t%d", tbIndex) - + for j := 0; j < config.LoopNum; j++ { tmVal := fmt.Sprintf("%d", int64(j)*int64(10000) + config.DataBegin) //fmt.Println(tmVal) req1 := strings.Replace(template, "panshi-gsl", tbName, -1) req2 := strings.Replace(req1, "1536750390000", tmVal, -1) - + //fmt.Println(req2) exec(client, req2) } @@ -196,17 +211,17 @@ func writeData(wg *sync.WaitGroup, tbIndex int) { func main() { filename := flag.String("config", "telegraf.json", "config file name") - + flag.Parse() - + readReq("telegraf.req") - + readConf(*filename) - + fmt.Println("\n================telegraf test start======================") var wg sync.WaitGroup - + for i := 0; i < config.MachineNum; i++ { wg.Add(1) go writeData(&wg, i) diff --git a/tests/stress/main.go b/tests/stress/main.go index c3b9290a37..3056ee97f6 100644 --- a/tests/stress/main.go +++ b/tests/stress/main.go @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package main import ( -- GitLab