Skip to content

Commit

Permalink
Merge pull request #238 from vegaprotocol/237-oracles-to-data-sources
Browse files Browse the repository at this point in the history
Oracles to Data Sources update
  • Loading branch information
peterbarrow authored Oct 28, 2022
2 parents c32231f + 5ad2e3d commit ddd37cd
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 105 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
- [230](https://github.com/vegaprotocol/vegatools/issue/230) - Update datanode api use to v2
- [232](https://github.com/vegaprotocol/vegatools/issue/232) - Add batched orders to perftest
- [234](https://github.com/vegaprotocol/vegatools/issue/234) - Add pegged order support to perftest
- [237](https://github.com/vegaprotocol/vegatools/issue/237) - Rename of Oracles to Data Sources

### 🐛 Fixes
- [78](https://github.com/vegaprotocol/vegatools/pull/78) - Fix build with missing dependency
Expand Down
1 change: 1 addition & 0 deletions cmd/eventrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func init() {
eventRateCmd.Flags().IntVarP(&eventRateOpts.Buckets, "buckets", "b", 10, "number of historic buckets")
eventRateCmd.Flags().IntVarP(&eventRateOpts.SecondsPerBucket, "secondsperbucket", "s", 1, "number of seconds to record each bucket")
eventRateCmd.Flags().IntVarP(&eventRateOpts.EventCountDump, "eventcountdump", "e", 0, "dump total event count every x seconds")
eventRateCmd.Flags().BoolVarP(&eventRateOpts.ReportStyle, "reportstyle", "r", false, "print output on a new line")
eventRateCmd.MarkFlagRequired("address")
}

Expand Down
5 changes: 5 additions & 0 deletions eventrate/eventrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Opts struct {
Buckets int
SecondsPerBucket int
EventCountDump int
ReportStyle bool
}

func min(a, b uint64) uint64 {
Expand Down Expand Up @@ -128,6 +129,10 @@ func Run(opts Opts) error {
historicData[0].Events, fixUnits(historicData[0].Bytes),
minEvents, fixUnits(minBytes), maxEvents, fixUnits(maxBytes), avgEvents, fixUnits(avgBytes))

if opts.ReportStyle {
fmt.Println()
}

if opts.EventCountDump > 0 {
displayCounter++
if displayCounter >= opts.EventCountDump {
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module code.vegaprotocol.io/vegatools
go 1.19

require (
code.vegaprotocol.io/shared v0.0.0-20220704150014-7c22d12ccb72
code.vegaprotocol.io/vega v0.58.1-0.20221018160916-e5debe36ecb1
code.vegaprotocol.io/shared v0.0.0-20221010085458-55c50711135f
code.vegaprotocol.io/vega v0.60.1-0.20221028083753-0937da9816e1
github.com/cosmos/iavl v0.19.1
github.com/ethereum/go-ethereum v1.10.21
github.com/gdamore/tcell/v2 v2.5.2
Expand All @@ -16,7 +16,7 @@ require (
github.com/tendermint/tm-db v0.6.7
go.nanomsg.org/mangos/v3 v3.4.2
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
google.golang.org/grpc v1.48.0
google.golang.org/grpc v1.50.0
google.golang.org/protobuf v1.28.1
)

Expand All @@ -42,7 +42,7 @@ require (
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.9.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
Expand All @@ -52,12 +52,12 @@ require (
github.com/rjeczalik/notify v0.9.1 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tendermint/tendermint v0.34.21 // indirect
github.com/tendermint/tendermint v0.34.22 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.4.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
golang.org/x/sys v0.0.0-20220727055044-e65921a090b8 // indirect
golang.org/x/net v0.0.0-20220812174116-3211cb980234 // indirect
golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 // indirect
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b // indirect
Expand Down
Loading

0 comments on commit ddd37cd

Please sign in to comment.