profile

package
v2.0.0-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProfileNameAuto  = "auto"
	ProfileNameLight = "light"
	ProfileName1GB   = "1gb"
	ProfileName2GB   = "2gb"
	ProfileName4GB   = "4gb"
	ProfileName8GB   = "8gb"
)
View Source
const (
	// AutoProfileName is the name of the automatic profile.
	AutoProfileName = "auto"
)

Variables

View Source
var (
	Profile8GB = &profile.Profile{
		Caches: &profile.Caches{
			Addresses: &profile.CacheOpts{
				CacheTime:                  "10s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Children: &profile.CacheOpts{
				CacheTime:                  "30s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Milestones: &profile.CacheOpts{
				CacheTime:                  "10s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Blocks: &profile.CacheOpts{
				CacheTime:                  "30s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			UnreferencedBlocks: &profile.CacheOpts{
				CacheTime:                  "500ms",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			IncomingBlocksFilter: &profile.CacheOpts{
				CacheTime:                  "5s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
		},
	}

	Profile4GB = &profile.Profile{
		Caches: &profile.Caches{
			Addresses: &profile.CacheOpts{
				CacheTime:                  "5s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Children: &profile.CacheOpts{
				CacheTime:                  "15s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Milestones: &profile.CacheOpts{
				CacheTime:                  "5s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Blocks: &profile.CacheOpts{
				CacheTime:                  "15s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			UnreferencedBlocks: &profile.CacheOpts{
				CacheTime:                  "500ms",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			IncomingBlocksFilter: &profile.CacheOpts{
				CacheTime:                  "5s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
		},
	}

	Profile2GB = &profile.Profile{
		Caches: &profile.Caches{
			Addresses: &profile.CacheOpts{
				CacheTime:                  "200ms",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Children: &profile.CacheOpts{
				CacheTime:                  "5s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Milestones: &profile.CacheOpts{
				CacheTime:                  "2.5s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Blocks: &profile.CacheOpts{
				CacheTime:                  "5s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			UnreferencedBlocks: &profile.CacheOpts{
				CacheTime:                  "100ms",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			IncomingBlocksFilter: &profile.CacheOpts{
				CacheTime:                  "2.5s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
		},
	}

	Profile1GB = &profile.Profile{
		Caches: &profile.Caches{
			Addresses: &profile.CacheOpts{
				CacheTime:                  "100ms",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Children: &profile.CacheOpts{
				CacheTime:                  "1.5s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Milestones: &profile.CacheOpts{
				CacheTime:                  "500ms",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			Blocks: &profile.CacheOpts{
				CacheTime:                  "1.5s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			UnreferencedBlocks: &profile.CacheOpts{
				CacheTime:                  "100ms",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
			IncomingBlocksFilter: &profile.CacheOpts{
				CacheTime:                  "2s",
				ReleaseExecutorWorkerCount: 10,
				LeakDetectionOptions: &profile.LeakDetectionOpts{
					Enabled:               false,
					MaxConsumersPerObject: 20,
					MaxConsumerHoldTime:   "100s",
				},
			},
		},
	}
)
View Source
var (
	CoreComponent *app.CoreComponent
)
View Source
var (
	ErrNotEnoughMemory = errors.New("not enough system memory")
)
View Source
var ParamsNode = &ParametersNode{}

Functions

This section is empty.

Types

type ParametersNode

type ParametersNode struct {
	// Profile is the key to set the profile to use.
	Profile string `default:"auto" usage:"the profile the node runs with" shorthand:"p"`
	// Alias is used to set an alias to identify a node
	Alias string `default:"HORNET node" usage:"set an alias to identify a node"`
}

ParametersNode contains the definition of the parameters used by the node.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL