• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

talsma-ict / context-propagation / #1585

15 Nov 2024 01:04PM CUT coverage: 94.267% (-0.7%) from 94.919%
#1585

push

web-flow
Merge 7b17dead7 into d8f77d505

5 of 10 new or added lines in 2 files covered. (50.0%)

1 existing line in 1 file now uncovered.

855 of 907 relevant lines covered (94.27%)

0.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/context-propagation-core/src/main/java/nl/talsmasoftware/context/core/Timers.java
1
/*
2
 * Copyright 2016-2024 Talsma ICT
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *         http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package nl.talsmasoftware.context.core;
17

18
import nl.talsmasoftware.context.api.ContextTimer;
19

20
import java.util.concurrent.TimeUnit;
21
import java.util.logging.Level;
22
import java.util.logging.Logger;
23

24
final class Timers {
×
25
    private static final Logger TIMING_LOGGER = Logger.getLogger(Timers.class.getName());
1✔
26

27
    static void timed(long durationNanos, Class<?> type, String method, Throwable error) {
28
        for (ContextTimer delegate : ServiceCache.cached(ContextTimer.class)) {
1✔
29
            delegate.update(type, method, durationNanos, TimeUnit.NANOSECONDS, error);
1✔
30
        }
1✔
31
        if (TIMING_LOGGER.isLoggable(Level.FINEST)) {
1✔
32
            TIMING_LOGGER.log(Level.FINEST, "{0}.{1}: {2,number}ns", new Object[]{type.getName(), method, durationNanos});
×
33
        }
34
    }
1✔
35

36
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc