info: Changed sorting of numcopies stats table, so it's ordered by the variance from the desired number of copies.
Compare these... numcopies stats: numcopies -1: 1986 numcopies +0: 1170 numcopies -2: 769 numcopies +1: 716 numcopies -4: 696 numcopies -3: 485 numcopies -6: 230 numcopies -5: 111 numcopies -7: 91 numcopies -9: 9 numcopies stats: numcopies +1: 716 numcopies +0: 1170 numcopies -1: 1986 numcopies -2: 769 numcopies -3: 485 numcopies -4: 696 numcopies -5: 111 numcopies -6: 230 numcopies -7: 91 numcopies -9: 9 I feel that the former is a jumbled mess that doesn't tell much overall, while the second shows pretty clearly that most files are within 1 degree of the desired number of copies, with some outliers without enough.
This commit is contained in:
		
					parent
					
						
							
								817ebb5765
							
						
					
				
			
			
				commit
				
					
						6cb5b7294f
					
				
			
		
					 2 changed files with 3 additions and 1 deletions
				
			
		|  | @ -16,6 +16,8 @@ git-annex (6.20180317) UNRELEASED; urgency=medium | |||
|     uses http-conduit. | ||||
|   * info: Added "combined size of repositories containing these files" | ||||
|     stat when run on a directory. | ||||
|   * info: Changed sorting of numcopies stats table, so it's ordered | ||||
|     by the variance from the desired number of copies. | ||||
| 
 | ||||
|  -- Joey Hess <id@joeyh.name>  Mon, 19 Mar 2018 23:13:59 -0400 | ||||
| 
 | ||||
|  |  | |||
|  | @ -477,7 +477,7 @@ numcopies_stats = stat "numcopies stats" $ json fmt $ | |||
| 	calc <$> (maybe M.empty numCopiesVarianceMap <$> cachedNumCopiesStats) | ||||
|   where | ||||
| 	calc = map (\(variance, count) -> (show variance, count))  | ||||
| 		. sortBy (flip (comparing snd)) | ||||
| 		. sortBy (flip (comparing fst)) | ||||
| 		. M.toList | ||||
| 	fmt = multiLine . map (\(variance, count) -> "numcopies " ++ variance ++ ": " ++ show count) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Joey Hess
				Joey Hess