-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
370aee0
commit 01713a4
Showing
6 changed files
with
145 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package dupi | ||
|
||
import "fmt" | ||
|
||
type Stats struct { | ||
Root string | ||
NumDocs uint64 | ||
NumPaths uint64 | ||
NumPosts uint64 | ||
NumBlots uint64 | ||
BlotMean float64 | ||
BlotSigma float64 | ||
} | ||
|
||
const stFmt = `dupi index at %s: | ||
- %d docs | ||
- %d nodes in path tree | ||
- %d posts | ||
- %d blots | ||
- %.2f mean docs per blot | ||
- %.2f sigma (std deviation) | ||
` | ||
|
||
func (st *Stats) String() string { | ||
return fmt.Sprintf(stFmt, st.Root, st.NumDocs, | ||
st.NumPaths, st.NumPosts, st.NumBlots, | ||
st.BlotMean, st.BlotSigma) | ||
} |