xref: /onnv-gate/usr/src/cmd/filebench/workloads/removedirs.f (revision 8404:b96b8ad1c3e9)
17946SAndrew.W.Wilson@sun.com#
27946SAndrew.W.Wilson@sun.com# CDDL HEADER START
37946SAndrew.W.Wilson@sun.com#
47946SAndrew.W.Wilson@sun.com# The contents of this file are subject to the terms of the
57946SAndrew.W.Wilson@sun.com# Common Development and Distribution License (the "License").
67946SAndrew.W.Wilson@sun.com# You may not use this file except in compliance with the License.
77946SAndrew.W.Wilson@sun.com#
87946SAndrew.W.Wilson@sun.com# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97946SAndrew.W.Wilson@sun.com# or http://www.opensolaris.org/os/licensing.
107946SAndrew.W.Wilson@sun.com# See the License for the specific language governing permissions
117946SAndrew.W.Wilson@sun.com# and limitations under the License.
127946SAndrew.W.Wilson@sun.com#
137946SAndrew.W.Wilson@sun.com# When distributing Covered Code, include this CDDL HEADER in each
147946SAndrew.W.Wilson@sun.com# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157946SAndrew.W.Wilson@sun.com# If applicable, add the following below this CDDL HEADER, with the
167946SAndrew.W.Wilson@sun.com# fields enclosed by brackets "[]" replaced with your own identifying
177946SAndrew.W.Wilson@sun.com# information: Portions Copyright [yyyy] [name of copyright owner]
187946SAndrew.W.Wilson@sun.com#
197946SAndrew.W.Wilson@sun.com# CDDL HEADER END
207946SAndrew.W.Wilson@sun.com#
217946SAndrew.W.Wilson@sun.com#
227946SAndrew.W.Wilson@sun.com# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
237946SAndrew.W.Wilson@sun.com# Use is subject to license terms.
247946SAndrew.W.Wilson@sun.com#
257946SAndrew.W.Wilson@sun.com# Creates a fileset with $ndirs empty leaf directories then rmdir's all of them
267946SAndrew.W.Wilson@sun.com#
277946SAndrew.W.Wilson@sun.comset $dir=/tmp
287946SAndrew.W.Wilson@sun.comset $ndirs=10000
297946SAndrew.W.Wilson@sun.comset $meandirwidth=100
307946SAndrew.W.Wilson@sun.comset $nthreads=16
317946SAndrew.W.Wilson@sun.com
327946SAndrew.W.Wilson@sun.comset mode quit firstdone
337946SAndrew.W.Wilson@sun.com
347946SAndrew.W.Wilson@sun.comdefine fileset name=bigfileset,path=$dir,size=0,leafdirs=$ndirs,dirwidth=$meandirwidth,prealloc
357946SAndrew.W.Wilson@sun.com
367946SAndrew.W.Wilson@sun.comdefine process name=remdir,instances=1
377946SAndrew.W.Wilson@sun.com{
38*8404SAndrew.W.Wilson@sun.com  thread name=removedirectory,memsize=1m,instances=$nthreads
397946SAndrew.W.Wilson@sun.com  {
407946SAndrew.W.Wilson@sun.com    flowop removedir name=dirremover,filesetname=bigfileset
417946SAndrew.W.Wilson@sun.com  }
427946SAndrew.W.Wilson@sun.com}
437946SAndrew.W.Wilson@sun.com
447946SAndrew.W.Wilson@sun.comecho  "RemoveDir Version 1.0 personality successfully loaded"
457946SAndrew.W.Wilson@sun.comusage "Usage: set \$dir=<dir>          defaults to $dir"
467946SAndrew.W.Wilson@sun.comusage "       set \$meandirwidth=<size> defaults to $meandirwidth"
477946SAndrew.W.Wilson@sun.comusage "       set \$ndirs=<value>      defaults to $ndirs"
487946SAndrew.W.Wilson@sun.comusage "       set \$nthreads=<value>   defaults to $nthreads"
497946SAndrew.W.Wilson@sun.comusage "(sets mean dir width and dir depth is calculated as log (width, ndirs)"
507946SAndrew.W.Wilson@sun.comusage " "
517946SAndrew.W.Wilson@sun.comusage "       run"
52