1. Stefan Saasen
  2. stash-log-parser

Commits

Stefan Saasen  committed 742c4b0

Move bang pattern into the data type definition

  • Participants
  • Parent commits c788339
  • Branches master

Comments (0)

Files changed (1)

File logparser/src/Stash/Log/GitOpsAnalyser.hs

View file
 import Stash.Log.Common (logDateEqHour, isSsh, isHttp)
 
 data GitOperationStats = GitOperationStats {
-     getOpStatDate              :: String
-    ,cacheMisses                :: [Int] -- clone, fetch, shallow clone, push, ref advertisement
-    ,cacheHits                  :: [Int]
+     getOpStatDate              :: !String
+    ,cacheMisses                :: ![Int] -- clone, fetch, shallow clone, push, ref advertisement
+    ,cacheHits                  :: ![Int]
 }
 
 data RequestDurationStat = RequestDurationStat {
                                     inc op      = if op logLine then (+1) else (+0)
                                     missOps     = map (inc . uncachedOperation) ops
                                     hitOps      = map (inc . cachedOperation) ops
-                                    !date'      = if null date then formatLogDate $ getDate logLine else date
-                                    !misses'    = zipWith id missOps misses
-                                    !hits'      = zipWith id hitOps hits
+                                    date'       = if null date then formatLogDate $ getDate logLine else date
+                                    misses'     = zipWith id missOps misses
+                                    hits'       = zipWith id hitOps hits
                                 in GitOperationStats date' misses' hits'
 
 protocolCount :: Input -> [(S.ByteString,Integer)]