Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/graph.py
Show All 11 Lines | |||||
from swh.core.statsd import statsd | from swh.core.statsd import statsd | ||||
from swh.model.hashutil import hash_to_hex | from swh.model.hashutil import hash_to_hex | ||||
from swh.model.model import Sha1Git | from swh.model.model import Sha1Git | ||||
from .archive import ArchiveInterface | from .archive import ArchiveInterface | ||||
from .interface import ProvenanceInterface | from .interface import ProvenanceInterface | ||||
from .model import DirectoryEntry, RevisionEntry | from .model import DirectoryEntry, RevisionEntry | ||||
GRAPH_OPERATIONS_METRIC = "swh_provenance_graph_operations_total" | |||||
GRAPH_DURATION_METRIC = "swh_provenance_graph_duration_seconds" | GRAPH_DURATION_METRIC = "swh_provenance_graph_duration_seconds" | ||||
GRAPH_OPERATIONS_METRIC = "swh_provenance_graph_operations_total" | |||||
UTCMIN = datetime.min.replace(tzinfo=timezone.utc) | UTCMIN = datetime.min.replace(tzinfo=timezone.utc) | ||||
class HistoryNode: | class HistoryNode: | ||||
def __init__( | def __init__( | ||||
self, entry: RevisionEntry, is_head: bool = False, in_history: bool = False | self, entry: RevisionEntry, is_head: bool = False, in_history: bool = False | ||||
) -> None: | ) -> None: | ||||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |