2{-# LANGUAGE ConstraintKinds #-}
3{-# LANGUAGE FlexibleContexts #-}
4{-# LANGUAGE FlexibleInstances #-}
5{-# LANGUAGE GeneralizedNewtypeDeriving#-}
6{-# LANGUAGE InstanceSigs #-}
7{-# LANGUAGE LambdaCase #-}
8{-# LANGUAGE MultiParamTypeClasses #-}
9{-# LANGUAGE StandaloneDeriving #-}
10{-# LANGUAGE UndecidableInstances #-} -- XXX
12#ifdef DIAGNOSTICS_VERBOSE
17-- Module : Streamly.Streams.Async
18-- Copyright : (c) 2017 Harendra Kumar
21-- Maintainer : harendra.kumar@gmail.com
22-- Stability : experimental
26module Streamly.Streams.Async
43import Control.Monad (ap)
44import Control.Monad.Base (MonadBase(..), liftBaseDefault)
45import Control.Monad.Catch (MonadThrow, throwM)
46import Control.Concurrent.MVar (newEmptyMVar)
47-- import Control.Monad.Error.Class (MonadError(..))
48import Control.Monad.IO.Class (MonadIO(..))
49import Control.Monad.Reader.Class (MonadReader(..))
50import Control.Monad.State.Class (MonadState(..))
51import Control.Monad.Trans.Class (MonadTrans(lift))
52import Data.Concurrent.Queue.MichaelScott (LinkedQueue, newQ, nullQ, tryPopR)
53import Data.IORef (IORef, newIORef, readIORef)
54import Data.Maybe (fromJust)
55import Data.Semigroup (Semigroup(..))
57import Prelude hiding (map)
58import qualified Data.Set as S
60import Streamly.Streams.SVar (fromSVar)
61import Streamly.Streams.Serial (map)
63import Streamly.Streams.StreamK (IsStream(..), Stream(..), adapt)
64import qualified Streamly.Streams.StreamK as K
66#include "Instances.hs"
68-------------------------------------------------------------------------------
70-------------------------------------------------------------------------------
72{-# INLINE workLoopLIFO #-}
80workLoopLIFO q st sv winfo = run
87 Nothing -> liftIO $ sendStop sv winfo
88 Just m -> unStream m st run single yieldk
91 res <- liftIO $ sendYield sv winfo (ChildYield a)
92 if res then run else liftIO $ sendStop sv winfo
95 res <- liftIO $ sendYield sv winfo (ChildYield a)
97 then unStream r st run single yieldk
102 dequeue = liftIO $ atomicModifyIORefCAS q $ \case
104 x : xs -> (xs, Just x)
106-- We duplicate workLoop for yield limit and no limit cases because it has
107-- around 40% performance overhead in the worst case.
109-- XXX we can pass yinfo directly as an argument here so that we do not have to
110-- make a check every time.
111{-# INLINE workLoopLIFOLimited #-}
114 => IORef [Stream m a]
119workLoopLIFOLimited q st sv winfo = run
126 Nothing -> liftIO $ sendStop sv winfo
128 -- XXX This is just a best effort minimization of concurrency
129 -- to the yield limit. If the stream is made of concurrent
130 -- streams we do not reserve the yield limit in the constituent
131 -- streams before executing the action. This can be done
132 -- though, by sharing the yield limit ref with downstream
133 -- actions via state passing. Just a todo.
134 yieldLimitOk <- liftIO $ decrementYieldLimit sv
137 -- XXX increment is not safe when the yield limit was already 0
138 -- and therefore was not decremented. We need yield limit to be
139 -- int and negative if we want this to work.
140 let stop = liftIO (incrementYieldLimit sv) >> run
141 unStream m st stop single yieldk
142 -- Avoid any side effects, undo the yield limit decrement if we
143 -- never yielded anything.
145 incrementYieldLimit sv
149 res <- liftIO $ sendYield sv winfo (ChildYield a)
150 if res then run else liftIO $ sendStop sv winfo
152 -- XXX can we pass on the yield limit downstream to limit the concurrency
153 -- of constituent streams.
155 res <- liftIO $ sendYield sv winfo (ChildYield a)
156 yieldLimitOk <- liftIO $ decrementYieldLimit sv
157 let stop = liftIO (incrementYieldLimit sv) >> run
158 if res && yieldLimitOk
159 then unStream r st stop single yieldk
161 incrementYieldLimit sv
165 dequeue = liftIO $ atomicModifyIORefCAS q $ \case
167 x : xs -> (xs, Just x)
169-------------------------------------------------------------------------------
171-------------------------------------------------------------------------------
173{-# INLINE workLoopFIFO #-}
176 => LinkedQueue (Stream m a)
181workLoopFIFO q st sv winfo = run
186 work <- liftIO $ tryPopR q
188 Nothing -> liftIO $ sendStop sv winfo
189 Just m -> unStream m st run single yieldk
192 res <- liftIO $ sendYield sv winfo (ChildYield a)
193 if res then run else liftIO $ sendStop sv winfo
196 res <- liftIO $ sendYield sv winfo (ChildYield a)
198 then unStream r st run single yieldk
203{-# INLINE workLoopFIFOLimited #-}
206 => LinkedQueue (Stream m a)
211workLoopFIFOLimited q st sv winfo = run
216 work <- liftIO $ tryPopR q
218 Nothing -> liftIO $ sendStop sv winfo
220 yieldLimitOk <- liftIO $ decrementYieldLimit sv
223 let stop = liftIO (incrementYieldLimit sv) >> run
224 unStream m st stop single yieldk
226 incrementYieldLimit sv
230 res <- liftIO $ sendYield sv winfo (ChildYield a)
231 if res then run else liftIO $ sendStop sv winfo
234 res <- liftIO $ sendYield sv winfo (ChildYield a)
235 yieldLimitOk <- liftIO $ decrementYieldLimit sv
236 let stop = liftIO (incrementYieldLimit sv) >> run
237 if res && yieldLimitOk
238 then unStream r st stop single yieldk
240 incrementYieldLimit sv
244-------------------------------------------------------------------------------
246-- This code belongs in SVar.hs but is kept here for perf reasons
247-------------------------------------------------------------------------------
249-- XXX we have this function in this file because passing runStreamLIFO as a
250-- function argument to this function results in a perf degradation of more
251-- than 10%. Need to investigate what the root cause is.
252-- Interestingly, the same thing does not make any difference for Ahead.
253getLifoSVar :: MonadAsync m => State Stream m a -> IO (SVar Stream m a)
255 outQ <- newIORef ([], 0)
256 outQMv <- newEmptyMVar
258 wfw <- newIORef False
259 running <- newIORef S.empty
261 yl <- case getYieldLimit st of
262 Nothing -> return Nothing
263 Just x -> Just <$> newIORef x
264 rateInfo <- getYieldRateInfo st
271 avgLat <- newIORef (0, NanoSecs 0)
272 maxLat <- newIORef (NanoSecs 0)
273 minLat <- newIORef (NanoSecs 0)
274 stpTime <- newIORef Nothing
276 let isWorkFinished _ = null <$> readIORef q
278 let isWorkFinishedLimited sv = do
280 case remainingYields sv of
284 Nothing -> return False
285 qEmpty <- null <$> readIORef q
286 return $ qEmpty || yieldsDone
288 let getSVar sv readOutput postProc workDone wloop = SVar
290 , remainingYields = yl
291 , maxBufferLimit = getMaxBuffer st
292 , maxWorkerLimit = getMaxThreads st
293 , yieldRateInfo = rateInfo
294 , outputDoorBell = outQMv
295 , readOutputQ = readOutput sv
296 , postProcess = postProc sv
297 , workerThreads = running
298 , workLoop = wloop q st{streamVar = Just sv} sv
299 , enqueue = enqueueLIFO sv q
300 , isWorkDone = workDone sv
302 , svarStyle = AsyncVar
303 , workerCount = active
304 , accountThread = delThread sv
305 , workerStopMVar = undefined
308 , aheadWorkQueue = undefined
309 , outputHeap = undefined
311 , svarStats = SVarStats
312 { totalDispatches = disp
313 , maxWorkers = maxWrk
314 , maxOutQSize = maxOq
315 , maxHeapSize = maxHs
316 , maxWorkQSize = maxWq
317 , avgWorkerLatency = avgLat
318 , minWorkerLatency = minLat
319 , maxWorkerLatency = maxLat
320 , svarStopTime = stpTime
325 case getMaxStreamRate st of
327 case getYieldLimit st of
328 Nothing -> getSVar sv readOutputQBounded
332 Just _ -> getSVar sv readOutputQBounded
334 isWorkFinishedLimited
337 case getYieldLimit st of
338 Nothing -> getSVar sv readOutputQPaced
342 Just _ -> getSVar sv readOutputQPaced
344 isWorkFinishedLimited
348getFifoSVar :: MonadAsync m => State Stream m a -> IO (SVar Stream m a)
350 outQ <- newIORef ([], 0)
351 outQMv <- newEmptyMVar
353 wfw <- newIORef False
354 running <- newIORef S.empty
356 yl <- case getYieldLimit st of
357 Nothing -> return Nothing
358 Just x -> Just <$> newIORef x
359 rateInfo <- getYieldRateInfo st
366 avgLat <- newIORef (0, NanoSecs 0)
367 maxLat <- newIORef (NanoSecs 0)
368 minLat <- newIORef (NanoSecs 0)
369 stpTime <- newIORef Nothing
371 let isWorkFinished _ = nullQ q
372 let isWorkFinishedLimited sv = do
374 case remainingYields sv of
378 Nothing -> return False
380 return $ qEmpty || yieldsDone
382 let getSVar sv readOutput postProc workDone wloop = SVar
384 , remainingYields = yl
385 , maxBufferLimit = getMaxBuffer st
386 , maxWorkerLimit = getMaxThreads st
387 , yieldRateInfo = rateInfo
388 , outputDoorBell = outQMv
389 , readOutputQ = readOutput sv
390 , postProcess = postProc sv
391 , workerThreads = running
392 , workLoop = wloop q st{streamVar = Just sv} sv
393 , enqueue = enqueueFIFO sv q
394 , isWorkDone = workDone sv
396 , svarStyle = WAsyncVar
397 , workerCount = active
398 , accountThread = delThread sv
399 , workerStopMVar = undefined
402 , aheadWorkQueue = undefined
403 , outputHeap = undefined
405 , svarStats = SVarStats
406 { totalDispatches = disp
407 , maxWorkers = maxWrk
408 , maxOutQSize = maxOq
409 , maxHeapSize = maxHs
410 , maxWorkQSize = maxWq
411 , avgWorkerLatency = avgLat
412 , minWorkerLatency = minLat
413 , maxWorkerLatency = maxLat
414 , svarStopTime = stpTime
419 case getMaxStreamRate st of
421 case getYieldLimit st of
422 Nothing -> getSVar sv readOutputQBounded
426 Just _ -> getSVar sv readOutputQBounded
428 isWorkFinishedLimited
431 case getYieldLimit st of
432 Nothing -> getSVar sv readOutputQPaced
436 Just _ -> getSVar sv readOutputQPaced
438 isWorkFinishedLimited
442{-# INLINABLE newAsyncVar #-}
443newAsyncVar :: MonadAsync m
444 => State Stream m a -> Stream m a -> m (SVar Stream m a)
446 sv <- liftIO $ getLifoSVar st
449-- XXX Get rid of this?
450-- | Make a stream asynchronous, triggers the computation and returns a stream
451-- in the underlying monad representing the output generated by the original
452-- computation. The returned action is exhaustible and must be drained once. If
453-- not drained fully we may have a thread blocked forever and once exhausted it
454-- will always return 'empty'.
457{-# INLINABLE mkAsync #-}
458mkAsync :: (IsStream t, MonadAsync m) => t m a -> m (t m a)
459mkAsync m = newAsyncVar defState (toStream m) >>= return . fromSVar
461{-# INLINABLE mkAsync' #-}
462mkAsync' :: (IsStream t, MonadAsync m) => State Stream m a -> t m a -> m (t m a)
463mkAsync' st m = newAsyncVar st (toStream m) >>= return . fromSVar
465-- | Create a new SVar and enqueue one stream computation on it.
466{-# INLINABLE newWAsyncVar #-}
467newWAsyncVar :: MonadAsync m
468 => State Stream m a -> Stream m a -> m (SVar Stream m a)
469newWAsyncVar st m = do
470 sv <- liftIO $ getFifoSVar st
473------------------------------------------------------------------------------
474-- Running streams concurrently
475------------------------------------------------------------------------------
477-- Concurrency rate control.
479-- Our objective is to create more threads on demand if the consumer is running
480-- faster than us. As soon as we encounter a concurrent composition we create a
481-- push pull pair of threads. We use an SVar for communication between the
482-- consumer, pulling from the SVar and the producer who is pushing to the SVar.
483-- The producer creates more threads if the SVar drains and becomes empty, that
484-- is the consumer is running faster.
486-- XXX Note 1: This mechanism can be problematic if the initial production
487-- latency is high, we may end up creating too many threads. So we need some
488-- way to monitor and use the latency as well. Having a limit on the dispatches
489-- (programmer controlled) may also help.
491-- TBD Note 2: We may want to run computations at the lower level of the
492-- composition tree serially even when they are composed using a parallel
493-- combinator. We can use 'serial' in place of 'async' and 'wSerial' in
494-- place of 'wAsync'. If we find that an SVar immediately above a computation
495-- gets drained empty we can switch to parallelizing the computation. For that
496-- we can use a state flag to fork the rest of the computation at any point of
497-- time inside the Monad bind operation if the consumer is running at a faster
500-- TBD Note 3: the binary operation ('parallel') composition allows us to
501-- dispatch a chunkSize of only 1. If we have to dispatch in arbitrary
502-- chunksizes we will need to compose the parallel actions using a data
503-- constructor (A Free container) instead so that we can divide it in chunks of
504-- arbitrary size before dispatching. If the stream is composed of
505-- hierarchically composed grains of different sizes then we can always switch
506-- to a desired granularity depending on the consumer speed.
508-- TBD Note 4: for pure work (when we are not in the IO monad) we can divide it
509-- into just the number of CPUs.
511-- | Join two computations on the currently running 'SVar' queue for concurrent
512-- execution. When we are using parallel composition, an SVar is passed around
513-- as a state variable. We try to schedule a new parallel computation on the
514-- SVar passed to us. The first time, when no SVar exists, a new SVar is
515-- created. Subsequently, 'joinStreamVarAsync' may get called when a computation
516-- already scheduled on the SVar is further evaluated. For example, when (a
517-- `parallel` b) is evaluated it calls a 'joinStreamVarAsync' to put 'a' and 'b' on
518-- the current scheduler queue.
520-- The 'SVarStyle' required by the current composition context is passed as one
521-- of the parameters. If the scheduling and composition style of the new
522-- computation being scheduled is different than the style of the current SVar,
523-- then we create a new SVar and schedule it on that. The newly created SVar
524-- joins as one of the computations on the current SVar queue.
526-- Cases when we need to switch to a new SVar:
528-- * (x `parallel` y) `parallel` (t `parallel` u) -- all of them get scheduled on the same SVar
529-- * (x `parallel` y) `parallel` (t `async` u) -- @t@ and @u@ get scheduled on a new child SVar
530-- because of the scheduling policy change.
531-- * if we 'adapt' a stream of type 'async' to a stream of type
532-- 'Parallel', we create a new SVar at the transitioning bind.
533-- * When the stream is switching from disjunctive composition to conjunctive
534-- composition and vice-versa we create a new SVar to isolate the scheduling
537forkSVarAsync :: MonadAsync m
538 => SVarStyle -> Stream m a -> Stream m a -> Stream m a
539forkSVarAsync style m1 m2 = Stream $ \st stp sng yld -> do
541 AsyncVar -> newAsyncVar st (concurrently m1 m2)
542 WAsyncVar -> newWAsyncVar st (concurrently m1 m2)
543 _ -> error "illegal svar type"
544 unStream (fromSVar sv) (rstState st) stp sng yld
546 concurrently ma mb = Stream $ \st stp sng yld -> do
547 liftIO $ enqueue (fromJust $ streamVar st) mb
548 unStream ma st stp sng yld
550{-# INLINE joinStreamVarAsync #-}
551joinStreamVarAsync :: MonadAsync m
552 => SVarStyle -> Stream m a -> Stream m a -> Stream m a
553joinStreamVarAsync style m1 m2 = Stream $ \st stp sng yld -> do
555 Just sv | svarStyle sv == style ->
556 liftIO (enqueue sv m2) >> unStream m1 st stp sng yld
557 _ -> unStream (forkSVarAsync style m1 m2) st stp sng yld
559------------------------------------------------------------------------------
560-- Semigroup and Monoid style compositions for parallel actions
561------------------------------------------------------------------------------
564asyncS :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
565asyncS = joinStreamVarAsync AsyncVar
567-- | Polymorphic version of the 'Semigroup' operation '<>' of 'AsyncT'.
568-- Merges two streams possibly concurrently, preferring the
569-- elements from the left one when available.
573async :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
574async m1 m2 = fromStream $
575 joinStreamVarAsync AsyncVar (toStream m1) (toStream m2)
580{-# DEPRECATED (<|) "Please use 'async' instead." #-}
582(<|) :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
585-- | XXX we can implement it more efficienty by directly implementing instead
586-- of combining streams using async.
587{-# INLINE consMAsync #-}
588consMAsync :: MonadAsync m => m a -> Stream m a -> Stream m a
589consMAsync m r = K.yieldM m `asyncS` r
591------------------------------------------------------------------------------
593------------------------------------------------------------------------------
595-- | Deep async composition or async composition with depth first traversal. In
596-- a left to right 'Semigroup' composition it tries to yield elements from the
597-- left stream as long as it can, but it can run the right stream in parallel
598-- if it needs to, based on demand. The right stream can be run if the left
599-- stream blocks on IO or cannot produce elements fast enough for the consumer.
602-- main = ('toList' . 'asyncly' $ (fromFoldable [1,2]) \<> (fromFoldable [3,4])) >>= print
608-- Any exceptions generated by a constituent stream are propagated to the
609-- output stream. The output and exceptions from a single stream are guaranteed
610-- to arrive in the same order in the resulting stream as they were generated
611-- in the input stream. However, the relative ordering of elements from
612-- different streams in the resulting stream can vary depending on scheduling
613-- and generation delays.
615-- Similarly, the monad instance of 'AsyncT' /may/ run each iteration
616-- concurrently based on demand. More concurrent iterations are started only
617-- if the previous iterations are not able to produce enough output for the
622-- import qualified "Streamly.Prelude" as S
623-- import Control.Concurrent
625-- main = 'runStream' . 'asyncly' $ do
626-- n <- return 3 \<\> return 2 \<\> return 1
628-- threadDelay (n * 1000000)
629-- myThreadId >>= \\tid -> putStrLn (show tid ++ ": Delay " ++ show n)
632-- ThreadId 40: Delay 1
633-- ThreadId 39: Delay 2
634-- ThreadId 38: Delay 3
637-- All iterations may run in the same thread if they do not block.
639-- Note that async composition with depth first traversal can be used to
640-- combine infinite number of streams as it explores only a bounded number of
644newtype AsyncT m a = AsyncT {getAsyncT :: Stream m a}
645 deriving (MonadTrans)
647-- | A demand driven left biased parallely composing IO stream of elements of
648-- type @a@. See 'AsyncT' documentation for more details.
651type Async a = AsyncT IO a
653-- | Fix the type of a polymorphic stream as 'AsyncT'.
656asyncly :: IsStream t => AsyncT m a -> t m a
659instance IsStream AsyncT where
664 {-# SPECIALIZE consM :: IO a -> AsyncT IO a -> AsyncT IO a #-}
665 consM m r = fromStream $ consMAsync m (toStream r)
668 {-# SPECIALIZE (|:) :: IO a -> AsyncT IO a -> AsyncT IO a #-}
671------------------------------------------------------------------------------
673------------------------------------------------------------------------------
675instance MonadAsync m => Semigroup (AsyncT m a) where
678------------------------------------------------------------------------------
680------------------------------------------------------------------------------
682instance MonadAsync m => Monoid (AsyncT m a) where
686------------------------------------------------------------------------------
688------------------------------------------------------------------------------
690instance MonadAsync m => Monad (AsyncT m) where
692 (AsyncT m) >>= f = AsyncT $ K.bindWith asyncS m (getAsyncT . f)
694------------------------------------------------------------------------------
696------------------------------------------------------------------------------
698MONAD_APPLICATIVE_INSTANCE(AsyncT,MONADPARALLEL)
699MONAD_COMMON_INSTANCES(AsyncT, MONADPARALLEL)
701------------------------------------------------------------------------------
703------------------------------------------------------------------------------
705{-# INLINE wAsyncS #-}
706wAsyncS :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
707wAsyncS = joinStreamVarAsync WAsyncVar
709-- | XXX we can implement it more efficienty by directly implementing instead
710-- of combining streams using wAsync.
711{-# INLINE consMWAsync #-}
712consMWAsync :: MonadAsync m => m a -> Stream m a -> Stream m a
713consMWAsync m r = K.yieldM m `wAsyncS` r
715-- | Polymorphic version of the 'Semigroup' operation '<>' of 'WAsyncT'.
716-- Merges two streams concurrently choosing elements from both fairly.
720wAsync :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
721wAsync m1 m2 = fromStream $ wAsyncS (toStream m1) (toStream m2)
723-- | Wide async composition or async composition with breadth first traversal.
724-- The Semigroup instance of 'WAsyncT' concurrently /traverses/ the composed
725-- streams using a depth first travesal or in a round robin fashion, yielding
726-- elements from both streams alternately.
729-- main = ('toList' . 'wAsyncly' $ (fromFoldable [1,2]) \<> (fromFoldable [3,4])) >>= print
735-- Any exceptions generated by a constituent stream are propagated to the
736-- output stream. The output and exceptions from a single stream are guaranteed
737-- to arrive in the same order in the resulting stream as they were generated
738-- in the input stream. However, the relative ordering of elements from
739-- different streams in the resulting stream can vary depending on scheduling
740-- and generation delays.
742-- Similarly, the 'Monad' instance of 'WAsyncT' runs /all/ iterations fairly
743-- concurrently using a round robin scheduling.
747-- import qualified "Streamly.Prelude" as S
748-- import Control.Concurrent
750-- main = 'runStream' . 'wAsyncly' $ do
751-- n <- return 3 \<\> return 2 \<\> return 1
753-- threadDelay (n * 1000000)
754-- myThreadId >>= \\tid -> putStrLn (show tid ++ ": Delay " ++ show n)
757-- ThreadId 40: Delay 1
758-- ThreadId 39: Delay 2
759-- ThreadId 38: Delay 3
762-- Unlike 'AsyncT' all iterations are guaranteed to run fairly
763-- concurrently, unconditionally.
765-- Note that async composition with breadth first traversal can only combine a
766-- finite number of streams as it needs to retain state for each unfinished
770newtype WAsyncT m a = WAsyncT {getWAsyncT :: Stream m a}
771 deriving (MonadTrans)
773-- | A round robin parallely composing IO stream of elements of type @a@.
774-- See 'WAsyncT' documentation for more details.
777type WAsync a = WAsyncT IO a
779-- | Fix the type of a polymorphic stream as 'WAsyncT'.
782wAsyncly :: IsStream t => WAsyncT m a -> t m a
785instance IsStream WAsyncT where
786 toStream = getWAsyncT
790 {-# SPECIALIZE consM :: IO a -> WAsyncT IO a -> WAsyncT IO a #-}
791 consM m r = fromStream $ consMWAsync m (toStream r)
794 {-# SPECIALIZE (|:) :: IO a -> WAsyncT IO a -> WAsyncT IO a #-}
797------------------------------------------------------------------------------
799------------------------------------------------------------------------------
801instance MonadAsync m => Semigroup (WAsyncT m a) where
804------------------------------------------------------------------------------
806------------------------------------------------------------------------------
808instance MonadAsync m => Monoid (WAsyncT m a) where
812------------------------------------------------------------------------------
814------------------------------------------------------------------------------
816instance MonadAsync m => Monad (WAsyncT m) where
819 WAsyncT $ K.bindWith wAsyncS m (getWAsyncT . f)
821------------------------------------------------------------------------------
823------------------------------------------------------------------------------
825MONAD_APPLICATIVE_INSTANCE(WAsyncT,MONADPARALLEL)
826MONAD_COMMON_INSTANCES(WAsyncT, MONADPARALLEL)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list