Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getPartFile (0.3 sec)

  1. cmd/object-api-utils_test.go

    	entriesTrie := trie.NewTrie()
    	for i := 1; i <= 10000; i++ {
    		entriesTrie.Insert(fmt.Sprintf("%.5d.8a034f82cb9cb31140d87d3ce2a9ede3.67108864", i))
    	}
    
    	for i := 1; i <= 10000; i++ {
    		partFile := getPartFile(entriesTrie, i, "8a034f82cb9cb31140d87d3ce2a9ede3")
    		if partFile == "" {
    			b.Fatal("partFile returned is empty")
    		}
    	}
    
    	b.ReportAllocs()
    }
    
    func TestGetActualSize(t *testing.T) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 23.4K bytes
    - Viewed (0)
  2. cmd/object-api-utils.go

    		if ok := wildcard.MatchSimple(pattern, matchStr); ok {
    			return true
    		}
    	}
    	return false
    }
    
    // Returns the part file name which matches the partNumber and etag.
    func getPartFile(entriesTrie *trie.Trie, partNumber int, etag string) (partFile string) {
    	for _, match := range entriesTrie.PrefixMatch(fmt.Sprintf("%.5d.%s.", partNumber, etag)) {
    		partFile = match
    		break
    	}
    	return partFile
    }
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
Back to top