Skip to content

Commit

Permalink
Merge pull request #1135 from FactomProject/lower_parallelism
Browse files Browse the repository at this point in the history
Lower parallelism
  • Loading branch information
ilzheev authored Feb 21, 2022
2 parents 98c6bfa + 42e5348 commit aa38f61
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 998 deletions.
22 changes: 11 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
build:
working_directory: /go/src/github.com/FactomProject/factomd
docker:
- image: circleci/golang:1.14
- image: circleci/golang:1.17.2

steps:
- checkout
Expand Down Expand Up @@ -33,9 +33,9 @@ jobs:
test:
working_directory: /tmp
docker:
- image: circleci/golang:1.14
- image: circleci/golang:1.17.2

parallelism: 5
parallelism: 1

steps:
- attach_workspace:
Expand All @@ -53,9 +53,9 @@ jobs:
test_full:
working_directory: /tmp
docker:
- image: circleci/golang:1.14
- image: circleci/golang:1.17.2

parallelism: 5
parallelism: 1

steps:
- attach_workspace:
Expand All @@ -73,7 +73,7 @@ jobs:
coveralls:
working_directory: /tmp
docker:
- image: circleci/golang:1.14
- image: circleci/golang:1.17.2

steps:
- attach_workspace:
Expand All @@ -86,13 +86,13 @@ jobs:
export PATH="/tmp/go/bin:$PATH"
export GOPATH=/tmp/go
cd /tmp/go/src/github.com/FactomProject/factomd/
go test $(go list ./... | grep -v 'Utilities|longTest|peerTest|simTest') -vet=off -v -cover -coverprofile=coverage.out
go test $( go list ./... | grep -v 'Utilities|longTest|peerTest|simTest') -vet=off -v -cover -coverprofile=coverage.out
goveralls -coverprofile=coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN
gofmt:
working_directory: /tmp
docker:
- image: circleci/golang:1.14
- image: circleci/golang:1.17.2

steps:
- attach_workspace:
Expand All @@ -119,7 +119,7 @@ jobs:
- checkout

- setup_remote_docker:
version: 18.03.1-ce
version: 20.10.7

- restore_cache:
keys:
Expand Down Expand Up @@ -324,7 +324,7 @@ jobs:

govet:
docker:
- image: circleci/golang:1.14
- image: circleci/golang:1.17.2

steps:
- checkout
Expand Down Expand Up @@ -402,4 +402,4 @@ workflows:
- docker_build:
context: org-global
requires:
- test_full
- test_full
10 changes: 6 additions & 4 deletions Utilities/DatabaseGenerator/blockgen/entrygencore.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ func (r *EntryGenCore) NewEblock(height uint32, time interfaces.Timestamp) (*ent
func (r *EntryGenCore) NewChainHead() *entryBlock.Entry {
head := r.Parent.NewEntry(primitives.NewZeroHash())
// First one needs an extid
head.ExtIDs = []primitives.ByteSlice{primitives.ByteSlice{random.RandByteSliceOfLen(10)},
primitives.ByteSlice{random.RandByteSliceOfLen(10)},
primitives.ByteSlice{random.RandByteSliceOfLen(10)}}
var a, b, c primitives.ByteSlice
a.Bytes = random.RandByteSliceOfLen(10)
b.Bytes = random.RandByteSliceOfLen(10)
c.Bytes = random.RandByteSliceOfLen(10)
head.ExtIDs = []primitives.ByteSlice{a, b, c}
head.ChainID = entryBlock.ExternalIDsToChainID(head.ExternalIDs())
return head
}
Expand All @@ -164,7 +166,7 @@ func (r *EntryGenCore) NewEntry(chain interfaces.IHash) *entryBlock.Entry {
bytes := rand.Intn(conf.EntrySize.Amount())

ent := entryBlock.NewEntry()
ent.Content = primitives.ByteSlice{random.RandByteSliceOfLen(bytes)}
ent.Content = primitives.ByteSlice{Bytes: random.RandByteSliceOfLen(bytes)}
ent.ChainID = chain
return ent
}
Expand Down
1 change: 0 additions & 1 deletion Utilities/DatabaseGenerator/blockgen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ func (g *DBGenerator) loadGenesis() {
customIdentity, err = primitives.HexToHash(g.FactomdState.CustomBootstrapIdentity)
if err != nil {
panic(fmt.Sprintf("Could not decode Custom Bootstrap Identity (likely in config file) found: %s\n", g.FactomdState.CustomBootstrapIdentity))
panic(err)
}
}
dblk, ablk, fblk, ecblk := state.GenerateGenesisBlocks(g.FactomdState.GetNetworkID(), customIdentity)
Expand Down
2 changes: 1 addition & 1 deletion Utilities/DatabaseGenerator/blockgen/incremententrygen.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (r *IncrementEntryGenerator) NewChainHead() *entryBlock.Entry {
func (r *IncrementEntryGenerator) NewEntry(chain interfaces.IHash) *entryBlock.Entry {
ent := entryBlock.NewEntry()
// Putting the ASCII number so you can read in explorer
ent.Content = primitives.ByteSlice{[]byte(fmt.Sprintf("%d", r.currentCount))}
ent.Content = primitives.ByteSlice{Bytes: []byte(fmt.Sprintf("%d", r.currentCount))}
ent.ChainID = chain
r.currentCount++

Expand Down
10 changes: 5 additions & 5 deletions Utilities/DatabaseGenerator/blockgen/recordentrygen.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ func (r *RecordEntryGenerator) NewEntry(chain interfaces.IHash) *entryBlock.Entr
ent := entryBlock.NewEntry()
// Putting the ASCII number so you can read in explorer
ent.ExtIDs = []primitives.ByteSlice{
primitives.ByteSlice{primitives.RandomHash().Bytes()},
primitives.ByteSlice{primitives.RandomHash().Bytes()},
primitives.ByteSlice{primitives.RandomHash().Bytes()},
primitives.ByteSlice{primitives.RandomHash().Bytes()},
primitives.ByteSlice{primitives.RandomHash().Bytes()},
{Bytes: primitives.RandomHash().Bytes()},
{Bytes: primitives.RandomHash().Bytes()},
{Bytes: primitives.RandomHash().Bytes()},
{Bytes: primitives.RandomHash().Bytes()},
{Bytes: primitives.RandomHash().Bytes()},
}

ent.ChainID = chain
Expand Down
Loading

0 comments on commit aa38f61

Please sign in to comment.