Changes in benchmark/readyQ/locality.go [c5a98f3:f4f79dd]
- File:
-
- 1 edited
-
benchmark/readyQ/locality.go (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/locality.go
rc5a98f3 rf4f79dd 215 215 func main() { 216 216 // Benchmark specific command line arguments 217 work_sizeOpt := flag.Uint64("w", 2 , " Number of words (uint64) per threads")218 countOpt := flag.Uint64("c", 2 , "Number of words (uint64) to touch")217 work_sizeOpt := flag.Uint64("w", 2 , "Size of the array for each threads, in words (64bit)") 218 countOpt := flag.Uint64("c", 2 , "Number of words to touch when working (random pick, cells can be picked more than once)") 219 219 shareOpt := flag.Bool ("s", false, "Pass the work data to the next thread when blocking") 220 220 … … 266 266 267 267 // Join and accumulate results 268 global_result:= NewResult()268 results := NewResult() 269 269 for i := 0; i < nthreads; i++ { 270 270 r := <- result 271 global_result.count += r.count272 global_result.gmigs += r.gmigs273 global_result.dmigs += r.dmigs271 results.count += r.count 272 results.gmigs += r.gmigs 273 results.dmigs += r.dmigs 274 274 } 275 275 … … 280 280 p.Printf("Number of threads : %d\n", nthreads); 281 281 p.Printf("Work size (64bit words): %d\n", size); 282 p.Printf("Total Operations(ops) : %15d\n", global_result.count)283 p.Printf("Total G Migrations : %15d\n", global_result.gmigs)284 p.Printf("Total D Migrations : %15d\n", global_result.dmigs)285 p.Printf("Ops per second : %18.2f\n", float64( global_result.count) / delta.Seconds())286 p.Printf("ns per ops : %18.2f\n", float64(delta.Nanoseconds()) / float64( global_result.count))287 p.Printf("Ops per threads : %15d\n", global_result.count / uint64(nthreads))288 p.Printf("Ops per procs : %15d\n", global_result.count / uint64(nprocs))289 p.Printf("Ops/sec/procs : %18.2f\n", (float64( global_result.count) / float64(nprocs)) / delta.Seconds())290 p.Printf("ns per ops/procs : %18.2f\n", float64(delta.Nanoseconds()) / (float64( global_result.count) / float64(nprocs)))291 } 282 p.Printf("Total Operations(ops) : %15d\n", results.count) 283 p.Printf("Total G Migrations : %15d\n", results.gmigs) 284 p.Printf("Total D Migrations : %15d\n", results.dmigs) 285 p.Printf("Ops per second : %18.2f\n", float64(results.count) / delta.Seconds()) 286 p.Printf("ns per ops : %18.2f\n", float64(delta.Nanoseconds()) / float64(results.count)) 287 p.Printf("Ops per threads : %15d\n", results.count / uint64(nthreads)) 288 p.Printf("Ops per procs : %15d\n", results.count / uint64(nprocs)) 289 p.Printf("Ops/sec/procs : %18.2f\n", (float64(results.count) / float64(nprocs)) / delta.Seconds()) 290 p.Printf("ns per ops/procs : %18.2f\n", float64(delta.Nanoseconds()) / (float64(results.count) / float64(nprocs))) 291 }
Note:
See TracChangeset
for help on using the changeset viewer.