My first thought is what do you want to learn?
What are the most important aspects for you to play what you want? Anything jazz related for example would probably require more time studying harmony, chords/inversions, scales etc.
I think a big part of the answer is to write out what you want to achieve, and try to flesh out what you need to be able to do achieve this. This is where a teacher can probably help. And then try to allot your time based on the difficulty and progress in different areas.
Here are some general pointers that may or may not apply to you that I recommend to my students:
I think of practice as the structured time of your guitar time, meaning if you have an hour to spend, then depending your “practice time” is the time that you will actually be working in a structured way on improving key skills. Maybe 30 mins for “practice” and 30 mins of jamming and having fun with the instrument is a good balance? Maybe you really like the improvement and can sustain 50 mins of practice and 10 mins of jamming. The key here the way I see it is how sustainable it is, no point in planning for a 60 min practice session if you know you won’t be able to keep it up for more than a week because it gets boring or you want more time just jamming.
Writing down what you plan to do is a good idea, and also writing down how you felt it went when you did the exercises. It can help you avoid getting distracted in in your practice session. This is also important maintain structure, giving you benchmarks and, importantly for your questions, see if you’re making enough progress, if you’ve given 15 mins for sweeping and 15 mins for legato and the sweeping is coming along really well and the legato is not progressing then you can see this in your notes and adapt the practice 25 mins legato and 5 mins sweeping, and see if you’re still progressing in both areas.
If you have and hour then maybe focus 15 minutes of a set of good exercises, or maybe try to make something musical based on the techniques you’re trying to learn. I’d recommend trying to mix up your technical drill, if you have exercises a, b, c and d then try playing them in the following order “a, b, c, d” repeated x-times, rather than playing “a, a, a, a, b, b, b, b, c, c…”. There seems to be evidence that this is more effective, at least for me it seems to avoid mindless repetition.
If your goal is very solid technique then I’d recommend that you’re a bit careful with using your “practice time” to play entire songs, this has value and is important, absolutely, but if your goal is to nail the “Master of Puppets” then it’ll take you over 8 mins and you’ll only get to practice the solo one, whereas if you practice the guitar solo by itself then you can probably get 15-16 repetitions of the solo within the same 8 minutes. There is of course value in playing entire songs, it just depends on what you’re working on.
The key here is probably just that optimal structuring of practice time is individual, and will change over time for each guitarist. But keeping track of progress and challenges will probably make it easier to structure the time in a good way.