diff options
Diffstat (limited to 'cell_test.go')
-rw-r--r-- | cell_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cell_test.go b/cell_test.go index 7b1381f..d4a5b02 100644 --- a/cell_test.go +++ b/cell_test.go @@ -82,3 +82,15 @@ func ExampleFile_SetCellFloat() { fmt.Println(val) // Output: 3.14 } + +func BenchmarkSetCellValue(b *testing.B) { + values := []string{"First", "Second", "Third", "Fourth", "Fifth", "Sixth"} + cols := []string{"A", "B", "C", "D", "E", "F"} + f := NewFile() + b.ResetTimer() + for i := 0; i < b.N; i++ { + for j := 0; j < len(values); j++ { + f.SetCellValue("Sheet1", fmt.Sprint(cols[j], i), values[j]) + } + } +} |