Skip to content

Conversation

@MAVRICK-1
Copy link

With these modifications, the get_results method will make a single query to the API with lists of originasns and asns, instead of multiple queries for each combination. It will also appropriately handle caching of results. And also added Indentation to Output and Json file
This Solves #7

Snippet Of Ouput

hegemony.py

PS C:\Users\RISHI\Desktop\abondance> python -u "c:\Users\RISHI\Desktop\abondance\ihr\hegemony.py"
[
    [
        {
            "timebin": "2019-09-16T00:00:00Z",
            "originasn": 2907,
            "asn": 3356,
            "hege": 0.00492094673231115,
            "af": 4,
            "asn_name": "LEVEL3, US",
            "originasn_name": "SINET-AS Research Organization of Information and Systems, National Institute of Informatics, JP"
        },
        {
            "timebin": "2019-09-16T00:00:00Z",
            "originasn": 2907,
            "asn": 1299,
            "hege": 0.0239604148423363,
            "af": 4,
            "asn_name": "TWELVE99 Arelion Sweden AB, SE",
            "originasn_name": "SINET-AS Research Organization of Information and Systems, National Institute of Informatics, JP"
        },
---
      {
        "asn": 7922,
        "timebin": "2019-09-15T15:30:00Z",
        "magnitude": 3.74536221041079,
        "asn_name": "COMCAST-7922, US"
    },
    {
        "asn": 2907,
        "timebin": "2019-09-15T16:30:00Z",
        "magnitude": 0.0,
        "asn_name": "SINET-AS Research Organization of Information and Systems, National Institute of Informatics, JP"  
    }
----}

link_delay.py

PS C:\Users\RISHI\Desktop\abondance> python -u "c:\Users\RISHI\Desktop\abondance\ihr\link_delay.py"

{
    "asn": 2907,
    "timebin": "2019-09-15T00:30:00Z",
    "magnitude": 0.0,
    "asn_name": "SINET-AS Research Organization of Information and Systems, National Institute of Informatics, JP"
}

@romain-fontugne @m-appel can you review my PR :-)

@MAVRICK-1
Copy link
Author

@romain-fontugne sir ,review my changes when you got time :-)

@romain-fontugne
Copy link
Member

Thanks this is good, but it will break if the user gives too many ASes. If the URL is too long it will fail.
Two solutions, either we could just limit the number the max ASes the user can give. Or we have to do multiple queries.

@MAVRICK-1
Copy link
Author

MAVRICK-1 commented Feb 17, 2024

Thanks this is good, but it will break if the user gives too many ASes. If the URL is too long it will fail. Two solutions, either we could just limit the number the max ASes the user can give. Or we have to do multiple queries.

@romain-fontugne When executing multiple queries, it may consume time. In such cases, opting for maximum Autonomous System Numbers (ASes) could be beneficial. If the limit is reached, the system can then proceed to query the remainder of the list. As for determining the limit

@MAVRICK-1
Copy link
Author

and can you clarify this also #3 (comment) so that I can solve this also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants