cleanup: make blob sizes easier to understand
This is a followup to https://github.com/distribution/distribution/pull/4139 Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
parent
ecb475a232
commit
7430651536
4 changed files with 4 additions and 4 deletions
|
@ -24,7 +24,7 @@ import (
|
||||||
const (
|
const (
|
||||||
defaultArch = "amd64"
|
defaultArch = "amd64"
|
||||||
defaultOS = "linux"
|
defaultOS = "linux"
|
||||||
maxManifestBodySize = 4 << 20
|
maxManifestBodySize = 4 * 1024 * 1024
|
||||||
imageClass = "image"
|
imageClass = "image"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -320,7 +320,7 @@ func TestProxyStoreServeMany(t *testing.T) {
|
||||||
func TestProxyStoreServeBig(t *testing.T) {
|
func TestProxyStoreServeBig(t *testing.T) {
|
||||||
te := makeTestEnv(t, "foo/bar")
|
te := makeTestEnv(t, "foo/bar")
|
||||||
|
|
||||||
blobSize := 2 << 20
|
blobSize := 2 * 1024 * 1024
|
||||||
blobCount := 4
|
blobCount := 4
|
||||||
numUnique := 2
|
numUnique := 2
|
||||||
populate(t, te, blobCount, blobSize, numUnique)
|
populate(t, te, blobCount, blobSize, numUnique)
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
// set this correctly, so we may want to leave it to the driver. For
|
// set this correctly, so we may want to leave it to the driver. For
|
||||||
// out of process drivers, we'll have to optimize this buffer size for
|
// out of process drivers, we'll have to optimize this buffer size for
|
||||||
// local communication.
|
// local communication.
|
||||||
const fileReaderBufferSize = 4 << 20
|
const fileReaderBufferSize = 4 * 1024 * 1024
|
||||||
|
|
||||||
// remoteFileReader provides a read seeker interface to files stored in
|
// remoteFileReader provides a read seeker interface to files stored in
|
||||||
// storagedriver. Used to implement part of layer interface and will be used
|
// storagedriver. Used to implement part of layer interface and will be used
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
maxBlobGetSize = 4 << 20
|
maxBlobGetSize = 4 * 1024 * 1024
|
||||||
)
|
)
|
||||||
|
|
||||||
func getContent(ctx context.Context, driver driver.StorageDriver, p string) ([]byte, error) {
|
func getContent(ctx context.Context, driver driver.StorageDriver, p string) ([]byte, error) {
|
||||||
|
|
Loading…
Reference in a new issue