Coder Social home page Coder Social logo

Comments (5)

uttamgandhi avatar uttamgandhi commented on August 16, 2024

Hi,
Thanks for testing the utility and reporting the bug
I think you have an older version, I had pushed code on Feb 16.
Please get latest version and check it

from whisper-migrator.

olref avatar olref commented on August 16, 2024

Hello,

I check with the last version, I still have the problem.

from whisper-migrator.

uttamgandhi avatar uttamgandhi commented on August 16, 2024

Thanks for your feedback

I have added -wspinfo option, with it you can check the oldest timestamp in file and total number of points in whisper file. I hope this helps you.

I have created a pull request, to handle this request
#8

If you are keen to have a look you take the feature branch

from whisper-migrator.

olref avatar olref commented on August 16, 2024

Thanks for the wspinfo option.

I make my tests with 450 whisper files (If I choose to migrate to influxdb, I'll have more than 10,000 whisper files to convert). To have the oldest data in my files, I changed GethisperInfo() to only return informations about the oldest data:

func (migrationData *MigrationData) GetWhisperInfo() error {
    var oldestTime uint32 = uint32(time.Now().Unix())
    var oldestFile string

    for _, wspFile := range migrationData.wspFiles {
        w, err := whisper.Open(wspFile)
        if err != nil {
            return err
        }
        t, err := w.GetOldest()
        if err != nil {
            return err
        }
        if t < oldestTime {
            oldestTime = t
            oldestFile = wspFile
        }

        w.Close()
    }

    fmt.Printf("Oldest Whisper File : %s\n", oldestFile)
    fmt.Println("Oldest Data in this File : ", time.Unix(int64(oldestTime), 0))
    fmt.Println("-----------------------------------------------------------------------")

    return nil
}

from whisper-migrator.

nitr0dv avatar nitr0dv commented on August 16, 2024

I think that you need to check -until time for every WSP file to prevent reading of the undefined points from it. Because if you have many WSP files you can't be sure that they all have the same -until timestamp.
And this is correct for -from setting to.

from whisper-migrator.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.