# Module cloudi_task_size

- Description
- Data Types
- Function Index
- Function Details

### CloudI Task Size Calculation

.

Copyright © 2009-2021 Michael Truog

Version: 2.0.2 Dec 3 2021 23:02:34 ------------------------------------------------------------------------

Authors: Michael Truog (`mjtruog at protonmail dot com`).

## Description

### CloudI Task Size Calculation

## Data Types

### state()

`state() = #cloudi_task_size{task_count = pos_integer(), task_size_initial = integer(), task_size_min = integer(), task_size_max = integer(), target_time = float(), target_time_min = float(), target_time_max = float(), target_time_incr = integer(), target_time_decr = integer(), lookup = #{node() := #node{task_size = number()}}}`

## Function Index

get/2 | #### Get the task size information. .
new/7 | #### Get a new task size lookup. .
put/4 | #### Store task size information. ElapsedTime is in hours.
reduce/3 | #### Reduce the task size after a timeout. .

## Function Details

### get/2

`get(Pid::pid(), State::state()) -> {TaskSize::integer(), Timeout::cloudi_service:timeout_value_milliseconds()}`

#### Get the task size information.

### new/7

`new(TaskCount::pos_integer(), TaskSizeInitial::integer(), TaskSizeMin::integer(), TaskSizeMax::integer(), TargetTimeInitial::float(), TargetTimeMin::float(), TargetTimeMax::float()) -> state()`

#### Get a new task size lookup.

### put/4

`put(Pid::pid(), TaskSize::integer(), ElapsedTime::float(), State::state()) -> state()`

#### Store task size information.

ElapsedTime is in hours.

### reduce/3

`reduce(Pid::pid(), Multiplier::float(), State::state()) -> state()`

#### Reduce the task size after a timeout.

Generated by EDoc