Sys level rps
This commit is contained in:
@@ -18,6 +18,7 @@ type Config struct {
|
||||
AuthLifetime time.Duration
|
||||
MaxFileSize int64
|
||||
RPS int
|
||||
SysRPS int
|
||||
}
|
||||
|
||||
func New() Config {
|
||||
@@ -39,6 +40,7 @@ func New() Config {
|
||||
as.Append(args.DURATION, "authlifetime", "duration auth is valid for", time.Hour)
|
||||
as.Append(args.INT, "max-file-size", "max file size for uploads in bytes", 50*(1<<20))
|
||||
as.Append(args.INT, "rps", "rps per namespace", 5)
|
||||
as.Append(args.INT, "sys-rps", "rps for the sys", 10)
|
||||
|
||||
if err := as.Parse(); err != nil {
|
||||
os.Remove(f.Name())
|
||||
@@ -56,5 +58,6 @@ func New() Config {
|
||||
AuthLifetime: as.GetDuration("authlifetime"),
|
||||
MaxFileSize: int64(as.GetInt("max-file-size")),
|
||||
RPS: as.GetInt("rps"),
|
||||
SysRPS: as.GetInt("sys-rps"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user