Skip to content

Commit

Permalink
server/server.go: include datatype in destdir (#21)
Browse files Browse the repository at this point in the history
While there run `go fmt ./...`.

Closes #20.
  • Loading branch information
bassosimone authored Sep 12, 2019
1 parent 5e6c49e commit 176e7b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ package model
// of DASH, except ServerURL, added in MK v0.10.6.
type ClientResults struct {
ConnectTime float64 `json:"connect_time"`
DeltaSysTime float64 `json:"delta_sys_time"`
DeltaUserTime float64 `json:"delta_user_time"`
DeltaSysTime float64 `json:"delta_sys_time"`
DeltaUserTime float64 `json:"delta_user_time"`
Elapsed float64 `json:"elapsed"`
ElapsedTarget int64 `json:"elapsed_target"`
InternalAddress string `json:"internal_address"`
Expand Down
3 changes: 2 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type sessionInfo struct {
serverSchema model.ServerSchema
stamp time.Time
}

type dependencies struct {
GzipNewWriterLevel func(w io.Writer, level int) (*gzip.Writer, error)
IOUtilReadAll func(r io.Reader) ([]byte, error)
Expand Down Expand Up @@ -293,7 +294,7 @@ type resultsFile struct {
}

func (h *Handler) savedata(session *sessionInfo) error {
name := path.Join(h.Datadir, session.stamp.Format("2006/01/02"))
name := path.Join(h.Datadir, "dash", session.stamp.Format("2006/01/02"))
err := h.deps.OSMkdirAll(name, 0755)
if err != nil {
h.Logger.Warnf("savedata: os.MkdirAll: %s", err.Error())
Expand Down

0 comments on commit 176e7b5

Please # to comment.