Skip to content

Commit

Permalink
Revert "Adding faker"
Browse files Browse the repository at this point in the history
This reverts commit fef098a.
  • Loading branch information
aviaIguazio committed Jul 2, 2019
1 parent fef098a commit ce0bca9
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 197 deletions.
2 changes: 1 addition & 1 deletion test/csv_2_tsdb_test.go → httpblaster/csv_2_tsdb_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test
package httpblaster

import (
"testing"
Expand Down
66 changes: 0 additions & 66 deletions httpblaster/data_generator/fakerGenerator.go

This file was deleted.

12 changes: 12 additions & 0 deletions httpblaster/data_generator/memoryGenerator_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package data_generator

import (
"testing"
)

var strArr []string

func Test_igz_tsdb_item_v2_init(t *testing.T) {
gen := MemoryGenerator{}
gen.GenerateRandomData(1)
}
3 changes: 0 additions & 3 deletions httpblaster/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ func (self *Executor) load_request_generator() (chan *request_generators.Request
case request_generators.STATS2TSDB:
req_gen = &request_generators.Stats2TSDB{}
break
case request_generators.FAKER2KV:
req_gen = &request_generators.Faker2kv{}
break

default:
panic(fmt.Sprintf("unknown request generator %s", self.Workload.Generator))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test
package httpblaster
/*
import (
"testing"
Expand Down
5 changes: 0 additions & 5 deletions httpblaster/igz_data/igz_emd_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ func NewEmdItem() *IgzEmdItem {
return i
}

func (self *IgzEmdItem) InitItem() {
self.Key = make(map[string]map[string]interface{})
self.Item = make(map[string]map[string]interface{})
}

type IgzEmdItemUpdate struct {
//TableName string
UpdateMode string
Expand Down
1 change: 0 additions & 1 deletion httpblaster/request_generators/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const (
REPLAY = "replay"
CSV2TSDB = "csv2tsdb"
STATS2TSDB = "stats2tsdb"
FAKER2KV = "faker2kv"
)

type RequestCommon struct {
Expand Down
68 changes: 0 additions & 68 deletions httpblaster/request_generators/faker2kv.go

This file was deleted.

39 changes: 22 additions & 17 deletions test/schema_parser_test.go → httpblaster/schema_parser_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test
package httpblaster

import (
"encoding/csv"
Expand All @@ -9,6 +9,11 @@ import (
"testing"
//"go/parser"
"strings"


"github.com/v3io/v3io-tsdb/pkg/utils"
"encoding/json"
"fmt"
)


Expand Down Expand Up @@ -80,29 +85,29 @@ func Test_tsdb_Schema_Parser(t *testing.T) {
log.Println(j)
line_count++
if line_count%1024 == 0 {
//log.Printf("line: %d from file %s was submitted", line_count)
log.Printf("line: %d from file %s was submitted", line_count, f)
}
}
}



}
//
//func Test_tsdb_to_json(t *testing.T) {
// item := igz_data.IgzTSDBItem{}
// item.Labels = utils.Labels{{Name: "__name__", Value: "name"}}
// item.Time = "1529659800000"
// item.Value = 1
// item2 := igz_data.IgzTSDBItem{}
// item2.Lset = utils.Labels{{Name: "__name__", Value: "name2"}}
// item2.Time = "1529659900000"
// item2.Value = 2
//
// items := []igz_data.IgzTSDBItem{item, item2}
// body, _ := json.Marshal(items)
// fmt.Println(string(body))
//}

func Test_tsdb_to_json(t *testing.T) {
item := igz_data.IgzTSDBItem{}
item.Lset = utils.Labels{{Name: "__name__", Value: "name"}}
item.Time = "1529659800000"
item.Value = 1
item2 := igz_data.IgzTSDBItem{}
item2.Lset = utils.Labels{{Name: "__name__", Value: "name2"}}
item2.Time = "1529659900000"
item2.Value = 2

items := []igz_data.IgzTSDBItem{item, item2}
body, _ := json.Marshal(items)
fmt.Println(string(body))
}



Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test
package httpblaster

import (
"github.com/v3io/http_blaster/httpblaster/igz_data"
Expand Down
21 changes: 0 additions & 21 deletions test/fakerGenerator_test.go

This file was deleted.

13 changes: 0 additions & 13 deletions test/memoryGenerator_test.go

This file was deleted.

0 comments on commit ce0bca9

Please sign in to comment.