pyJoules/handler/mongo_handler.py
def trace_to_dict(trace: Iterable[EnergySample], trace_name: str) -> Dict:
    """
    convert a trace to a dictionary that could be inserted in a mongodb database
    """
    return {
        'name': trace_name,
        'trace': list(map(sample_to_dict, trace))
    }

    convert a trace to a dictionary that could be inserted in a mongodb database
    
convert a trace to a dictionary that could be inserted in a mongodb database
convert a trace to a dictionary that could be inserted in a mongodb database
def trace_to_dict(trace: Iterable[EnergySample], trace_name: str) -> Dict:
    return {
        'name': trace_name,
        'trace': list(map(sample_to_dict, trace))
    }
def trace_to_dict ( trace : Iterable [ EnergySample ] , trace_name : str ) -> Dict : return { 'name' : trace_name , 'trace' : list ( map ( sample_to_dict , trace ) ) }
convert a trace to a dictionary that could be inserted in a mongodb database
convert a trace to a dictionary that could be inserted in a mongodb database
"""
    convert a trace to a dictionary that could be inserted in a mongodb database
    """
trace
Iterable[EnergySample]
trace_name
str