aboutsummaryrefslogtreecommitdiff
path: root/Utility/Metered.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-08-01 15:09:49 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-08-01 15:10:01 -0400
commit17e04a5593eb41462fa7fb1a8f34af527d249ab7 (patch)
treedbe97d8a947adc540b76a2cb776b41c57b3f5710 /Utility/Metered.hs
parent683cfeacaaaea86a8b34f06c30e9ab21c50f86eb (diff)
testremote: New command to test uploads/downloads to a remote.
This only performs some basic tests so far; no testing of chunking or resuming. Also, the existing encryption type of the remote is used; it would be good later to derive an encrypted and a non-encrypted version of the remote and test them both. This commit was sponsored by Joseph Liu.
Diffstat (limited to 'Utility/Metered.hs')
-rw-r--r--Utility/Metered.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Utility/Metered.hs b/Utility/Metered.hs
index cc07f9c35..4618aecfe 100644
--- a/Utility/Metered.hs
+++ b/Utility/Metered.hs
@@ -24,6 +24,9 @@ import Data.Int
- far, *not* an incremental amount since the last call. -}
type MeterUpdate = (BytesProcessed -> IO ())
+nullMeterUpdate :: MeterUpdate
+nullMeterUpdate _ = return ()
+
{- Total number of bytes processed so far. -}
newtype BytesProcessed = BytesProcessed Integer
deriving (Eq, Ord, Show)