From 8784eb63080b671b76e0ea90d13ff25b59574e16 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Tue, 2 Apr 2019 14:42:21 -0700 Subject: [PATCH 1/2] Move snapshotters benchmark to a separate package Signed-off-by: Maksym Pavlenko --- contrib/aws/snapshotter_bench_readme.md | 2 +- snapshots/{testsuite => benchsuite}/benchmark_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename snapshots/{testsuite => benchsuite}/benchmark_test.go (99%) diff --git a/contrib/aws/snapshotter_bench_readme.md b/contrib/aws/snapshotter_bench_readme.md index 8d1049bde..8c2571ff7 100644 --- a/contrib/aws/snapshotter_bench_readme.md +++ b/contrib/aws/snapshotter_bench_readme.md @@ -47,7 +47,7 @@ make ```bash sudo su - -cd snapshots/testsuite/ +cd snapshots/benchsuite/ go test -bench . \ -dm.thinPoolDev=bench-docker--pool \ -dm.rootPath=/mnt/disk1/data \ diff --git a/snapshots/testsuite/benchmark_test.go b/snapshots/benchsuite/benchmark_test.go similarity index 99% rename from snapshots/testsuite/benchmark_test.go rename to snapshots/benchsuite/benchmark_test.go index d4894a329..b393cb1b3 100644 --- a/snapshots/testsuite/benchmark_test.go +++ b/snapshots/benchsuite/benchmark_test.go @@ -16,7 +16,7 @@ limitations under the License. */ -package testsuite +package benchsuite import ( "context" From 90085a7ac59391d174a64a7dc211ce617aa535d0 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Tue, 2 Apr 2019 17:35:19 -0700 Subject: [PATCH 2/2] Add empty file to prevent build from failing Go build fails on directory with only test files https://github.com/golang/go/issues/8279 Signed-off-by: Maksym Pavlenko --- snapshots/benchsuite/benchmark.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 snapshots/benchsuite/benchmark.go diff --git a/snapshots/benchsuite/benchmark.go b/snapshots/benchsuite/benchmark.go new file mode 100644 index 000000000..be17d5e01 --- /dev/null +++ b/snapshots/benchsuite/benchmark.go @@ -0,0 +1,19 @@ +// +build linux + +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package benchsuite