@@ -149,6 +149,11 @@ func main() {
149149 Usage : "set the runtime to stress test" ,
150150 Value : plugin .RuntimeRuncV2 ,
151151 },
152+ cli.StringFlag {
153+ Name : "snapshotter" ,
154+ Usage : "set the snapshotter to use" ,
155+ Value : "overlayfs" ,
156+ },
152157 }
153158 app .Before = func (context * cli.Context ) error {
154159 if context .GlobalBool ("json" ) {
@@ -171,6 +176,7 @@ func main() {
171176 JSON : context .GlobalBool ("json" ),
172177 Metrics : context .GlobalString ("metrics" ),
173178 Runtime : context .GlobalString ("runtime" ),
179+ Snapshotter : context .GlobalString ("snapshotter" ),
174180 }
175181 if config .Metrics != "" {
176182 return serve (config )
@@ -191,6 +197,7 @@ type config struct {
191197 JSON bool
192198 Metrics string
193199 Runtime string
200+ Snapshotter string
194201}
195202
196203func (c config ) newClient () (* containerd.Client , error ) {
@@ -222,7 +229,7 @@ func test(c config) error {
222229 return err
223230 }
224231 logrus .Infof ("pulling %s" , imageName )
225- image , err := client .Pull (ctx , imageName , containerd .WithPullUnpack )
232+ image , err := client .Pull (ctx , imageName , containerd .WithPullUnpack , containerd . WithPullSnapshotter ( c . Snapshotter ) )
226233 if err != nil {
227234 return err
228235 }
@@ -247,11 +254,12 @@ func test(c config) error {
247254 for i := 0 ; i < c .Concurrency ; i ++ {
248255 wg .Add (1 )
249256 w := & worker {
250- id : i ,
251- wg : & wg ,
252- image : image ,
253- client : client ,
254- commit : v .Revision ,
257+ id : i ,
258+ wg : & wg ,
259+ image : image ,
260+ client : client ,
261+ commit : v .Revision ,
262+ snapshotter : c .Snapshotter ,
255263 }
256264 workers = append (workers , w )
257265 }
@@ -261,11 +269,12 @@ func test(c config) error {
261269 wg .Add (1 )
262270 exec = & execWorker {
263271 worker : worker {
264- id : i ,
265- wg : & wg ,
266- image : image ,
267- client : client ,
268- commit : v .Revision ,
272+ id : i ,
273+ wg : & wg ,
274+ image : image ,
275+ client : client ,
276+ commit : v .Revision ,
277+ snapshotter : c .Snapshotter ,
269278 },
270279 }
271280 go exec .exec (ctx , tctx )
0 commit comments