Changeset 26045
- Timestamp:
- Nov 5, 2009, 11:14:59 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/dist.pro (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/dist.pro
r26015 r26045 78 78 break 79 79 end 80 local host component default template varname length start count component_id 80 local host component default template varname length start count component_id random_number 81 81 $component = $1 82 82 $template = $2 … … 92 92 break 93 93 end 94 # take last two letters of component id 95 # treat it as an integer and use modulous of length of distribution hosts 96 # to compute a host 97 strlen $component length 98 $start = $length - 2 99 substr $component $start 2 index 100 $component_id = $index % $count 94 if ("$component" != "exposure") 95 # take last two letters of component id 96 # treat it as an integer and use modulous of length of distribution hosts 97 # to compute a host 98 strlen $component length 99 $start = $length - 2 100 substr $component $start 2 index 101 $component_id = $index % $count 102 else 103 # randomly chose one of the hosts 104 $random_number = int(100 * rnd(0)) % $count 105 sprintf component_id "%d" $random_number 106 end 101 107 102 108 book getword ipphosts distribution $component_id -var host
Note:
See TracChangeset
for help on using the changeset viewer.
