forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit74baa1e
committed
Avoid assuming that instr_time == struct timeval in pgbench logging.
This code was presuming undue familiarity with the contents of theinstr_time struct. That was already broken on Windows, and it's aboutto get broken on most other platforms as well. The simplest solutionthat preserves the current output definition is to just do our owngettimeofday() call here. Realistically, the extra cost is probablynegligible in comparison to everything else that's going on in apgbench transaction, so it's not worth sweating over.On Windows, the precision delivered by gettimeofday() is lower thanone could wish, but this is still a big improvement over printingzeroes, as the code did before.Discussion:https://postgr.es/m/8837.1483216839@sss.pgh.pa.us1 parent257d815 commit74baa1e
1 file changed
+11
-15
lines changedLines changed: 11 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2483 | 2483 |
| |
2484 | 2484 |
| |
2485 | 2485 |
| |
2486 |
| - | |
| 2486 | + | |
2487 | 2487 |
| |
2488 |
| - | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
2489 | 2495 |
| |
2490 | 2496 |
| |
2491 | 2497 |
| |
2492 |
| - | |
| 2498 | + | |
2493 | 2499 |
| |
2494 | 2500 |
| |
2495 | 2501 |
| |
2496 |
| - | |
2497 |
| - | |
2498 |
| - | |
2499 |
| - | |
2500 |
| - | |
2501 |
| - | |
2502 |
| - | |
2503 |
| - | |
2504 |
| - | |
2505 |
| - | |
2506 |
| - | |
| 2502 | + | |
2507 | 2503 |
| |
2508 | 2504 |
| |
2509 | 2505 |
| |
| |||
4402 | 4398 |
| |
4403 | 4399 |
| |
4404 | 4400 |
| |
4405 |
| - | |
| 4401 | + | |
4406 | 4402 |
| |
4407 | 4403 |
| |
4408 | 4404 |
| |
|
0 commit comments
Comments
(0)