(b *testing.B)
| 479 | } |
| 480 | |
| 481 | func BenchmarkWriteFollowup(b *testing.B) { |
| 482 | p := &FollowUp{ |
| 483 | Header: Header{ |
| 484 | SdoIDAndMsgType: NewSdoIDAndMsgType(MessageFollowUp, 0), |
| 485 | Version: MajorVersion, |
| 486 | MessageLength: uint16(binary.Size(FollowUp{})), |
| 487 | DomainNumber: 0, |
| 488 | FlagField: FlagUnicast, |
| 489 | SequenceID: 0, |
| 490 | SourcePortIdentity: PortIdentity{ |
| 491 | PortNumber: 1, |
| 492 | ClockIdentity: 36138748164966842, |
| 493 | }, |
| 494 | LogMessageInterval: 0, |
| 495 | ControlField: 2, |
| 496 | }, |
| 497 | FollowUpBody: FollowUpBody{ |
| 498 | PreciseOriginTimestamp: Timestamp{ |
| 499 | Seconds: [6]byte{0x0, 0x00, 0x45, 0xb1, 0x11, 0x5e}, |
| 500 | Nanoseconds: 73257582, |
| 501 | }, |
| 502 | }, |
| 503 | } |
| 504 | buf := make([]byte, 64) |
| 505 | for n := 0; n < b.N; n++ { |
| 506 | _, _ = BytesTo(p, buf) |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | func TestReqPDelayMarshalUnmarshal(t *testing.T) { |
| 511 | clockID := ClockIdentity(0x123456789abcdef0) |
nothing calls this directly
no test coverage detected
searching dependent graphs…