git-annex/Utility
Joey Hess 3c74dcd4e1
attoparsec parser for POSIXTime
(Not yet used anywhere.)

Benchmarking

{-# LANGUAGE OverloadedStrings #-}

import Criterion.Main
import Utility.TimeStamp
import Data.Attoparsec.ByteString

main = defaultMain
	[ bgroup "parse"
		[ bench "new" $ whnf (parseOnly (parserPOSIXTime <* endOfInput)) "1431286201.113452s"
		, bench "old" $ whnf parsePOSIXTime "1431286201.113452s"
		]
	]

benchmarking parse/new
time                 643.6 ns   (640.2 ns .. 646.7 ns)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 645.3 ns   (642.1 ns .. 650.9 ns)
std dev              14.59 ns   (9.194 ns .. 22.07 ns)
variance introduced by outliers: 29% (moderately inflated)

benchmarking parse/old
time                 9.657 μs   (9.600 μs .. 9.732 μs)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 9.703 μs   (9.645 μs .. 9.785 μs)
std dev              231.6 ns   (161.5 ns .. 323.7 ns)
variance introduced by outliers: 25% (moderately inflated)

So old took 9703 ns to parse, and new 643 ns.
2019-01-02 12:48:53 -04:00
..
Directory add streamDirectoryContents 2018-04-26 13:38:36 -04:00
DirWatcher More FreeBSD build fixes. 2018-09-24 11:25:56 -04:00
Env fix windows build 2018-01-04 14:23:11 -04:00
LockFile strict bytestring encoders and decoders 2019-01-01 14:55:15 -04:00
LockPool add DebugLocks build flag 2018-11-19 15:02:43 -04:00
Path finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Process fixed processTranscript hang problem 2018-03-15 16:14:22 -04:00
Scheduled reorg quickcheck to a separate module 2015-11-17 15:49:22 -04:00
Tmp avoid conflicting definitions of Template type 2018-12-30 15:03:31 -04:00
Aeson.hs strict bytestring encoders and decoders 2019-01-01 14:55:15 -04:00
Android.hs avoid unused imports warning on non-linux 2018-08-07 15:06:33 -04:00
Applicative.hs
AuthToken.hs unified AuthToken type between webapp and tor 2016-11-22 14:18:34 -04:00
Base64.hs strict bytestring encoders and decoders 2019-01-01 14:55:15 -04:00
Batch.hs removed the old Android app 2018-10-13 01:41:11 -04:00
Bloom.hs fix bug in back-compat ifdef 2015-09-23 13:09:08 -04:00
CoProcess.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
CopyFile.hs removed the old Android app 2018-10-13 01:41:11 -04:00
Daemon.hs terminateProcessId renamed 2017-10-25 19:46:28 -04:00
Data.hs
DataUnits.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
DBus.hs
DebugLocks.hs add DebugLocks build flag 2018-11-19 15:02:43 -04:00
Directory.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
DirWatcher.hs disable closingTracked on OSX 2017-06-09 14:18:58 -04:00
DiskFree.hs removed the old Android app 2018-10-13 01:41:11 -04:00
Dot.hs
DottedVersion.hs Some optimisations to string splitting code. 2017-01-31 19:06:22 -04:00
Env.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Exception.hs removed the old Android app 2018-10-13 01:41:11 -04:00
FileMode.hs Make test suite work better when the temp directory is on NFS. 2018-12-19 12:44:56 -04:00
FileSize.hs matchexpression: New plumbing command to check if a preferred content expression matches some data. 2016-01-25 16:16:18 -04:00
FileSystemEncoding.hs comments 2019-01-01 22:48:14 -04:00
Format.hs fix failing quickcheck properties 2017-06-17 16:48:00 -04:00
FreeDesktop.hs use System.Directory not Utility.Directory 2016-09-22 11:34:55 -04:00
Glob.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
Gpg.hs Make test suite work better when the temp directory is on NFS. 2018-12-19 12:44:56 -04:00
Hash.hs fix build with cryptonite-0.20 2018-03-15 11:16:00 -04:00
HtmlDetect.hs fix regression in addurl --file caused by youtube-dl support 2017-12-06 13:22:31 -04:00
HttpManagerRestricted.hs improve error message 2018-06-19 14:21:41 -04:00
HumanNumber.hs
HumanTime.hs
InodeCache.hs make Arbitrary POSIXTime include decimal half the time 2018-10-31 16:27:55 -04:00
IPAddress.hs fix license date 2018-06-22 10:25:53 -04:00
libkqueue.c
libkqueue.h
LinuxMkLibs.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
LockFile.hs
LockPool.hs Fix shared lock file FD leak. 2016-03-01 15:31:39 -04:00
LogFile.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Lsof.hs removed the old Android app 2018-10-13 01:41:11 -04:00
MagicWormhole.hs fix p2p --pair 2018-07-04 15:14:03 -04:00
Matcher.hs improve comment 2015-09-15 13:12:21 -04:00
Metered.hs refactor sinkResponseFile and add downloadC 2018-04-06 16:07:08 -04:00
Misc.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Monad.hs
Mounts.hs removed the old Android app 2018-10-13 01:41:11 -04:00
Network.hs
NotificationBroadcaster.hs
OptParse.hs I've been not documenting these import Preludes used to deal with the AMP transition 2015-09-15 11:32:47 -04:00
OSX.hs
Parallel.hs
PartialPrelude.hs moved module and relicensed 2018-10-29 23:13:36 -04:00
Path.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Percentage.hs
PID.hs Revert "Revert "remove dep on Win32-extras"" 2017-11-13 12:55:23 -04:00
Process.hs fix bogus ghc 8.6.3 build warning 2018-12-30 14:43:27 -04:00
QuickCheck.hs make Arbitrary POSIXTime include decimal half the time 2018-10-31 16:27:55 -04:00
Rsync.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
SafeCommand.hs Revert "fix comment" 2018-11-06 17:26:20 -04:00
Scheduled.hs add dropFromEnd 2018-11-23 11:24:05 -04:00
Shell.hs removed the old Android app 2018-10-13 01:41:11 -04:00
SimpleProtocol.hs clean P2P protocol shutdown on EOF 2018-09-13 10:46:37 -04:00
Split.hs add dropFromEnd 2018-11-23 11:24:05 -04:00
SshConfig.hs redundant import 2015-09-22 12:31:54 -04:00
SshHost.hs avoid the dashed ssh hostname class of security holes 2017-08-17 22:11:31 -04:00
Su.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
SystemDirectory.hs Fix build with directory-1.3. 2016-12-20 15:23:59 -04:00
Tense.hs
ThreadLock.hs
ThreadScheduler.hs removed the old Android app 2018-10-13 01:41:11 -04:00
TimeStamp.hs attoparsec parser for POSIXTime 2019-01-02 12:48:53 -04:00
TList.hs
Tmp.hs finally really add back custom-setup stanza 2017-12-31 16:36:39 -04:00
Tor.hs Support all common locations of the torrc file. 2016-12-28 15:12:31 -04:00
Touch.hs remove unused import 2018-10-30 13:38:29 -04:00
Tuple.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
Url.hs add dropFromEnd 2018-11-23 11:24:05 -04:00
UserInfo.hs removed the old Android app 2018-10-13 01:41:11 -04:00
Verifiable.hs
WebApp.hs removed the old Android app 2018-10-13 01:41:11 -04:00
Yesod.hs v7 2018-10-25 18:24:23 -04:00