Skip to content

Commit

Permalink
fix(sut): Add missing port to places
Browse files Browse the repository at this point in the history
  • Loading branch information
symbiont-daniel-gustafsson committed Mar 29, 2022
1 parent 74a8996 commit ff056ac
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/sut/dumblog/app/metrics/Main.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module Main where

import Dumblog.Common.Constants
import Dumblog.Metrics.Main

------------------------------------------------------------------------

main :: IO ()
main = metricsMain
main = metricsMain dUMBLOG_PORT
2 changes: 1 addition & 1 deletion src/sut/dumblog/bench/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import System.Random (StdGen, mkStdGen, randomR)
import Text.Printf (printf)
import Text.Read (readMaybe)

import Dumblog.Common.Constants (dUMBLOG_PORT)
import Dumblog.Common.HttpClient
import Dumblog.Common.Utils (showBytes)
import Dumblog.Journal.Main (dUMBLOG_PORT)

------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions src/sut/dumblog/bench/journal/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Main where

import System.Directory (removePathForcibly)

import Dumblog.Common.Constants
import Dumblog.Journal.Main

import Common
Expand Down
3 changes: 2 additions & 1 deletion src/sut/dumblog/bench/sqlite/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module Main where

import System.Directory (removePathForcibly)

import Dumblog.Common.Constants (dUMBLOG_PORT)
import Dumblog.SQLite.Main (sqliteDumblog)
import Dumblog.SQLite.DB (sqlitePath)

Expand All @@ -14,4 +15,4 @@ main = do
removePathForcibly sqlitePath
removePathForcibly (sqlitePath ++ "-shm")
removePathForcibly (sqlitePath ++ "-wal")
commonMain "SQLite" (sqliteDumblog bUFFER_CAPACITY pORT . Just)
commonMain "SQLite" (sqliteDumblog bUFFER_CAPACITY dUMBLOG_PORT . Just)
1 change: 1 addition & 0 deletions src/sut/dumblog/dumblog.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ library
, persistent-sqlite

exposed-modules:
Dumblog.Common.Constants
Dumblog.Common.HttpClient
Dumblog.Common.Metrics
Dumblog.Common.Utils
Expand Down
4 changes: 4 additions & 0 deletions src/sut/dumblog/src/Dumblog/Common/Constants.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Dumblog.Common.Constants where

dUMBLOG_PORT :: Int
dUMBLOG_PORT = 8054
4 changes: 1 addition & 3 deletions src/sut/dumblog/src/Dumblog/Journal/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import Options.Generic
import System.Directory (copyFile, getTemporaryDirectory, removeFile)
import System.FilePath ((<.>), (</>))

import Dumblog.Common.Constants (dUMBLOG_PORT)
import Dumblog.Common.Metrics (dumblogSchema, dumblogMetricsPath)
import Dumblog.Journal.Blocker (emptyBlocker)
import Dumblog.Journal.Codec (Envelope(..))
Expand Down Expand Up @@ -179,9 +180,6 @@ dumblogOptions = defaultOptions
, oTermBufferLength = 512 * 1024 * 1024
}

dUMBLOG_PORT :: Int
dUMBLOG_PORT = 8054

dumblogJournalPath :: Int -> FilePath
dumblogJournalPath portUsed = "/tmp/dumblog-" ++ show portUsed ++ ".journal"

Expand Down
2 changes: 1 addition & 1 deletion src/sut/dumblog/src/Dumblog/Metrics/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Text.Printf (printf)

import Dumblog.Common.Metrics
import Dumblog.Common.Utils (showBytes)
import Dumblog.Journal.Main
import Dumblog.Journal.Main hiding (port)
import Journal (journalMetadata)
import Journal.Internal.Metrics hiding (Latency)
import Journal.Types
Expand Down

0 comments on commit ff056ac

Please sign in to comment.